X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/64e8f9a9ed91a3cbfa8e66367f87ef50a1d62b99..383670e8f3f5b51d1017d8c1a678aa7eaf1f2b4d:/print-sunatm.c diff --git a/print-sunatm.c b/print-sunatm.c index 27f63c3d..0fe5eee8 100644 --- a/print-sunatm.c +++ b/print-sunatm.c @@ -38,6 +38,7 @@ #include "netdissect-stdinc.h" +#define ND_LONGJMP_FROM_TCHECK #include "netdissect.h" #include "extract.h" @@ -70,12 +71,6 @@ sunatm_if_print(netdissect_options *ndo, u_int traftype; ndo->ndo_protocol = "sunatm"; - if (caplen < PKT_BEGIN_POS) { - ndo->ndo_ll_header_length += caplen; - nd_print_trunc(ndo); - return; - } - ndo->ndo_ll_header_length += PKT_BEGIN_POS; if (ndo->ndo_eflag) { ND_PRINT(GET_U_1(p + DIR_POS) & 0x80 ? "Tx: " : "Rx: "); @@ -96,13 +91,12 @@ sunatm_if_print(netdissect_options *ndo, break; } - vci = GET_BE_U_2(p + VCI_POS); vpi = GET_U_1(p + VPI_POS); + vci = GET_BE_U_2(p + VCI_POS); p += PKT_BEGIN_POS; caplen -= PKT_BEGIN_POS; length -= PKT_BEGIN_POS; + ndo->ndo_ll_hdr_len += PKT_BEGIN_POS; atm_print(ndo, vpi, vci, traftype, p, length, caplen); - - return; }