X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/9169e4e1949c3fa879f0a2f98cfbd8c444743c27..HEAD:/print-ip-demux.c diff --git a/print-ip-demux.c b/print-ip-demux.c index b111c6de..b5282761 100644 --- a/print-ip-demux.c +++ b/print-ip-demux.c @@ -21,9 +21,7 @@ /* \summary: IPv4/IPv6 payload printer */ -#ifdef HAVE_CONFIG_H #include -#endif #include "netdissect-stdinc.h" @@ -104,7 +102,7 @@ again: case IPPROTO_ICMP: if (ver == 4) - icmp_print(ndo, bp, length, iph, fragmented); + icmp_print(ndo, bp, length, fragmented); else { ND_PRINT("[%s requires IPv4]", tok2str(ipproto_values,"unknown",nh)); @@ -129,12 +127,12 @@ again: * (used by Cisco for their IGRP)" and 88 as * "EIGRP" from Cisco. * - * Recent BSD headers define - * IP_PROTO_PIGP as 9 and IP_PROTO_IGRP as 88. - * We define IP_PROTO_PIGP as 9 and - * IP_PROTO_EIGRP as 88; those names better - * match was the current protocol number - * assignments say. + * Recent FreeBSD, DragonFly BSD, and macOS + * headers define IPPROTO_PIGP as 9 and IPPROTO_IGRP + * as 88. We define IPPROTO_PIGP ("private interior + * gateway protocol") as 9 and IPPROTO_EIGRP as 88; + * those names better match what the current protocol + * number assignments say. */ igrp_print(ndo, bp, length); break; @@ -198,7 +196,7 @@ again: if (ndo->ndo_packettype == PT_CARP) { carp_print(ndo, bp, length, ttl_hl); } else { - vrrp_print(ndo, bp, length, iph, ttl_hl); + vrrp_print(ndo, bp, length, iph, ttl_hl, ver); } break; @@ -216,6 +214,10 @@ again: } break; + case IPPROTO_NHRP: + nhrp_print(ndo, bp, length); + break; + case IPPROTO_NONE: ND_PRINT("no next header"); break;