]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ether.c
Fix a bunch of de-constifications.
[tcpdump] / print-ether.c
index 83cc4e5f8e750bcb11a0f2f91d6bc9dd84bba956..ddf6a5305260056fd8416fb76a43c114652e6ac8 100644 (file)
@@ -128,7 +128,7 @@ ether_print(netdissect_options *ndo,
             const u_char *p, u_int length, u_int caplen,
             void (*print_encap_header)(netdissect_options *ndo, const u_char *), const u_char *encap_header_arg)
 {
-       struct ether_header *ep;
+       const struct ether_header *ep;
        u_int orig_length;
        u_short ether_type;
        u_int hdrlen;
@@ -152,7 +152,7 @@ ether_print(netdissect_options *ndo,
 
        length -= ETHER_HDRLEN;
        caplen -= ETHER_HDRLEN;
-       ep = (struct ether_header *)p;
+       ep = (const struct ether_header *)p;
        p += ETHER_HDRLEN;
        hdrlen = ETHER_HDRLEN;
 
@@ -227,7 +227,7 @@ recurse:
                        if (!ndo->ndo_eflag) {
                                if (print_encap_header != NULL)
                                        (*print_encap_header)(ndo, encap_header_arg);
-                               ether_hdr_print(ndo, (u_char *)ep, orig_length);
+                               ether_hdr_print(ndo, (const u_char *)ep, orig_length);
                        }
 
                        if (!ndo->ndo_suppress_default_print)