mirror of
https://github.com/the-tcpdump-group/tcpdump.git
synced 2024-11-27 03:53:53 +08:00
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
This commit is contained in:
parent
99c91c3aec
commit
f5fe14663d
@ -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"
|
||||
|
2
af.c
2
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[] = {
|
||||
|
@ -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:
|
||||
|
2
gmpls.c
2
gmpls.c
@ -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).
|
||||
|
@ -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[] = {
|
||||
|
2
l2vpn.c
2
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 */
|
||||
|
@ -42,7 +42,7 @@
|
||||
#include <ctype.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <interface.h>
|
||||
#include "netdissect.h"
|
||||
|
||||
enum format_flags {
|
||||
minus_flag = 1,
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "interface.h"
|
||||
#include "netdissect.h"
|
||||
|
||||
char *
|
||||
strdup(str)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "interface.h"
|
||||
#include "netdissect.h"
|
||||
|
||||
/*
|
||||
* Get next token from string *stringp, where tokens are possibly-empty
|
||||
|
@ -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
|
||||
|
2
nlpid.c
2
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[] = {
|
||||
|
2
oui.c
2
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 */
|
||||
|
@ -49,7 +49,7 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "interface.h"
|
||||
#include "netdissect.h"
|
||||
#include "nfsfh.h"
|
||||
|
||||
/*
|
||||
|
1
print.c
1
print.c
@ -35,7 +35,6 @@
|
||||
#include <netdissect-stdinc.h>
|
||||
|
||||
#include "netdissect.h"
|
||||
#include "interface.h"
|
||||
#include "addrtoname.h"
|
||||
#include "print.h"
|
||||
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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.
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include <netdissect-stdinc.h>
|
||||
|
||||
#include "ether.h"
|
||||
#include "interface.h"
|
||||
#include "netdissect.h"
|
||||
#include "addrtoname.h"
|
||||
|
||||
typedef struct ether_addr {
|
||||
|
Loading…
Reference in New Issue
Block a user