extern u_int nflog_if_print IF_PRINTER_ARGS;
extern void null_if_print IF_PRINTER_ARGS;
extern u_int pflog_if_print IF_PRINTER_ARGS;
-extern u_int pktap_if_print IF_PRINTER_ARGS;
+extern void pktap_if_print IF_PRINTER_ARGS;
extern void ppi_if_print IF_PRINTER_ARGS;
extern u_int ppp_bsdos_if_print IF_PRINTER_ARGS;
extern u_int ppp_hdlc_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
pktap_if_print(netdissect_options *ndo,
const struct pcap_pkthdr *h, const u_char *p)
{
const pktap_header_t *hdr;
struct pcap_pkthdr nhdr;
- ndo->ndo_protocol = "pktap_if";
+ ndo->ndo_protocol = "pktap";
if (caplen < sizeof(pktap_header_t)) {
nd_print_trunc(ndo);
- return (caplen);
+ ndo->ndo_ll_header_length += caplen;
+ return;
}
hdr = (const pktap_header_t *)p;
dlt = GET_LE_U_4(hdr->pkt_dlt);
* be expanded in the future)?
*/
nd_print_trunc(ndo);
- return (caplen);
+ ndo->ndo_ll_header_length += caplen;
+ return;
}
if (caplen < hdrlen) {
nd_print_trunc(ndo);
- return (caplen);
+ ndo->ndo_ll_header_length += caplen;
+ return;
}
if (ndo->ndo_eflag)
break;
}
- return (hdrlen);
+ ndo->ndo_ll_header_length += hdrlen;
+ return;
}
#endif /* DLT_PKTAP */
#ifdef DLT_JUNIPER_CHDLC
{ juniper_chdlc_if_print, DLT_JUNIPER_CHDLC },
#endif
-#ifdef DLT_PKTAP
- { pktap_if_print, DLT_PKTAP },
-#endif
#ifdef DLT_IEEE802_11_RADIO
{ ieee802_11_radio_if_print, DLT_IEEE802_11_RADIO },
#endif
#ifdef DLT_LOOP
{ null_if_print, DLT_LOOP },
#endif
+#ifdef DLT_PKTAP
+ { pktap_if_print, DLT_PKTAP },
+#endif
#ifdef DLT_PPI
{ ppi_if_print, DLT_PPI },
#endif
- 1 05:27:35.808464432 [|pktap_if]
+ 1 05:27:35.808464432 [|pktap]
2 05:27:12.808595504 [|ppp_hdlc_if]