]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ether.c
Merge pull request #492 from vel21ripn/nflog-print
[tcpdump] / print-ether.c
index 4f8caa971d6b04ee6bee007245eb0deff79a4c32..74479ccf82fc40b39ed8dbc9a743eadb2a6d240e 100644 (file)
@@ -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
@@ -289,7 +290,7 @@ recurse:
                 * It's a type field, with the type for Alteon jumbo frames.
                 * See
                 *
-                *      http://tools.ietf.org/html/draft-ietf-isis-ext-eth-01
+                *      https://tools.ietf.org/html/draft-ietf-isis-ext-eth-01
                 *
                 * which indicates that, following the type field,
                 * there's an LLC header and payload.
@@ -314,7 +315,7 @@ recurse:
                }
                ether_type_print(ndo, length_type);
                ND_PRINT(", length %u: ", orig_length);
-               int bytesConsumed = arista_print_ethertype(ndo, p, length);
+               int bytesConsumed = arista_ethertype_print(ndo, p, length);
                if (bytesConsumed > 0) {
                        p += bytesConsumed;
                        length -= bytesConsumed;
@@ -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: