From: Guy Harris Date: Tue, 7 Jan 2025 07:23:21 +0000 (-0800) Subject: Add comments about the IGRP/EIGRP protocol number and #define mess. X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/d4218cd10f5e42b496afb135238cd7f098ff3387 Add comments about the IGRP/EIGRP protocol number and #define mess. The current IANA protocol number assignments page lists 9 as "any private interior gateway (used by Cisco for their IGRP)" and 88 as "EIGRP" from Cisco. Recent FreeBSD and DragonFly BSD headers define IP_PROTO_IGRP as 9 and IP_PROTO_IGRP as 88. We define IP_PROTO_PIGP ("private interior gateway protocol") as 9 and IP_PROTO_EIGRP as 88; those names* better match what the current protocol number assignments say. --- diff --git a/ipproto.h b/ipproto.h index f6939db7..a5cc0fbf 100644 --- a/ipproto.h +++ b/ipproto.h @@ -59,6 +59,17 @@ extern const char *netdb_protoname (const uint8_t); #ifndef IPPROTO_EGP #define IPPROTO_EGP 8 /* exterior gateway protocol */ #endif +/* + * XXX - the current IANA protocol number assignments page lists 9 as + * "any private interior gateway (used by Cisco for their IGRP)" and + * 88 as "EIGRP" from Cisco. + * + * Recent FreeBSD and DragonFly BSD headers define + * IP_PROTO_IGRP as 9 and IP_PROTO_IGRP as 88. We define IP_PROTO_PIGP + * ("private interior gateway protocol") as 9 and IP_PROTO_EIGRP as 88; + * those names* better match what the current protocol number + * assignments say. + */ #ifndef IPPROTO_PIGP #define IPPROTO_PIGP 9 #endif diff --git a/print-ip-demux.c b/print-ip-demux.c index 50693569..639310e9 100644 --- a/print-ip-demux.c +++ b/print-ip-demux.c @@ -127,11 +127,11 @@ 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 + * Recent FreeBSD and DragonFly BSD headers + * define IP_PROTO_IGRP as 9 and IP_PROTO_IGRP as 88. + * We define IP_PROTO_PIGP ("private interior gateway + * protocol") as 9 and IP_PROTO_EIGRP as 88; those names + * better match what the current protocol number * assignments say. */ igrp_print(ndo, bp, length);