extern u_int netanalyzer_if_print IF_PRINTER_ARGS;
extern u_int netanalyzer_transparent_if_print IF_PRINTER_ARGS;
extern u_int nflog_if_print IF_PRINTER_ARGS;
-extern u_int null_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 u_int ppi_if_print IF_PRINTER_ARGS;
((((y)&0xff)<<24) | (((y)&0xff00)<<8) | (((y)&0xff0000)>>8) | (((y)>>24)&0xff))
static void
-null_hdr_print(netdissect_options *ndo, u_int family, u_int length)
+null_hdr_print(netdissect_options *ndo, uint32_t family, u_int length)
{
if (!ndo->ndo_qflag) {
ND_PRINT("AF %s (%u)",
* 'h->len' is the length of the packet off the wire, and 'h->caplen'
* is the number of bytes actually captured.
*/
-u_int
+void
null_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *p)
{
u_int length = h->len;
u_int caplen = h->caplen;
uint32_t family;
- ndo->ndo_protocol = "null_if";
- if (caplen < NULL_HDRLEN)
- goto trunc;
+ ndo->ndo_protocol = "null";
+ if (caplen < NULL_HDRLEN) {
+ ndo->ndo_ll_header_length += caplen;
+ nd_print_trunc(ndo);
+ return;
+ }
+ ndo->ndo_ll_header_length += NULL_HDRLEN;
- ND_TCHECK_4(p);
family = GET_HE_U_4(p);
/*
ND_DEFAULTPRINT(p, caplen);
}
- return (NULL_HDRLEN);
-trunc:
- nd_print_trunc(ndo);
- return (NULL_HDRLEN);
+ return;
}
#endif
#ifdef DLT_IP_OVER_FC
{ ipfc_if_print, DLT_IP_OVER_FC },
-#endif
- { null_if_print, DLT_NULL },
-#ifdef DLT_LOOP
- { null_if_print, DLT_LOOP },
#endif
#ifdef DLT_LANE8023
{ lane_if_print, DLT_LANE8023 },
#endif
#ifdef DLT_BLUETOOTH_HCI_H4_WITH_PHDR
{ bt_if_print, DLT_BLUETOOTH_HCI_H4_WITH_PHDR},
+#endif
+ { null_if_print, DLT_NULL },
+#ifdef DLT_LOOP
+ { null_if_print, DLT_LOOP },
#endif
{ raw_if_print, DLT_RAW },
#ifdef DLT_IPV4