]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-bfd.c
gre: add support for MikroTik Ethernet-over-IP hack.
[tcpdump] / print-bfd.c
index 8c047357db3ed65ffc262ae2723c2e70be86a75c..2db14354c9a6f477ca21178a340c75a8daa23803 100644 (file)
@@ -146,7 +146,8 @@ static const struct tok bfd_diag_values[] = {
 static const struct tok bfd_port_values[] = {
     { BFD_CONTROL_PORT,  "Control" },
     { BFD_MULTIHOP_PORT, "Multihop" },
-    { BFD_LAG_PORT,      "Lag" },
+    { BFD_LAG_PORT,      "LAG" },
+    { SBFD_PORT,         "S-BFD" },
     { 0, NULL }
 };
 
@@ -222,7 +223,7 @@ auth_print(netdissect_options *ndo, const u_char *pptr)
                 pptr++;
                 ND_PRINT(", Password: ");
                 /* the length is equal to the password length plus three */
-                (void)nd_printn(ndo, pptr, auth_len - 3, NULL);
+                nd_printjn(ndo, pptr, auth_len - 3);
                 break;
             case AUTH_MD5:
             case AUTH_MET_MD5:
@@ -294,7 +295,8 @@ bfd_print(netdissect_options *ndo, const u_char *pptr,
        ndo->ndo_protocol = "bfd";
         if (port == BFD_CONTROL_PORT ||
             port == BFD_MULTIHOP_PORT ||
-            port == BFD_LAG_PORT) {
+            port == BFD_LAG_PORT ||
+            port == SBFD_PORT) {
             /*
              * Control packet.
              */
@@ -313,8 +315,7 @@ bfd_print(netdissect_options *ndo, const u_char *pptr,
 
                 /* BFDv0 */
             case 0:
-                if (ndo->ndo_vflag < 1)
-                {
+                if (ndo->ndo_vflag < 1) {
                     ND_PRINT("BFDv0, Control, Flags: [%s], length: %u",
                            bittok2str(bfd_v0_flag_values, "none", flags),
                            len);
@@ -351,8 +352,7 @@ bfd_print(netdissect_options *ndo, const u_char *pptr,
 
                 /* BFDv1 */
             case 1:
-                if (ndo->ndo_vflag < 1)
-                {
+                if (ndo->ndo_vflag < 1) {
                     ND_PRINT("BFDv1, %s, State %s, Flags: [%s], length: %u",
                            tok2str(bfd_port_values, "unknown (%u)", port),
                            tok2str(bfd_v1_state_values, "unknown (%u)", (flags & 0xc0) >> 6),