]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-pim.c
adopt MacOS deprecation workaround from FreeRADIUS
[tcpdump] / print-pim.c
index 25c8576601984481d0ad27f2261470f3314bd63f..3cd681090d457f14871ff7fa12c7f574ca1ffdda 100644 (file)
@@ -50,7 +50,7 @@ static const char rcsid[] _U_ =
 #define PIMV2_TYPE_CANDIDATE_RP  8
 #define PIMV2_TYPE_PRUNE_REFRESH 9
 
-static struct tok pimv2_type_values[] = {
+static const struct tok pimv2_type_values[] = {
     { PIMV2_TYPE_HELLO,         "Hello" },
     { PIMV2_TYPE_REGISTER,      "Register" },
     { PIMV2_TYPE_REGISTER_STOP, "Register Stop" },
@@ -74,7 +74,7 @@ static struct tok pimv2_type_values[] = {
 #define PIMV2_HELLO_OPTION_ADDRESS_LIST        24
 #define PIMV2_HELLO_OPTION_ADDRESS_LIST_OLD 65001
 
-static struct tok pimv2_hello_option_values[] = {
+static const struct tok pimv2_hello_option_values[] = {
     { PIMV2_HELLO_OPTION_HOLDTIME,         "Hold Time" },
     { PIMV2_HELLO_OPTION_LANPRUNEDELAY,    "LAN Prune Delay" },
     { PIMV2_HELLO_OPTION_DR_PRIORITY_OLD,  "DR Priority (Old)" },
@@ -91,7 +91,7 @@ static struct tok pimv2_hello_option_values[] = {
 #define PIMV2_REGISTER_FLAG_BORDER 0x80000000
 #define PIMV2_REGISTER_FLAG_NULL   0x40000000
 
-static struct tok pimv2_register_flag_values[] = {
+static const struct tok pimv2_register_flag_values[] = {
     { PIMV2_REGISTER_FLAG_BORDER, "Border" },
     { PIMV2_REGISTER_FLAG_NULL, "Null" },
     { 0, NULL}
@@ -397,8 +397,12 @@ cisco_autorp_print(register const u_char *bp, register u_int len)
                        TCHECK2(bp[0], 6);
                        (void)printf("%c%s%s/%d", s, bp[0] & 1 ? "!" : "",
                            ipaddr_string(&bp[2]), bp[1]);
-                       if (bp[0] & 0xfe)
-                               (void)printf("[rsvd=0x%02x]", bp[0] & 0xfe);
+                       if (bp[0] & 0x02) {
+                           (void)printf(" bidir");
+                       }
+                       if (bp[0] & 0xfc) {
+                           (void)printf("[rsvd=0x%02x]", bp[0] & 0xfc);
+                       }
                        s = ',';
                        bp += 6; len -= 6;
                }
@@ -663,7 +667,7 @@ pimv2_print(register const u_char *bp, register u_int len, u_int cksum)
 
                        case PIMV2_HELLO_OPTION_LANPRUNEDELAY:
                                if (olen != 4) {
-                                       (void)printf("ERROR: Option Lenght != 4 Bytes (%u)", olen);
+                                       (void)printf("ERROR: Option Length != 4 Bytes (%u)", olen);
                                } else {
                                        char t_bit;
                                        u_int16_t lan_delay, override_interval;
@@ -686,7 +690,7 @@ pimv2_print(register const u_char *bp, register u_int len, u_int cksum)
                                     printf("%u", EXTRACT_32BITS(bp));
                                     break;
                                 default:
-                                    printf("ERROR: Option Lenght != 4 Bytes (%u)", olen);
+                                    printf("ERROR: Option Length != 4 Bytes (%u)", olen);
                                     break;
                                 }
                                 break;