trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From masa...@apache.org
Subject [trafficserver] 01/05: Add QUICDebugNames::error_class and QUICDebugNames::error_code
Date Fri, 18 Aug 2017 05:49:54 GMT
This is an automated email from the ASF dual-hosted git repository.

masaori pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 8f7f0a8300e20b55c61f76acf355439710e1add4
Author: Masaori Koshiba <masaori@apache.org>
AuthorDate: Fri Aug 18 14:30:55 2017 +0900

    Add QUICDebugNames::error_class and QUICDebugNames::error_code
---
 iocore/net/quic/QUICDebugNames.cc | 40 +++++++++++++++++++++++++++++++++++++++
 iocore/net/quic/QUICDebugNames.h  |  3 +++
 2 files changed, 43 insertions(+)

diff --git a/iocore/net/quic/QUICDebugNames.cc b/iocore/net/quic/QUICDebugNames.cc
index 74f7a2a..b3c738c 100644
--- a/iocore/net/quic/QUICDebugNames.cc
+++ b/iocore/net/quic/QUICDebugNames.cc
@@ -91,6 +91,46 @@ QUICDebugNames::frame_type(QUICFrameType type)
 }
 
 const char *
+QUICDebugNames::error_class(QUICErrorClass cls)
+{
+  switch (cls) {
+  case QUICErrorClass::NONE:
+    return "NONE";
+  case QUICErrorClass::AQPPLICATION_SPECIFIC:
+    return "AQPPLICATION_SPECIFIC";
+  case QUICErrorClass::HOST_LOCAL:
+    return "HOST_LOCAL";
+  case QUICErrorClass::QUIC_TRANSPORT:
+    return "QUIC_TRANSPORT";
+  case QUICErrorClass::CRYPTOGRAPHIC:
+    return "CRYPTOGRAPHIC";
+  default:
+    return "UNKNOWN";
+  }
+}
+
+const char *
+QUICDebugNames::error_code(QUICErrorCode code)
+{
+  switch (code) {
+  case QUICErrorCode::APPLICATION_SPECIFIC_ERROR:
+    return "APPLICATION_SPECIFIC_ERROR";
+  case QUICErrorCode::HOST_LOCAL_ERROR:
+    return "HOST_LOCAL_ERROR";
+  case QUICErrorCode::QUIC_TRANSPORT_ERROR:
+    return "QUIC_TRANSPORT_ERROR";
+  case QUICErrorCode::QUIC_INTERNAL_ERROR:
+    return "QUIC_INTERNAL_ERROR";
+  case QUICErrorCode::CRYPTOGRAPHIC_ERROR:
+    return "CRYPTOGRAPHIC_ERROR";
+  case QUICErrorCode::TLS_HANDSHAKE_FAILED:
+    return "TLS_HANDSHAKE_FAILED";
+  default:
+    return "UNKNOWN";
+  }
+}
+
+const char *
 QUICDebugNames::vc_event(int event)
 {
   switch (event) {
diff --git a/iocore/net/quic/QUICDebugNames.h b/iocore/net/quic/QUICDebugNames.h
index a6fe715..fabd076 100644
--- a/iocore/net/quic/QUICDebugNames.h
+++ b/iocore/net/quic/QUICDebugNames.h
@@ -30,6 +30,9 @@ class QUICDebugNames
 public:
   static const char *packet_type(QUICPacketType type);
   static const char *frame_type(QUICFrameType type);
+  static const char *error_class(QUICErrorClass cls);
+  static const char *error_code(QUICErrorCode code);
+
   // TODO: move to somewhere
   static const char *vc_event(int event);
 };

-- 
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <commits@trafficserver.apache.org>.

Mime
View raw message