X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/76c2585796c90c94834326aaccf1ba1ab76006f2..ba0e682364d51d69c2611850734d7ed925e5034d:/print-pim.c diff --git a/print-pim.c b/print-pim.c index e0cca125..792dd224 100644 --- a/print-pim.c +++ b/print-pim.c @@ -19,11 +19,6 @@ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#ifndef lint -static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-pim.c,v 1.49 2006-02-13 01:31:35 hannes Exp $ (LBL)"; -#endif - #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -50,7 +45,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 +69,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,11 +86,11 @@ 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} -}; +}; /* * XXX: We consider a case where IPv6 is not ready yet for portability, @@ -121,7 +116,7 @@ static void pimv2_print(register const u_char *bp, register u_int len, u_int cks static void pimv1_join_prune_print(register const u_char *bp, register u_int len) { - int maddrlen, addrlen, ngroups, njoin, nprune; + int ngroups, njoin, nprune; int njp; /* If it's a single group and a single source, use 1-line output. */ @@ -162,8 +157,6 @@ pimv1_join_prune_print(register const u_char *bp, register u_int len) len -= 8; TCHECK2(bp[0], 4); - maddrlen = bp[1]; - addrlen = bp[2]; ngroups = bp[3]; bp += 4; len -= 4; @@ -732,12 +725,12 @@ pimv2_print(register const u_char *bp, register u_int len, u_int cksum) break; default: if (vflag <= 1) - print_unknown_data(bp,"\n\t ",olen); + print_unknown_data(gndo,bp,"\n\t ",olen); break; } /* do we want to see an additionally hexdump ? */ if (vflag> 1) - print_unknown_data(bp,"\n\t ",olen); + print_unknown_data(gndo,bp,"\n\t ",olen); bp += olen; } break;