]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-mptcp.c
gre: add support for MikroTik Ethernet-over-IP hack.
[tcpdump] / print-mptcp.c
index b8af92db0a4d6b199ad08ecf4f37382c85978d22..f9663cf6fe37bcb7b0fab54a0de2237ebb575ad2 100644 (file)
@@ -66,6 +66,20 @@ struct mptcp_option {
 
 #define MPTCP_OPT_SUBTYPE(sub_etc)      (((sub_etc) >> 4) & 0xF)
 
+#define MP_CAPABLE_A                    0x80
+
+static const struct tok mp_capable_flags[] = {
+        { MP_CAPABLE_A, "A" },
+        { 0x40, "B" },
+        { 0x20, "C" },
+        { 0x10, "D" },
+        { 0x08, "E" },
+        { 0x04, "F" },
+        { 0x02, "G" },
+        { 0x01, "H" },
+        { 0, NULL }
+};
+
 struct mp_capable {
         nd_uint8_t     kind;
         nd_uint8_t     len;
@@ -77,8 +91,6 @@ struct mp_capable {
 };
 
 #define MP_CAPABLE_OPT_VERSION(sub_ver) (((sub_ver) >> 0) & 0xF)
-#define MP_CAPABLE_C                    0x80
-#define MP_CAPABLE_S                    0x01
 
 struct mp_join {
         nd_uint8_t     kind;
@@ -239,7 +251,10 @@ mp_capable_print(netdissect_options *ndo,
                         return 1;
         }
 
-        csum_enabled = GET_U_1(mpc->flags) & MP_CAPABLE_C;
+        ND_PRINT(" flags [%s]", bittok2str_nosep(mp_capable_flags, "none",
+                 GET_U_1(mpc->flags)));
+
+        csum_enabled = GET_U_1(mpc->flags) & MP_CAPABLE_A;
         if (csum_enabled)
                 ND_PRINT(" csum");
         if (opt_len == 12 || opt_len >= 20) {