]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-symantec.c
Use more the EXTRACT_U_1() macro (40/n)
[tcpdump] / print-symantec.c
index 15653abf71be81a354292f9ecc107fdb98db12b1..c1fe3bd4162b6f3a8768e1a1f41cd9019dbd9d25 100644 (file)
@@ -19,6 +19,8 @@
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
+/* \summary: Symantec Enterprise Firewall printer */
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -45,7 +47,7 @@ symantec_hdr_print(netdissect_options *ndo, register const u_char *bp, u_int len
 
        sp = (const struct symantec_header *)bp;
 
-       etype = EXTRACT_16BITS(&sp->ether_type);
+       etype = EXTRACT_BE_U_2(&sp->ether_type);
        if (!ndo->ndo_qflag) {
                if (etype <= ETHERMTU)
                          ND_PRINT((ndo, "invalid ethertype %u", etype));
@@ -90,7 +92,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_16BITS(&sp->ether_type);
+       ether_type = EXTRACT_BE_U_2(&sp->ether_type);
 
        if (ether_type <= ETHERMTU) {
                /* ether_type not known, print raw packet */
@@ -99,7 +101,7 @@ symantec_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_
 
                if (!ndo->ndo_suppress_default_print)
                        ND_DEFAULTPRINT(p, caplen);
-       } else if (ethertype_print(ndo, ether_type, p, length, caplen) == 0) {
+       } else if (ethertype_print(ndo, ether_type, p, length, caplen, NULL, NULL) == 0) {
                /* ether_type not known, print raw packet */
                if (!ndo->ndo_eflag)
                        symantec_hdr_print(ndo, (const u_char *)sp, length + sizeof (struct symantec_header));