X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/b751376719cfe1924aa07ab8fd364ec1a55c04b3..a63600a1fc28dbc7ae7ce9f996829c49a25fb33c:/print-ap1394.c diff --git a/print-ap1394.c b/print-ap1394.c index 8cc22fe8..b1988f27 100644 --- a/print-ap1394.c +++ b/print-ap1394.c @@ -27,6 +27,7 @@ #include "netdissect-stdinc.h" +#define ND_LONGJMP_FROM_TCHECK #include "netdissect.h" #include "extract.h" #include "addrtoname.h" @@ -52,7 +53,7 @@ struct firewire_header { static const char * fwaddr_string(netdissect_options *ndo, const u_char *addr) { - return (linkaddr_string(ndo, addr, LINKADDR_IEEE1394, FIREWIRE_EUI64_LEN)); + return GET_LINKADDR_STRING(addr, LINKADDR_IEEE1394, FIREWIRE_EUI64_LEN); } static void @@ -95,12 +96,8 @@ ap1394_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_ch struct lladdr_info src, dst; ndo->ndo_protocol = "ap1394"; - if (caplen < FIREWIRE_HDRLEN) { - ndo->ndo_ll_header_length += caplen; - nd_print_trunc(ndo); - return; - } - ndo->ndo_ll_header_length += FIREWIRE_HDRLEN; + ND_TCHECK_LEN(p, FIREWIRE_HDRLEN); + ndo->ndo_ll_hdr_len += FIREWIRE_HDRLEN; if (ndo->ndo_eflag) ap1394_hdr_print(ndo, p, length); @@ -123,6 +120,4 @@ ap1394_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_ch if (!ndo->ndo_suppress_default_print) ND_DEFAULTPRINT(p, caplen); } - - return; }