#include "config.h"
#endif
-#include <tcpdump-stdinc.h>
+#include <netdissect-stdinc.h>
-#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"
{
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);
}
*/
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);
}
dsap = dsap_field & ~LLC_IG;
ssap = ssap_field & ~LLC_GSAP;
- /*
- * Skip LLC header.
- */
- p += hdrlen;
- length -= hdrlen;
- caplen -= hdrlen;
-
if (ndo->ndo_eflag) {
ND_PRINT((ndo, "LLC, dsap %s (0x%02x) %s, ssap %s (0x%02x) %s",
tok2str(llc_values, "Unknown", dsap),
}
}
+ /*
+ * Skip LLC header.
+ */
+ p += hdrlen;
+ length -= hdrlen;
+ caplen -= hdrlen;
+
if (ssap == LLCSAP_SNAP && dsap == LLCSAP_SNAP
&& control == LLC_UI) {
/*
return (hdrlen);
}
-#ifdef TCPDUMP_DO_SMB
+#ifdef ENABLE_SMB
if (ssap == LLCSAP_NETBEUI && dsap == LLCSAP_NETBEUI
&& (!(control & LLC_S_FMT) || control == LLC_U_FMT)) {
/*