]> The Tcpdump Group git mirrors - tcpdump/commitdiff
refine some past NDO conversions
authorDenis Ovsienko <[email protected]>
Wed, 12 Mar 2014 14:11:23 +0000 (18:11 +0400)
committerDenis Ovsienko <[email protected]>
Wed, 12 Mar 2014 14:11:23 +0000 (18:11 +0400)
Don't include unneeded headers and replace a few remaining printf's.

print-arp.c
print-bfd.c
print-carp.c
print-icmp6.c
print-ip6.c
print-ipnet.c
print-isakmp.c
print-msnlb.c
print-nflog.c
print-ppi.c
print-tipc.c

index fbc8411ef817fe9e114b25343091153f05cef71b..84fc82edb5e86b0dd48955b11e9071edf6fb0d66 100644 (file)
@@ -25,7 +25,6 @@
 
 #include <tcpdump-stdinc.h>
 
-#include <stdio.h>
 #include <string.h>
 
 #include "netdissect.h"
@@ -234,9 +233,9 @@ atmarp_print(netdissect_options *ndo,
        }
 
         /* print operation */
-        printf("%s%s ",
+        ND_PRINT((ndo, "%s%s ",
                ndo->ndo_vflag ? ", " : "",
-               tok2str(arpop_values, "Unknown (%u)", op));
+               tok2str(arpop_values, "Unknown (%u)", op)));
 
        switch (op) {
 
@@ -349,9 +348,9 @@ arp_print(netdissect_options *ndo,
        }
 
         /* print operation */
-        printf("%s%s ",
+        ND_PRINT((ndo, "%s%s ",
                ndo->ndo_vflag ? ", " : "",
-               tok2str(arpop_values, "Unknown (%u)", op));
+               tok2str(arpop_values, "Unknown (%u)", op)));
 
        switch (op) {
 
index bc410b4fce78afa0a91373541c75ff2c14627c6f..2cec16ef93085b0000d19b214e1f84de901f43c3 100644 (file)
@@ -19,8 +19,6 @@
 
 #include <tcpdump-stdinc.h>
 
-#include <stdio.h>
-
 #include "netdissect.h"
 #include "extract.h"
 
index 3602cdace7baf36ffdce6c877e2020afa5e72cd1..832d7ae1cc588ad89b96575a926d1d2f4e8242a6 100644 (file)
@@ -40,9 +40,6 @@
 
 #include <tcpdump-stdinc.h>
 
-#include <stdio.h>
-#include <stdlib.h>
-
 #include "interface.h" /* for checksum structure and functions */
 #include "netdissect.h"
 #include "extract.h"
index ba5cfa628749ca72a9576a6da4c6c408d8364a35..cd0a7f9fa3ee5ac00c16cc51e8c71091ab3fb309 100644 (file)
@@ -1337,7 +1337,7 @@ icmp6_opt_print(netdissect_options *ndo, const u_char *bp, int resid)
                        domp = cp + 8; /* domain names, variable-sized, RFC1035-encoded */
                        while (domp < cp + (op->nd_opt_len << 3) && *domp != '\0')
                        {
-                               printf (" ");
+                               ND_PRINT((ndo, " "));
                                if ((domp = ns_nprint (domp, bp)) == NULL)
                                        goto trunc;
                        }
index 91da17ec4d5a492fd229e704f18d66199f76c6f6..b06e93607ebba5465bbdcb921a680414f8001c73 100644 (file)
@@ -27,8 +27,6 @@
 
 #include <tcpdump-stdinc.h>
 
-#include <stdio.h>
-#include <stdlib.h>
 #include <string.h>
 
 #include "netdissect.h"
index 45ba2c3071c6ec203dd81fbac4121b2e70f384f8..c697a30f15d1912c122e5899a3264a4b06d30272 100644 (file)
@@ -4,8 +4,6 @@
 
 #include <tcpdump-stdinc.h>
 
-#include <stdio.h>
-
 #include "netdissect.h"
 #include "interface.h"
 
index bb85c47555ea2e27c79a0d2f6c0c2c0542a6d318..2ebe083b213fedf6b11c24f897cb6e990f65ec48 100644 (file)
@@ -44,8 +44,6 @@
 
 #include <string.h>
 
-#include <stdio.h>
-
 #include "interface.h"
 #include "addrtoname.h"
 #include "extract.h"                    /* must come after interface.h */
index b3004985874de618b70c3f0597b614c8cf1a4520..ec16a4dba9afbee502af9b7d5dc594a2e5394b9d 100644 (file)
@@ -32,9 +32,6 @@
 
 #include <tcpdump-stdinc.h>
 
-#include <stdio.h>
-#include <string.h>
-
 #include "netdissect.h"
 #include "addrtoname.h"
 #include "extract.h"
index 94b36ae6a4863bacb8ecfab1eeb05c5e77a8d75d..5ef4b2fd059a78785b3cc84c9f4a326a5712f3af 100644 (file)
 
 #include <tcpdump-stdinc.h>
 
-#include <stdio.h>
-
 #include "netdissect.h"
-#include "interface.h"
 
 #if defined(DLT_NFLOG) && defined(HAVE_PCAP_NFLOG_H)
 #include <pcap/nflog.h>
index dc9f2a36cc9056ddb20b5518e4f3c3435181db3d..de6ec4af4b94d72e4d58f63086cbb0a479205b1e 100644 (file)
@@ -7,8 +7,6 @@
 
 #include <tcpdump-stdinc.h>
 
-#include <stdio.h>
-
 #include "netdissect.h"
 #include "interface.h"
 #include "extract.h"
index 01eaf278c7f6dde8eec6f05225689d81df3e6096..58186405c3eb8ca4777a85dde6a7188c4f1acc8b 100644 (file)
@@ -25,9 +25,6 @@
 
 #include <tcpdump-stdinc.h>
 
-#include <stdio.h>
-#include <string.h>
-
 #include "netdissect.h"
 #include "ether.h"
 #include "ethertype.h"