X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/7b2c5a11a7bc236d72b440c4db5263edb23b4880..refs/pull/471/head:/print-llc.c?ds=sidebyside diff --git a/print-llc.c b/print-llc.c index 1398e996..aaaac8e1 100644 --- a/print-llc.c +++ b/print-llc.c @@ -26,11 +26,11 @@ #include "config.h" #endif -#include +#include -#include "interface.h" +#include "netdissect.h" #include "addrtoname.h" -#include "extract.h" /* must come after interface.h */ +#include "extract.h" #include "llc.h" #include "ethertype.h" @@ -150,17 +150,17 @@ llc_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen, { uint8_t dsap_field, dsap, ssap_field, ssap; uint16_t control; - u_int hdrlen; + int hdrlen; int is_u; if (caplen < 3) { ND_PRINT((ndo, "[|llc]")); - ND_DEFAULTPRINT((u_char *)p, caplen); + ND_DEFAULTPRINT((const u_char *)p, caplen); return (caplen); } if (length < 3) { ND_PRINT((ndo, "[|llc]")); - ND_DEFAULTPRINT((u_char *)p, caplen); + ND_DEFAULTPRINT((const u_char *)p, caplen); return (length); } @@ -187,12 +187,12 @@ llc_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen, */ if (caplen < 4) { ND_PRINT((ndo, "[|llc]")); - ND_DEFAULTPRINT((u_char *)p, caplen); + ND_DEFAULTPRINT((const u_char *)p, caplen); return (caplen); } if (length < 4) { ND_PRINT((ndo, "[|llc]")); - ND_DEFAULTPRINT((u_char *)p, caplen); + ND_DEFAULTPRINT((const u_char *)p, caplen); return (length); } @@ -303,7 +303,7 @@ llc_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen, return (hdrlen); } -#ifdef TCPDUMP_DO_SMB +#ifdef ENABLE_SMB if (ssap == LLCSAP_NETBEUI && dsap == LLCSAP_NETBEUI && (!(control & LLC_S_FMT) || control == LLC_U_FMT)) { /*