]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-nflog.c
Avoid collison with error(), clean up code a bit.
[tcpdump] / print-nflog.c
index bb375c100b564b44627bb6754a21bc91031c5b0e..a29b930cb30f25ea4c01a57cc34efb9c1208a484 100644 (file)
@@ -25,7 +25,6 @@
  * DAMAGE.
  */
 
-#define NETDISSECT_REWORKED
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
 static const struct tok nflog_values[] = {
        { AF_INET,              "IPv4" },
+#ifdef INET6
        { AF_INET6,             "IPv6" },
-       { 0,                            NULL }
+#endif /*INET6*/
+       { 0,                    NULL }
 };
 
 static inline void
@@ -69,8 +70,8 @@ nflog_if_print(netdissect_options *ndo,
 {
        const nflog_hdr_t *hdr = (const nflog_hdr_t *)p;
        const nflog_tlv_t *tlv;
-       u_int16_t size;
-       u_int16_t h_size = sizeof(nflog_hdr_t);
+       uint16_t size;
+       uint16_t h_size = sizeof(nflog_hdr_t);
        u_int caplen = h->caplen;
        u_int length = h->len;
 
@@ -143,11 +144,11 @@ nflog_if_print(netdissect_options *ndo,
                ip_print(ndo, p, length);
                break;
 
-#ifdef INET6
+#ifdef AF_INET6
        case AF_INET6:
                ip6_print(ndo, p, length);
                break;
-#endif /*INET6*/
+#endif /* AF_INET6 */
 
        default:
                if (!ndo->ndo_eflag)