X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/8534f3b7bfbb81a76fc110a79bbbfedf35cc4f30..11e454d0ba87183f359a63ee0119ae27f50496af:/print-ether.c?ds=inline diff --git a/print-ether.c b/print-ether.c index 0454c9a7..299c2013 100644 --- a/print-ether.c +++ b/print-ether.c @@ -100,6 +100,7 @@ const struct tok ethertype_values[] = { { ETHERTYPE_GEONET, "GeoNet"}, { ETHERTYPE_CALM_FAST, "CALM FAST"}, { ETHERTYPE_AOE, "AoE" }, + { ETHERTYPE_PTP, "PTP" }, { ETHERTYPE_ARISTA, "Arista Vendor Specific Protocol" }, { 0, NULL} }; @@ -109,7 +110,7 @@ ether_addresses_print(netdissect_options *ndo, const u_char *src, const u_char *dst) { ND_PRINT("%s > %s, ", - etheraddr_string(ndo, src), etheraddr_string(ndo, dst)); + GET_ETHERADDR_STRING(src), GET_ETHERADDR_STRING(dst)); } static void @@ -132,7 +133,7 @@ ether_type_print(netdissect_options *ndo, uint16_t type) * printing Ethernet header information (such as a LANE ID for ATM LANE). */ static u_int -ether_print_common(netdissect_options *ndo, const u_char *p, u_int length, +ether_common_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen, void (*print_switch_tag)(netdissect_options *ndo, const u_char *), u_int switch_tag_len, @@ -374,12 +375,12 @@ recurse: * FIXME: caplen can and should be derived from ndo->ndo_snapend and p. */ u_int -ether_print_switch_tag(netdissect_options *ndo, const u_char *p, u_int length, +ether_switch_tag_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen, void (*print_switch_tag)(netdissect_options *, const u_char *), u_int switch_tag_len) { - return (ether_print_common(ndo, p, length, caplen, print_switch_tag, + return (ether_common_print(ndo, p, length, caplen, print_switch_tag, switch_tag_len, NULL, NULL)); } @@ -398,8 +399,8 @@ ether_print(netdissect_options *ndo, const u_char *encap_header_arg) { ndo->ndo_protocol = "ether"; - return (ether_print_common(ndo, p, length, caplen, NULL, 0, - print_encap_header, encap_header_arg)); + return (ether_common_print(ndo, p, length, caplen, NULL, 0, + print_encap_header, encap_header_arg)); } /* @@ -600,6 +601,10 @@ ethertype_print(netdissect_options *ndo, aoe_print(ndo, p, length); return (1); + case ETHERTYPE_PTP: + ptp_print(ndo, p, length); + return (1); + case ETHERTYPE_LAT: case ETHERTYPE_SCA: case ETHERTYPE_MOPRC: