X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/6bc44295cfbe1f7b6633c755841518f4b159aa8a..99f6d01b24d037f4d69ad098f085d98e3d1b73b4:/print-ether.c diff --git a/print-ether.c b/print-ether.c index 59d15c24..57c07ce9 100644 --- a/print-ether.c +++ b/print-ether.c @@ -72,6 +72,7 @@ const struct tok ethertype_values[] = { { ETHERTYPE_RRCP, "RRCP" }, { ETHERTYPE_MS_NLB_HB, "MS NLB heartbeat" }, { ETHERTYPE_JUMBO, "Jumbo" }, + { ETHERTYPE_NSH, "NSH" }, { ETHERTYPE_LOOPBACK, "Loopback" }, { ETHERTYPE_ISO, "OSI" }, { ETHERTYPE_GRE_ISO, "GRE-OSI" }, @@ -126,6 +127,8 @@ ether_hdr_print(netdissect_options *ndo, * This might be encapsulated within another frame; we might be passed * a pointer to a function that can print header information for that * frame's protocol, and an argument to pass to that function. + * + * FIXME: caplen can and should be derived from ndo->ndo_snapend and p. */ u_int ether_print(netdissect_options *ndo, @@ -360,7 +363,11 @@ ethertype_print(netdissect_options *ndo, return (1); case ETHERTYPE_ISO: - isoclns_print(ndo, p + 1, length - 1, length - 1); + if (length == 0 || caplen == 0) { + ND_PRINT((ndo, " [|osi]")); + return (1); + } + isoclns_print(ndo, p + 1, length - 1, caplen - 1); return(1); case ETHERTYPE_PPPOED: @@ -402,6 +409,10 @@ ethertype_print(netdissect_options *ndo, lldp_print(ndo, p, length); return (1); + case ETHERTYPE_NSH: + nsh_print(ndo, p, length); + return (1); + case ETHERTYPE_LOOPBACK: loopback_print(ndo, p, length); return (1); @@ -433,7 +444,7 @@ ethertype_print(netdissect_options *ndo, return (1); case ETHERTYPE_MEDSA: - medsa_print(ndo, p, length, caplen); + medsa_print(ndo, p, length, caplen, src, dst); return (1); case ETHERTYPE_LAT: