X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/c1c3c77463d592cc576eaa491e604752044ca55a..c2a9094394193f1de9c968a1fc490e5a1f2a9a3d:/print-null.c diff --git a/print-null.c b/print-null.c index 60c9bf04..874521e2 100644 --- a/print-null.c +++ b/print-null.c @@ -19,11 +19,13 @@ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ +/* \summary: BSD loopback device printer */ + #ifdef HAVE_CONFIG_H -#include "config.h" +#include #endif -#include +#include "netdissect-stdinc.h" #include @@ -50,18 +52,18 @@ #define SWAPLONG(y) \ ((((y)&0xff)<<24) | (((y)&0xff00)<<8) | (((y)&0xff0000)>>8) | (((y)>>24)&0xff)) -static inline void +static void null_hdr_print(netdissect_options *ndo, u_int family, u_int length) { if (!ndo->ndo_qflag) { - ND_PRINT((ndo, "AF %s (%u)", - tok2str(bsd_af_values,"Unknown",family),family)); + ND_PRINT("AF %s (%u)", + tok2str(bsd_af_values,"Unknown",family),family); } else { - ND_PRINT((ndo, "%s", - tok2str(bsd_af_values,"Unknown AF %u",family))); + ND_PRINT("%s", + tok2str(bsd_af_values,"Unknown AF %u",family)); } - ND_PRINT((ndo, ", length %u: ", length)); + ND_PRINT(", length %u: ", length); } /* @@ -78,7 +80,7 @@ null_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char u_int family; if (caplen < NULL_HDRLEN) { - ND_PRINT((ndo, "[|null]")); + ND_PRINT("[|null]"); return (NULL_HDRLEN); } @@ -115,7 +117,7 @@ null_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char break; case BSD_AFNUM_ISO: - isoclns_print(ndo, p, length, caplen); + isoclns_print(ndo, p, length); break; case BSD_AFNUM_APPLETALK: