* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-#define NETDISSECT_REWORKED
+/* \summary: BSD loopback device printer */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
-#include <tcpdump-stdinc.h>
+#include <netdissect-stdinc.h>
#include <string.h>
-#include "interface.h"
+#include "netdissect.h"
#include "af.h"
/*
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);
}
/*
u_int family;
if (caplen < NULL_HDRLEN) {
- ND_PRINT((ndo, "[|null]"));
+ ND_PRINT("[|null]");
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
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:
- atalk_print(p, length);
+ atalk_print(ndo, p, length);
break;
case BSD_AFNUM_IPX: