struct pcap_pkthdr nhdr;
ndo->ndo_protocol = "pktap_if";
- if (caplen < sizeof(pktap_header_t) || length < sizeof(pktap_header_t)) {
- ND_PRINT("[|pktap]");
- return (0);
+ if (caplen < sizeof(pktap_header_t)) {
+ nd_print_trunc(ndo);
+ return (caplen);
}
hdr = (const pktap_header_t *)p;
dlt = EXTRACT_LE_U_4(hdr->pkt_dlt);
* is the length supplied so that the header can
* be expanded in the future)?
*/
- ND_PRINT("[|pktap]");
- return (0);
+ nd_print_trunc(ndo);
+ return (caplen);
}
- if (caplen < hdrlen || length < hdrlen) {
- ND_PRINT("[|pktap]");
- return (hdrlen);
+ if (caplen < hdrlen) {
+ nd_print_trunc(ndo);
+ return (caplen);
}
if (ndo->ndo_eflag)
return (hdrlen);
}
-
-/*
- * Local Variables:
- * c-style: whitesmith
- * c-basic-offset: 8
- * End:
- */
-
#endif /* DLT_PKTAP */