]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-null.c
SUNRPC: Remove an unused structure
[tcpdump] / print-null.c
index 166f777dee2b24b660950fbd201b7ef171308c4f..27e8e4dcd75a41c1f7d2a8aef87bf933aebdddba 100644 (file)
  * 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"
 
 /*
@@ -55,14 +56,14 @@ static inline 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);
 }
 
 /*
@@ -79,11 +80,11 @@ 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);
        }
 
-       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
@@ -116,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: