X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/576da09dbcfe71ebdae46489f3aa43e6115354f3..ce1fc8263da72437c1df54b8b3ee682413d9e6ed:/print-igmp.c diff --git a/print-igmp.c b/print-igmp.c index 4087ee09..d1cc4f35 100644 --- a/print-igmp.c +++ b/print-igmp.c @@ -19,11 +19,6 @@ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#ifndef lint -static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-igmp.c,v 1.15 2004-03-24 00:59:16 guy Exp $ (LBL)"; -#endif - #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -41,6 +36,8 @@ static const char rcsid[] _U_ = #define IN_CLASSD(i) (((int32_t)(i) & 0xf0000000) == 0xe0000000) #endif +static const char tstr[] = "[|igmp]"; + /* (following from ipmulti/mrouted/prune.h) */ /* @@ -96,7 +93,7 @@ struct tr_resp { #define TR_PROTO_CBT 4 /* igmpv3 report types */ -static struct tok igmpv3report2str[] = { +static const struct tok igmpv3report2str[] = { { 1, "is_in" }, { 2, "is_ex" }, { 3, "to_in" }, @@ -124,7 +121,7 @@ print_mtrace(register const u_char *bp, register u_int len) printf(" with-ttl %d", TR_GETTTL(EXTRACT_32BITS(&tr->tr_rttlqid))); return; trunc: - (void)printf("[|igmp]"); + printf("%s", tstr); return; } @@ -146,7 +143,7 @@ print_mresp(register const u_char *bp, register u_int len) printf(" with-ttl %d", TR_GETTTL(EXTRACT_32BITS(&tr->tr_rttlqid))); return; trunc: - (void)printf("[|igmp]"); + printf("%s", tstr); return; } @@ -200,7 +197,7 @@ print_igmpv3_report(register const u_char *bp, register u_int len) } return; trunc: - (void)printf("[|igmp]"); + (void)printf("%s", tstr); return; } @@ -256,7 +253,7 @@ print_igmpv3_query(register const u_char *bp, register u_int len) (void)printf("]"); return; trunc: - (void)printf("[|igmp]"); + (void)printf("%s", tstr); return; } @@ -340,5 +337,5 @@ igmp_print(register const u_char *bp, register u_int len) } return; trunc: - fputs("[|igmp]", stdout); + (void)printf("%s", tstr); }