/* \summary: Solaris DLT_IPNET printer */
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
#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_header_length += caplen;
- nd_print_trunc(ndo);
- return;
- }
- ndo->ndo_ll_header_length += sizeof(ipnet_hdr_t);
+ ND_TCHECK_LEN(p, sizeof(ipnet_hdr_t));
+ ndo->ndo_ll_hdr_len += sizeof(ipnet_hdr_t);
if (ndo->ndo_eflag)
ipnet_hdr_print(ndo, p, length);
ND_DEFAULTPRINT(p, caplen);
break;
}
- return;
}
/*