X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/dd928cfb35d7ceeacf55dd880ffc9673ac8809e7..b9f915bceb21812e4bd2ca1c616d044b61d596e1:/print-ether.c diff --git a/print-ether.c b/print-ether.c index 6766faba..c93fd6c8 100644 --- a/print-ether.c +++ b/print-ether.c @@ -20,7 +20,7 @@ */ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-ether.c,v 1.100 2005-11-13 12:12:41 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-ether.c,v 1.106 2008-02-06 10:47:53 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -65,14 +65,19 @@ const struct tok ethertype_values[] = { { ETHERTYPE_AARP, "Appletalk ARP" }, { ETHERTYPE_IPX, "IPX" }, { ETHERTYPE_PPP, "PPP" }, + { ETHERTYPE_MPCP, "MPCP" }, { ETHERTYPE_SLOW, "Slow Protocols" }, { ETHERTYPE_PPPOED, "PPPoE D" }, { ETHERTYPE_PPPOES, "PPPoE S" }, { ETHERTYPE_EAPOL, "EAPOL" }, + { ETHERTYPE_RRCP, "RRCP" }, { ETHERTYPE_JUMBO, "Jumbo" }, { ETHERTYPE_LOOPBACK, "Loopback" }, { ETHERTYPE_ISO, "OSI" }, { ETHERTYPE_GRE_ISO, "GRE-OSI" }, + { ETHERTYPE_CFM_OLD, "CFM (old)" }, + { ETHERTYPE_CFM, "CFM" }, + { ETHERTYPE_LLDP, "LLDP" }, { 0, NULL} }; @@ -242,11 +247,13 @@ ether_encap_print(u_short ether_type, const u_char *p, if (llc_print(p, length, caplen, p - 18, p - 12, extracted_ether_type) == 0) { - ether_hdr_print(p - 18, length + 4); + ether_hdr_print(p - 18, length + 4); + + if (!suppress_default_print) { + default_print(p - 18, caplen + 4); + } } - if (!suppress_default_print) - default_print(p - 18, caplen + 4); return (1); @@ -268,10 +275,11 @@ ether_encap_print(u_short ether_type, const u_char *p, if (llc_print(p, length, caplen, p - 16, p - 10, extracted_ether_type) == 0) { ether_hdr_print(p - 16, length + 2); - } - if (!suppress_default_print) - default_print(p - 16, caplen + 2); + if (!suppress_default_print) { + default_print(p - 16, caplen + 2); + } + } return (1); @@ -288,6 +296,10 @@ ether_encap_print(u_short ether_type, const u_char *p, eap_print(gndo, p, length); return (1); + case ETHERTYPE_RRCP: + rrcp_print(gndo, p - 14 , length + 14); + return (1); + case ETHERTYPE_PPP: if (length) { printf(": "); @@ -295,10 +307,23 @@ ether_encap_print(u_short ether_type, const u_char *p, } return (1); + case ETHERTYPE_MPCP: + mpcp_print(p, length); + return (1); + case ETHERTYPE_SLOW: slow_print(p, length); return (1); + case ETHERTYPE_CFM: + case ETHERTYPE_CFM_OLD: + cfm_print(p, length); + return (1); + + case ETHERTYPE_LLDP: + lldp_print(p, length); + return (1); + case ETHERTYPE_LOOPBACK: return (1);