]> The Tcpdump Group git mirrors - tcpdump/commitdiff
libnetdissect code must include 'netdissect.h', not 'interface.h'
authorFrancois-Xavier Le Bail <[email protected]>
Fri, 11 Sep 2015 11:22:56 +0000 (13:22 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Fri, 11 Sep 2015 11:22:56 +0000 (13:22 +0200)
Moreover:
Remove netdissect.h include in interface.h
Move thiszone declaration in netdissect.h
Update a comment

24 files changed:
addrtoname.c
af.c
bpf_dump.c
checksum.c
gmpls.c
in_cksum.c
interface.h
ipproto.c
l2vpn.c
missing/snprintf.c
missing/strdup.c
missing/strlcat.c
missing/strlcpy.c
missing/strsep.c
netdissect.h
nlpid.c
oui.c
parsenfsfh.c
print.c
signature.c
smbutil.c
util-print.c
vfprintf.c
win32/src/ether_ntohost.c

index 527f40551a766186f0d2e637d92fa7afdd4b41c9..3f04479c491b7f5ea73a8518120cceb4cb94246a 100644 (file)
@@ -57,7 +57,7 @@ extern int ether_ntohost(char *, const struct ether_addr *);
 #include <string.h>
 #include <stdlib.h>
 
-#include "interface.h"
+#include "netdissect.h"
 #include "addrtoname.h"
 #include "llc.h"
 #include "setsignal.h"
diff --git a/af.c b/af.c
index cfa0648e362ef0e10b75a8786b5f8940d036923a..539ede5251e21929556f8fe0c98541f460689317 100644 (file)
--- a/af.c
+++ b/af.c
@@ -20,7 +20,7 @@
 #endif
 
 #include <netdissect-stdinc.h>
-#include "interface.h"
+#include "netdissect.h"
 #include "af.h"
 
 const struct tok af_values[] = {
index b7d649a1c3ef000f10e64dcbef096032ae7a4421..9bad38d387e00ae8321b93caff8b1170437eaf82 100644 (file)
@@ -27,7 +27,7 @@
 
 #include <stdio.h>
 
-#include "interface.h"
+#include "netdissect.h"
 
 void
 bpf_dump(const struct bpf_program *p, int option)
index 9f6bb24dd5144521e5217e8acd7fb61f12663df1..0829fbe6f039d404879eded85b7c6892fe57238f 100644 (file)
@@ -28,7 +28,7 @@
 #include <string.h>
 #include <assert.h>
 
-#include "interface.h"
+#include "netdissect.h"
 
 /*
  * CRC-10 table generated using the following Python snippet:
diff --git a/gmpls.c b/gmpls.c
index 463a21de87a5ab73654bbf0f8945da48d21dbe6b..23515e98c757f7370a314b26762d475e7351662f 100644 (file)
--- a/gmpls.c
+++ b/gmpls.c
@@ -19,7 +19,7 @@
 
 #include <netdissect-stdinc.h>
 
-#include "interface.h"
+#include "netdissect.h"
 #include "gmpls.h"
 
 /* rfc3471 */
index caf4b6af40f42925d38c3a142555f23abb2fef6f..8ceaf104446eda7fb49b41c52518c96a8f982f93 100644 (file)
@@ -41,7 +41,7 @@
 
 #include <netdissect-stdinc.h>
 
-#include "interface.h"
+#include "netdissect.h"
 
 /*
  * Checksum routine for Internet Protocol family headers (Portable Version).
index 1a67eb3989837f82e0860e161ebdf7e1c6014446..01de9ea293d9ead8050f8d5879f8b447f2bdb5b2 100644 (file)
@@ -69,8 +69,6 @@ extern char *strsep(char **, const char *);
 
 extern char *program_name;     /* used to generate self-identifying messages */
 
-extern int32_t thiszone;       /* seconds offset from gmt to local time */
-
 extern void error(const char *, ...)
      __attribute__((noreturn))
 #ifdef __ATTRIBUTE___FORMAT_OK
@@ -94,5 +92,3 @@ struct bpf_program;
 extern void bpf_dump(const struct bpf_program *, int);
 
 #endif
-
-#include "netdissect.h"
index eeece52ba089db09715f85286307b5fff7122a61..bcf2cedc2cc415781a050c1d555a0a3b8b7375df 100644 (file)
--- a/ipproto.c
+++ b/ipproto.c
@@ -19,7 +19,7 @@
 
 #include <netdissect-stdinc.h>
 
-#include "interface.h"
+#include "netdissect.h"
 #include "ipproto.h"
 
 const struct tok ipproto_values[] = {
diff --git a/l2vpn.c b/l2vpn.c
index be47dbd710c89ee030c6b1f1924413ddd2ed636c..b870e8904d58c13075ba66087977f4d85237066e 100644 (file)
--- a/l2vpn.c
+++ b/l2vpn.c
@@ -18,7 +18,7 @@
 #endif
 
 #include <netdissect-stdinc.h>
-#include "interface.h"
+#include "netdissect.h"
 #include "l2vpn.h"
 
 /* draft-ietf-pwe3-iana-allocation-04 */
index 21d235d217f2e80d4d7d56a677fcb336aece48c0..921b74c1df3f61159d55042982facf81be2eefe7 100644 (file)
@@ -42,7 +42,7 @@
 #include <ctype.h>
 #include <sys/types.h>
 
-#include <interface.h>
+#include "netdissect.h"
 
 enum format_flags {
     minus_flag     =  1,
index 9fca7529e34db3ce79a2030b1683a7b842f651e8..9cbf35ae2470aed376245792e796d51e4d2ac70f 100644 (file)
@@ -35,7 +35,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "interface.h"
+#include "netdissect.h"
 
 char *
 strdup(str)
index a953034bf94f75d0c489836fda5c89033db138dc..405493545b51e17dab77147eee1c6b80c4db33d2 100644 (file)
@@ -36,7 +36,7 @@
 
 #include <string.h>
 
-#include "interface.h"
+#include "netdissect.h"
 
 /*
  * Appends src to string dst of size siz (unlike strncat, siz is the
index 0999ba300ca4d8a2199c95b8c602eefd758ef18c..24dcca67667fcca6a2a483c1dadd3a40f7c3353f 100644 (file)
@@ -36,7 +36,7 @@
 
 #include <string.h>
 
-#include "interface.h"
+#include "netdissect.h"
 
 /*
  * Copy src to string dst of size siz.  At most siz-1 characters
index 91ef72f62c97203fd5b525a5eb0676dadcfe069b..2c17275f33914d764182cd8e005b54d33e8c07ec 100644 (file)
@@ -39,7 +39,7 @@
 
 #include <string.h>
 
-#include "interface.h"
+#include "netdissect.h"
 
 /*
  * Get next token from string *stringp, where tokens are possibly-empty
index 861957d84a96f3d77cb5d32bfc60f0fdb7133ca2..552d46a940c80b09dd2921304ded23e3c75df6c6 100644 (file)
@@ -40,6 +40,8 @@
 
 #include "ip.h" /* struct ip for nextproto4_cksum() */
 
+extern int32_t thiszone;       /* seconds offset from gmt to local time */
+
 #if !defined(HAVE_SNPRINTF)
 int snprintf (char *str, size_t sz, const char *format, ...)
 #ifdef __ATTRIBUTE___FORMAT_OK
diff --git a/nlpid.c b/nlpid.c
index 14efb0b1874f59cdfe78732c54d88d0d714c57a4..4b44ee1c2095fbd2e7b15024f893fe9e53dae7f3 100644 (file)
--- a/nlpid.c
+++ b/nlpid.c
@@ -18,7 +18,7 @@
 #endif
 
 #include <netdissect-stdinc.h>
-#include "interface.h"
+#include "netdissect.h"
 #include "nlpid.h"
 
 const struct tok nlpid_values[] = {
diff --git a/oui.c b/oui.c
index a06456933f45fdffd0e0d4fd15a16aa24264a5aa..d00e7c5b0f6390c163b23516538f0e4279decdeb 100644 (file)
--- a/oui.c
+++ b/oui.c
@@ -18,7 +18,7 @@
 #endif
 
 #include <netdissect-stdinc.h>
-#include "interface.h"
+#include "netdissect.h"
 #include "oui.h"
 
 /* FIXME complete OUI list using a script */
index e7805063ccafda19cdf8fb878859966c01628f33..a2bfc1c42e6928bc8805838e13445eba34568b6e 100644 (file)
@@ -49,7 +49,7 @@
 #include <stdio.h>
 #include <string.h>
 
-#include "interface.h"
+#include "netdissect.h"
 #include "nfsfh.h"
 
 /*
diff --git a/print.c b/print.c
index c055e3c7b5f996f1123a0bf8857ada4d4a4c0c73..8f68bae380381ec1fdffc085a9cc8e259fd1e4e6 100644 (file)
--- a/print.c
+++ b/print.c
@@ -35,7 +35,6 @@
 #include <netdissect-stdinc.h>
 
 #include "netdissect.h"
-#include "interface.h"
 #include "addrtoname.h"
 #include "print.h"
 
index f27a6a52c0552cd906f68494df186965c50e5f93..18449fc24bc2ff016612e9434dcdec039f1c52f8 100644 (file)
@@ -23,7 +23,7 @@
 
 #include <string.h>
 
-#include "interface.h"
+#include "netdissect.h"
 #include "signature.h"
 
 #ifdef HAVE_LIBCRYPTO
index 8e5e508723da07a8a69ba9becc32d7fa5acd73df..e6114fa37330a0be518dc6ffc511cfc6de478636 100644 (file)
--- a/smbutil.c
+++ b/smbutil.c
@@ -16,7 +16,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "interface.h"
+#include "netdissect.h"
 #include "extract.h"
 #include "smb.h"
 
index 5b6e373197c7646d2fd32faffd1bc1f354119348..469b8261c4dca9d73472c5e1b998953a82370f42 100644 (file)
@@ -51,7 +51,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "interface.h"
+#include "netdissect.h"
 #include "ascii_strcasecmp.h"
 #include "timeval-operations.h"
 
@@ -475,7 +475,7 @@ bittok2str(register const struct tok *lp, register const char *fmt,
 
 /*
  * Convert a value to a string using an array; the macro
- * tok2strary() in <interface.h> is the public interface to
+ * tok2strary() in <netdissect.h> is the public interface to
  * this function and ensures that the second argument is
  * correct for bounds-checking.
  */
index 6f3e15f71289a43f8018f740a41c793cf45f4f85..ae28bcfdafa45ff0a674eedef09a842eb1df58c8 100644 (file)
@@ -30,7 +30,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 
-#include "interface.h"
+#include "netdissect.h"
 
 /*
  * Stock 4.3 doesn't have vfprintf.
index 0217b195559a2e4c8a6b8323b870a8135183fd03..4a58cfcba6209c87752cf0619d67d82fd38cee56 100644 (file)
@@ -30,7 +30,7 @@
 #include <netdissect-stdinc.h>
 
 #include "ether.h"
-#include "interface.h"
+#include "netdissect.h"
 #include "addrtoname.h"
 
 typedef struct ether_addr {