/* The DLT printer routines */
extern void ap1394_if_print IF_PRINTER_ARGS;
-extern u_int arcnet_if_print IF_PRINTER_ARGS;
-extern u_int arcnet_linux_if_print IF_PRINTER_ARGS;
+extern void arcnet_if_print IF_PRINTER_ARGS;
+extern void arcnet_linux_if_print IF_PRINTER_ARGS;
extern u_int atm_if_print IF_PRINTER_ARGS;
extern void bt_if_print IF_PRINTER_ARGS;
extern u_int brcm_tag_if_print IF_PRINTER_ARGS;
* 'h->len' is the length of the packet off the wire, and 'h->caplen'
* is the number of bytes actually captured.
*/
-u_int
+void
arcnet_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *p)
{
u_int caplen = h->caplen;
ndo->ndo_protocol = "arcnet_if";
if (caplen < ARC_HDRLEN) {
nd_print_trunc(ndo);
- return (caplen);
+ ndo->ndo_ll_header_length += caplen;
+ return;
}
ap = (const struct arc_header *)p;
arcnet_print(ndo, p, length, 0, 0, 0);
ND_PRINT(" phds");
nd_print_trunc(ndo);
- return (caplen);
+ ndo->ndo_ll_header_length += caplen;
+ return;
}
flag = GET_U_1(ap->arc_flag);
arcnet_print(ndo, p, length, 0, 0, 0);
ND_PRINT(" phds extended");
nd_print_trunc(ndo);
- return (caplen);
+ ndo->ndo_ll_header_length += caplen;
+ return;
}
flag = GET_U_1(ap->arc_flag2);
seqid = GET_BE_U_2(ap->arc_seqid2);
/*
* This is a middle fragment.
*/
- return (archdrlen);
+ ndo->ndo_ll_header_length += archdrlen;
+ return;
}
if (!arcnet_encap_print(ndo, arc_type, p, length, caplen))
ND_DEFAULTPRINT(p, caplen);
- return (archdrlen);
+ ndo->ndo_ll_header_length += archdrlen;
}
/*
* reassembled packets rather than raw frames, and headers have an
* extra "offset" field between the src/dest and packet type.
*/
-u_int
+void
arcnet_linux_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *p)
{
u_int caplen = h->caplen;
ndo->ndo_protocol = "arcnet_linux_if";
if (caplen < ARC_LINUX_HDRLEN) {
nd_print_trunc(ndo);
- return (caplen);
+ ndo->ndo_ll_header_length += caplen;
+ return;
}
ap = (const struct arc_linux_header *)p;
archdrlen = ARC_LINUX_HDRNEWLEN;
if (caplen < ARC_LINUX_HDRNEWLEN) {
nd_print_trunc(ndo);
- return (caplen);
+ ndo->ndo_ll_header_length += caplen;
+ return;
}
break;
case ARCTYPE_IP_OLD:
if (!arcnet_encap_print(ndo, arc_type, p, length, caplen))
ND_DEFAULTPRINT(p, caplen);
- return (archdrlen);
+ ndo->ndo_ll_header_length += archdrlen;
}
/*
#endif
#ifdef DLT_LANE8023
{ lane_if_print, DLT_LANE8023 },
-#endif
- { arcnet_if_print, DLT_ARCNET },
-#ifdef DLT_ARCNET_LINUX
- { arcnet_linux_if_print, DLT_ARCNET_LINUX },
#endif
#ifdef DLT_IPOIB
{ ipoib_if_print, DLT_IPOIB },
static const struct void_printer void_printers[] = {
#ifdef DLT_APPLE_IP_OVER_IEEE1394
{ ap1394_if_print, DLT_APPLE_IP_OVER_IEEE1394 },
+#endif
+ { arcnet_if_print, DLT_ARCNET },
+#ifdef DLT_ARCNET_LINUX
+ { arcnet_linux_if_print, DLT_ARCNET_LINUX },
#endif
#ifdef DLT_BLUETOOTH_HCI_H4_WITH_PHDR
{ bt_if_print, DLT_BLUETOOTH_HCI_H4_WITH_PHDR},