#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.136 2004-04-05 00:15:51 mcr Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.140 2004-05-01 10:15:33 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
if (IP_V(ip) == 6)
printf(", wrong link-layer encapsulation");
}
- else
+ else if (!eflag)
printf("IP ");
if ((u_char *)(ip + 1) > snapend) {
* For unfragmented datagrams, note the don't fragment flag.
*/
- (void)printf(", id %u, offset %u, flags [%s], proto %u",
- EXTRACT_16BITS(&ip->ip_id),
- (off & 0x1fff) * 8,
- bittok2str(ip_frag_values, "none", off & 0xe000 ),
- ip->ip_p);
+ (void)printf(", id %u, offset %u, flags [%s], proto: %s (%u)",
+ EXTRACT_16BITS(&ip->ip_id),
+ (off & 0x1fff) * 8,
+ bittok2str(ip_frag_values, "none", off & 0xe000 ),
+ tok2str(ipproto_values,"unknown",ip->ip_p),
+ ip->ip_p);
(void)printf(", length: %u", EXTRACT_16BITS(&ip->ip_len));
icmp_print(cp, len, (const u_char *)ip, (off & 0x3fff));
break;
- case IPPROTO_IGRP:
+ case IPPROTO_PIGP:
+ /*
+ * 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 BSD <netinet/in.h> 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.
+ */
igrp_print(cp, len, (const u_char *)ip);
break;
+ case IPPROTO_EIGRP:
+ eigrp_print(cp, len);
+ break;
+
case IPPROTO_ND:
(void)printf(" nd %d", len);
break;