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:
[email protected]


Reply via email to