#include "netdissect-stdinc.h"
+#define ND_LONGJMP_FROM_TCHECK
#include "netdissect.h"
#include "extract.h"
const ipnet_hdr_t *hdr;
hdr = (const ipnet_hdr_t *)bp;
- ND_TCHECK_SIZE(hdr);
ND_PRINT("%u > %u", GET_BE_U_4(hdr->iph_zsrc),
GET_BE_U_4(hdr->iph_zdst));
}
ND_PRINT(", length %u: ", length);
- return;
-trunc:
- nd_print_trunc(ndo);
}
static void
{
const ipnet_hdr_t *hdr;
- if (caplen < sizeof(ipnet_hdr_t)) {
- ndo->ndo_ll_hdr_len += caplen;
- nd_print_trunc(ndo);
- return;
- }
+ ND_TCHECK_LEN(p, sizeof(ipnet_hdr_t));
ndo->ndo_ll_hdr_len += sizeof(ipnet_hdr_t);
if (ndo->ndo_eflag)