]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-symantec.c
Add printing support for vsockmon devices.
[tcpdump] / print-symantec.c
index 4fd834e1bf6c06d2d7ace7b6de70dd885cabebdd..6a0b4918b380657fc0154696a91a9ec7b607a073 100644 (file)
@@ -45,7 +45,7 @@ symantec_hdr_print(netdissect_options *ndo, const u_char *bp, u_int length)
 
        sp = (const struct symantec_header *)bp;
 
-       etype = EXTRACT_BE_U_2(sp->ether_type);
+       etype = GET_BE_U_2(sp->ether_type);
        if (!ndo->ndo_qflag) {
                if (etype <= MAX_ETHERNET_LENGTH_VAL)
                          ND_PRINT("invalid ethertype %u", etype);
@@ -77,8 +77,9 @@ symantec_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_
        const struct symantec_header *sp;
        u_short ether_type;
 
+       ndo->ndo_protocol = "symantec_if";
        if (caplen < sizeof (struct symantec_header)) {
-               ND_PRINT("[|symantec]");
+               nd_print_trunc(ndo);
                return caplen;
        }
 
@@ -90,7 +91,7 @@ symantec_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_
        sp = (const struct symantec_header *)p;
        p += sizeof (struct symantec_header);
 
-       ether_type = EXTRACT_BE_U_2(sp->ether_type);
+       ether_type = GET_BE_U_2(sp->ether_type);
 
        if (ether_type <= MAX_ETHERNET_LENGTH_VAL) {
                /* ether_type not known, print raw packet */