X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/a7a76012a129ffefb64f102948db63fbc715e45e..d7b497cac78b6e22a66a6bae9bdec60a8044f67a:/print-sl.c?ds=inline diff --git a/print-sl.c b/print-sl.c index a4a05fb1..419864ef 100644 --- a/print-sl.c +++ b/print-sl.c @@ -151,8 +151,8 @@ sliplink_print(netdissect_options *ndo, register int i; for (i = SLX_CHDR; i < SLX_CHDR + CHDR_LEN - 1; ++i) - ND_PRINT((ndo, "%02x.", p[i])); - ND_PRINT((ndo, "%02x: ", p[SLX_CHDR + CHDR_LEN - 1])); + ND_PRINT((ndo, "%02x.", EXTRACT_U_1(p + i))); + ND_PRINT((ndo, "%02x: ", EXTRACT_U_1(p + SLX_CHDR + CHDR_LEN - 1))); return; } switch (p[SLX_CHDR] & 0xf0) { @@ -188,7 +188,7 @@ sliplink_print(netdissect_options *ndo, length, dir); ND_PRINT((ndo, ": ")); } else - ND_PRINT((ndo, "slip-%d!: ", p[SLX_CHDR])); + ND_PRINT((ndo, "slip-%d!: ", EXTRACT_U_1(p + SLX_CHDR))); } } @@ -199,7 +199,7 @@ print_sl_change(netdissect_options *ndo, register u_int i; if ((i = *cp++) == 0) { - i = EXTRACT_BE_16BITS(cp); + i = EXTRACT_BE_U_2(cp); cp += 2; } ND_PRINT((ndo, " %s%d", str, i)); @@ -213,7 +213,7 @@ print_sl_winchange(netdissect_options *ndo, register short i; if ((i = *cp++) == 0) { - i = EXTRACT_BE_16BITS(cp); + i = EXTRACT_BE_U_2(cp); cp += 2; } if (i >= 0) @@ -231,10 +231,10 @@ compressed_sl_print(netdissect_options *ndo, register const u_char *cp = chdr; register u_int flags, hlen; - flags = EXTRACT_8BITS(cp); + flags = EXTRACT_U_1(cp); cp++; if (flags & NEW_C) { - lastconn = EXTRACT_8BITS(cp); + lastconn = EXTRACT_U_1(cp); cp++; ND_PRINT((ndo, "ctcp %d", lastconn)); } else