diff options
author | Francois-Xavier Le Bail <fx.lebail@yahoo.com> | 2015-09-11 13:22:56 +0200 |
---|---|---|
committer | Francois-Xavier Le Bail <fx.lebail@yahoo.com> | 2015-09-11 13:22:56 +0200 |
commit | f5fe14663d9ed32b7a995ed0924c04e705f74237 (patch) | |
tree | 11c4111a2660fbdc27800ae1bf2e8a513ee80ebc | |
parent | 99c91c3aec40b691641374f58e798bd8d6b657bd (diff) | |
download | tcpdump-f5fe14663d9ed32b7a995ed0924c04e705f74237.tar.gz |
libnetdissect code must include 'netdissect.h', not 'interface.h'
Moreover:
Remove netdissect.h include in interface.h
Move thiszone declaration in netdissect.h
Update a comment
-rw-r--r-- | addrtoname.c | 2 | ||||
-rw-r--r-- | af.c | 2 | ||||
-rw-r--r-- | bpf_dump.c | 2 | ||||
-rw-r--r-- | checksum.c | 2 | ||||
-rw-r--r-- | gmpls.c | 2 | ||||
-rw-r--r-- | in_cksum.c | 2 | ||||
-rw-r--r-- | interface.h | 4 | ||||
-rw-r--r-- | ipproto.c | 2 | ||||
-rw-r--r-- | l2vpn.c | 2 | ||||
-rw-r--r-- | missing/snprintf.c | 2 | ||||
-rw-r--r-- | missing/strdup.c | 2 | ||||
-rw-r--r-- | missing/strlcat.c | 2 | ||||
-rw-r--r-- | missing/strlcpy.c | 2 | ||||
-rw-r--r-- | missing/strsep.c | 2 | ||||
-rw-r--r-- | netdissect.h | 2 | ||||
-rw-r--r-- | nlpid.c | 2 | ||||
-rw-r--r-- | oui.c | 2 | ||||
-rw-r--r-- | parsenfsfh.c | 2 | ||||
-rw-r--r-- | print.c | 1 | ||||
-rw-r--r-- | signature.c | 2 | ||||
-rw-r--r-- | smbutil.c | 2 | ||||
-rw-r--r-- | util-print.c | 4 | ||||
-rw-r--r-- | vfprintf.c | 2 | ||||
-rw-r--r-- | win32/src/ether_ntohost.c | 2 |
24 files changed, 24 insertions, 27 deletions
diff --git a/addrtoname.c b/addrtoname.c index 527f4055..3f04479c 100644 --- a/addrtoname.c +++ b/addrtoname.c @@ -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" @@ -20,7 +20,7 @@ #endif #include <netdissect-stdinc.h> -#include "interface.h" +#include "netdissect.h" #include "af.h" const struct tok af_values[] = { @@ -27,7 +27,7 @@ #include <stdio.h> -#include "interface.h" +#include "netdissect.h" void bpf_dump(const struct bpf_program *p, int option) @@ -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: @@ -19,7 +19,7 @@ #include <netdissect-stdinc.h> -#include "interface.h" +#include "netdissect.h" #include "gmpls.h" /* rfc3471 */ @@ -41,7 +41,7 @@ #include <netdissect-stdinc.h> -#include "interface.h" +#include "netdissect.h" /* * Checksum routine for Internet Protocol family headers (Portable Version). diff --git a/interface.h b/interface.h index 1a67eb39..01de9ea2 100644 --- a/interface.h +++ b/interface.h @@ -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" @@ -19,7 +19,7 @@ #include <netdissect-stdinc.h> -#include "interface.h" +#include "netdissect.h" #include "ipproto.h" const struct tok ipproto_values[] = { @@ -18,7 +18,7 @@ #endif #include <netdissect-stdinc.h> -#include "interface.h" +#include "netdissect.h" #include "l2vpn.h" /* draft-ietf-pwe3-iana-allocation-04 */ diff --git a/missing/snprintf.c b/missing/snprintf.c index 21d235d2..921b74c1 100644 --- a/missing/snprintf.c +++ b/missing/snprintf.c @@ -42,7 +42,7 @@ #include <ctype.h> #include <sys/types.h> -#include <interface.h> +#include "netdissect.h" enum format_flags { minus_flag = 1, diff --git a/missing/strdup.c b/missing/strdup.c index 9fca7529..9cbf35ae 100644 --- a/missing/strdup.c +++ b/missing/strdup.c @@ -35,7 +35,7 @@ #include <stdlib.h> #include <string.h> -#include "interface.h" +#include "netdissect.h" char * strdup(str) diff --git a/missing/strlcat.c b/missing/strlcat.c index a953034b..40549354 100644 --- a/missing/strlcat.c +++ b/missing/strlcat.c @@ -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 diff --git a/missing/strlcpy.c b/missing/strlcpy.c index 0999ba30..24dcca67 100644 --- a/missing/strlcpy.c +++ b/missing/strlcpy.c @@ -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 diff --git a/missing/strsep.c b/missing/strsep.c index 91ef72f6..2c17275f 100644 --- a/missing/strsep.c +++ b/missing/strsep.c @@ -39,7 +39,7 @@ #include <string.h> -#include "interface.h" +#include "netdissect.h" /* * Get next token from string *stringp, where tokens are possibly-empty diff --git a/netdissect.h b/netdissect.h index 861957d8..552d46a9 100644 --- a/netdissect.h +++ b/netdissect.h @@ -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 @@ -18,7 +18,7 @@ #endif #include <netdissect-stdinc.h> -#include "interface.h" +#include "netdissect.h" #include "nlpid.h" const struct tok nlpid_values[] = { @@ -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 */ diff --git a/parsenfsfh.c b/parsenfsfh.c index e7805063..a2bfc1c4 100644 --- a/parsenfsfh.c +++ b/parsenfsfh.c @@ -49,7 +49,7 @@ #include <stdio.h> #include <string.h> -#include "interface.h" +#include "netdissect.h" #include "nfsfh.h" /* @@ -35,7 +35,6 @@ #include <netdissect-stdinc.h> #include "netdissect.h" -#include "interface.h" #include "addrtoname.h" #include "print.h" diff --git a/signature.c b/signature.c index f27a6a52..18449fc2 100644 --- a/signature.c +++ b/signature.c @@ -23,7 +23,7 @@ #include <string.h> -#include "interface.h" +#include "netdissect.h" #include "signature.h" #ifdef HAVE_LIBCRYPTO @@ -16,7 +16,7 @@ #include <stdlib.h> #include <string.h> -#include "interface.h" +#include "netdissect.h" #include "extract.h" #include "smb.h" diff --git a/util-print.c b/util-print.c index 5b6e3731..469b8261 100644 --- a/util-print.c +++ b/util-print.c @@ -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. */ @@ -30,7 +30,7 @@ #include <stdlib.h> #include <unistd.h> -#include "interface.h" +#include "netdissect.h" /* * Stock 4.3 doesn't have vfprintf. diff --git a/win32/src/ether_ntohost.c b/win32/src/ether_ntohost.c index 0217b195..4a58cfcb 100644 --- a/win32/src/ether_ntohost.c +++ b/win32/src/ether_ntohost.c @@ -30,7 +30,7 @@ #include <netdissect-stdinc.h> #include "ether.h" -#include "interface.h" +#include "netdissect.h" #include "addrtoname.h" typedef struct ether_addr { |