summaryrefslogtreecommitdiff
path: root/print-vjc.c
diff options
context:
space:
mode:
Diffstat (limited to 'print-vjc.c')
-rw-r--r--print-vjc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/print-vjc.c b/print-vjc.c
index 597ba060..b5f88ab6 100644
--- a/print-vjc.c
+++ b/print-vjc.c
@@ -30,6 +30,7 @@
#include <netdissect-stdinc.h>
#include "netdissect.h"
+#include "extract.h"
#include "slcompress.h"
#include "ppp.h"
@@ -100,10 +101,10 @@ vjc_print(netdissect_options *ndo, register const u_char *bp, u_short proto _U_)
if (ndo->ndo_eflag)
ND_PRINT((ndo, "(vjc type=compressed TCP) "));
for (i = 0; i < 8; i++) {
- if (bp[1] & (0x80 >> i))
+ if (EXTRACT_U_1(bp + 1) & (0x80 >> i))
ND_PRINT((ndo, "%c", "?CI?SAWU"[i]));
}
- if (bp[1])
+ if (EXTRACT_U_1(bp + 1))
ND_PRINT((ndo, " "));
ND_PRINT((ndo, "C=0x%02x ", bp[2]));
ND_PRINT((ndo, "sum=0x%04x ", *(const u_short *)(bp + 3)));