X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/f509616ae8ac540747382dd4c3434926a0c07793..0d52da1a967932f479912f8049b35c0112a7c708:/print-igmp.c diff --git a/print-igmp.c b/print-igmp.c index d5259093..d5356dd2 100644 --- a/print-igmp.c +++ b/print-igmp.c @@ -110,9 +110,9 @@ static const struct tok igmpv3report2str[] = { static void print_mtrace(netdissect_options *ndo, - register const u_char *bp, register u_int len) + const u_char *bp, u_int len) { - register const struct tr_query *tr = (const struct tr_query *)(bp + 8); + const struct tr_query *tr = (const struct tr_query *)(bp + 8); ND_TCHECK(*tr); if (len < 8 + sizeof (struct tr_query)) { @@ -124,7 +124,7 @@ print_mtrace(netdissect_options *ndo, ipaddr_string(ndo, tr->tr_src), ipaddr_string(ndo, tr->tr_dst), ipaddr_string(ndo, tr->tr_raddr))); if (IN_CLASSD(EXTRACT_BE_U_4(tr->tr_raddr))) - ND_PRINT((ndo, " with-ttl %u", EXTRACT_U_1(&tr->tr_rttl))); + ND_PRINT((ndo, " with-ttl %u", EXTRACT_U_1(tr->tr_rttl))); return; trunc: ND_PRINT((ndo, "%s", tstr)); @@ -132,9 +132,9 @@ trunc: static void print_mresp(netdissect_options *ndo, - register const u_char *bp, register u_int len) + const u_char *bp, u_int len) { - register const struct tr_query *tr = (const struct tr_query *)(bp + 8); + const struct tr_query *tr = (const struct tr_query *)(bp + 8); ND_TCHECK(*tr); if (len < 8 + sizeof (struct tr_query)) { @@ -146,7 +146,7 @@ print_mresp(netdissect_options *ndo, ipaddr_string(ndo, tr->tr_src), ipaddr_string(ndo, tr->tr_dst), ipaddr_string(ndo, tr->tr_raddr))); if (IN_CLASSD(EXTRACT_BE_U_4(tr->tr_raddr))) - ND_PRINT((ndo, " with-ttl %u", EXTRACT_U_1(&tr->tr_rttl))); + ND_PRINT((ndo, " with-ttl %u", EXTRACT_U_1(tr->tr_rttl))); return; trunc: ND_PRINT((ndo, "%s", tstr)); @@ -154,10 +154,10 @@ trunc: static void print_igmpv3_report(netdissect_options *ndo, - register const u_char *bp, register u_int len) + const u_char *bp, u_int len) { u_int group, nsrcs, ngroups; - register u_int i, j; + u_int i, j; /* Minimum len is 16, and should be a multiple of 4 */ if (len < 16 || len & 0x03) { @@ -175,8 +175,8 @@ print_igmpv3_report(netdissect_options *ndo, ND_PRINT((ndo, " [invalid number of groups]")); return; } - ND_TCHECK2(bp[group+4], 4); - ND_PRINT((ndo, " [gaddr %s", ipaddr_string(ndo, &bp[group+4]))); + ND_TCHECK_4(bp + (group + 4)); + ND_PRINT((ndo, " [gaddr %s", ipaddr_string(ndo, bp + group + 4))); ND_PRINT((ndo, " %s", tok2str(igmpv3report2str, " [v3-report-#%d]", EXTRACT_U_1(bp + group)))); nsrcs = EXTRACT_BE_U_2(bp + group + 2); @@ -191,8 +191,8 @@ print_igmpv3_report(netdissect_options *ndo, /* Print the sources */ ND_PRINT((ndo, " {")); for (j=0; j 0) { @@ -249,8 +249,8 @@ print_igmpv3_query(netdissect_options *ndo, else if (ndo->ndo_vflag > 1) { ND_PRINT((ndo, " {")); for (i=0; indo_vflag && len >= 4 && ND_TTEST2(bp[0], len)) { + if (ndo->ndo_vflag && len >= 4 && ND_TTEST_LEN(bp, len)) { /* Check the IGMP checksum */ vec[0].ptr = bp; vec[0].len = len;