X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/5d85aa67ed0a3ade5096d58c75169b23e87ecb8a..aa0858100096a3490edf93034a80e66a4d61aad5:/print-null.c diff --git a/print-null.c b/print-null.c index 47df451e..59b691cc 100644 --- a/print-null.c +++ b/print-null.c @@ -19,16 +19,17 @@ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#define NETDISSECT_REWORKED +/* \summary: BSD loopback device printer */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif -#include +#include #include -#include "interface.h" +#include "netdissect.h" #include "af.h" /* @@ -83,7 +84,7 @@ null_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char return (NULL_HDRLEN); } - memcpy((char *)&family, (char *)p, sizeof(family)); + memcpy((char *)&family, (const char *)p, sizeof(family)); /* * This isn't necessarily in our host byte order; if this is @@ -109,16 +110,14 @@ null_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char ip_print(ndo, p, length); break; -#ifdef INET6 case BSD_AFNUM_INET6_BSD: case BSD_AFNUM_INET6_FREEBSD: case BSD_AFNUM_INET6_DARWIN: ip6_print(ndo, p, length); break; -#endif case BSD_AFNUM_ISO: - isoclns_print(ndo, p, length, caplen); + isoclns_print(ndo, p, length); break; case BSD_AFNUM_APPLETALK: