]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Use nd_ types.
authorGuy Harris <[email protected]>
Sun, 31 Dec 2017 02:39:32 +0000 (18:39 -0800)
committerGuy Harris <[email protected]>
Sun, 31 Dec 2017 02:39:32 +0000 (18:39 -0800)
print-symantec.c

index e80bd45c626673af5fc661f789558b6425914042..717e48022d94851323f5992fd3d049392d06052c 100644 (file)
@@ -32,9 +32,9 @@
 #include "ethertype.h"
 
 struct symantec_header {
-       uint8_t  stuff1[6];
-       uint16_t ether_type;
-       uint8_t  stuff2[36];
+       nd_byte     stuff1[6];
+       nd_uint16_t ether_type;
+       nd_byte     stuff2[36];
 };
 
 static inline void
@@ -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 = EXTRACT_BE_U_2(sp->ether_type);
        if (!ndo->ndo_qflag) {
                if (etype <= MAX_ETHERNET_LENGTH_VAL)
                          ND_PRINT((ndo, "invalid ethertype %u", etype));
@@ -90,7 +90,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 = EXTRACT_BE_U_2(sp->ether_type);
 
        if (ether_type <= MAX_ETHERNET_LENGTH_VAL) {
                /* ether_type not known, print raw packet */