You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by GitBox <gi...@apache.org> on 2020/07/08 00:02:22 UTC

[GitHub] [trafficserver] maskit commented on a change in pull request #6972: Traffic Dump: dump server-side protocol stack

maskit commented on a change in pull request #6972:
URL: https://github.com/apache/trafficserver/pull/6972#discussion_r451209096



##########
File path: plugins/experimental/traffic_dump/session_data.cc
##########
@@ -34,6 +37,148 @@ namespace
 {
 /** The final string used to close a JSON session. */
 char const constexpr *const json_closing = "]}]}";
+
+/**
+ * A mapping from IP_PROTO_TAG to the string describing the JSON protocol node.
+ */
+std::unordered_map<std::string, std::string> tag_to_node = {
+  {std::string(IP_PROTO_TAG_IPV4), R"("name":"ip","version":"4")"},
+  {std::string(IP_PROTO_TAG_IPV6), R"("name":"ip","version":"6")"},
+
+  {std::string(IP_PROTO_TAG_TCP), R"("name":"tcp")"},
+  {std::string(IP_PROTO_TAG_UDP), R"("name":"udp")"},
+
+  {std::string(IP_PROTO_TAG_QUIC), R"("name:":"quic")"},
+
+  {std::string(IP_PROTO_TAG_TLS_1_0), R"("name":"tls","version":"1.0")"},
+  {std::string(IP_PROTO_TAG_TLS_1_1), R"("name":"tls","version":"1.1")"},
+  {std::string(IP_PROTO_TAG_TLS_1_2), R"("name":"tls","version":"1.2")"},
+  {std::string(IP_PROTO_TAG_TLS_1_3), R"("name":"tls","version":"1.3")"},
+
+  {std::string(IP_PROTO_TAG_HTTP_0_9), R"("name":"http","version":"0.9")"},
+  {std::string(IP_PROTO_TAG_HTTP_1_0), R"("name":"http","version":"1.0")"},
+  {std::string(IP_PROTO_TAG_HTTP_1_1), R"("name":"http","version":"1.1")"},
+  {std::string(IP_PROTO_TAG_HTTP_2_0), R"("name":"http","version":"2")"},
+
+  {std::string(IP_PROTO_TAG_HTTP_QUIC), R"("name":"http","version":"0.9")"},
+  {std::string(IP_PROTO_TAG_HTTP_QUIC), R"("name":"http","version":"3")"},

Review comment:
       IP_PROTO_TAG_HTTP_**3**




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org