#include "netdissect-stdinc.h"
+#define ND_LONGJMP_FROM_TCHECK
#include "netdissect.h"
#include "ethertype.h"
#include "addrtoname.h"
ND_PRINT(", ");
}
-u_int
+void
brcm_tag_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h,
const u_char *p)
{
u_int length = h->len;
ndo->ndo_protocol = "brcm-tag";
- return (ether_switch_tag_print(ndo, p, length, caplen,
- brcm_tag_print, BRCM_TAG_LEN));
+ ndo->ndo_ll_hdr_len +=
+ ether_switch_tag_print(ndo, p, length, caplen,
+ brcm_tag_print, BRCM_TAG_LEN);
}
-u_int
+void
brcm_tag_prepend_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h,
const u_char *p)
{
u_int length = h->len;
ndo->ndo_protocol = "brcm-tag-prepend";
- if (caplen < BRCM_TAG_LEN) {
- nd_print_trunc(ndo);
- return (caplen);
- }
-
- if (length < BRCM_TAG_LEN) {
- nd_print_trunc(ndo);
- return (length);
- }
+ ND_TCHECK_LEN(p, BRCM_TAG_LEN);
+ ndo->ndo_ll_hdr_len += BRCM_TAG_LEN;
if (ndo->ndo_eflag) {
/* Print the prepended Broadcom tag. */
/*
* Now print the Ethernet frame following it.
*/
- return ether_print(ndo, p, length, caplen, NULL, NULL);
+ ndo->ndo_ll_hdr_len +=
+ ether_print(ndo, p, length, caplen, NULL, NULL);
}