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:
Francois-Xavier Le Bail 2015-09-11 13:22:56 +02:00
parent 99c91c3aec
commit f5fe14663d
24 changed files with 24 additions and 27 deletions

View 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"

2
af.c
View File

@ -20,7 +20,7 @@
#endif
#include <netdissect-stdinc.h>
#include "interface.h"
#include "netdissect.h"
#include "af.h"
const struct tok af_values[] = {

View File

@ -27,7 +27,7 @@
#include <stdio.h>
#include "interface.h"
#include "netdissect.h"
void
bpf_dump(const struct bpf_program *p, int option)

View 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:

View File

@ -19,7 +19,7 @@
#include <netdissect-stdinc.h>
#include "interface.h"
#include "netdissect.h"
#include "gmpls.h"
/* rfc3471 */

View File

@ -41,7 +41,7 @@
#include <netdissect-stdinc.h>
#include "interface.h"
#include "netdissect.h"
/*
* Checksum routine for Internet Protocol family headers (Portable Version).

View 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"

View File

@ -19,7 +19,7 @@
#include <netdissect-stdinc.h>
#include "interface.h"
#include "netdissect.h"
#include "ipproto.h"
const struct tok ipproto_values[] = {

View File

@ -18,7 +18,7 @@
#endif
#include <netdissect-stdinc.h>
#include "interface.h"
#include "netdissect.h"
#include "l2vpn.h"
/* draft-ietf-pwe3-iana-allocation-04 */

View File

@ -42,7 +42,7 @@
#include <ctype.h>
#include <sys/types.h>
#include <interface.h>
#include "netdissect.h"
enum format_flags {
minus_flag = 1,

View File

@ -35,7 +35,7 @@
#include <stdlib.h>
#include <string.h>
#include "interface.h"
#include "netdissect.h"
char *
strdup(str)

View 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

View 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

View 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

View 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

View File

@ -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
View File

@ -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 */

View File

@ -49,7 +49,7 @@
#include <stdio.h>
#include <string.h>
#include "interface.h"
#include "netdissect.h"
#include "nfsfh.h"
/*

View File

@ -35,7 +35,6 @@
#include <netdissect-stdinc.h>
#include "netdissect.h"
#include "interface.h"
#include "addrtoname.h"
#include "print.h"

View File

@ -23,7 +23,7 @@
#include <string.h>
#include "interface.h"
#include "netdissect.h"
#include "signature.h"
#ifdef HAVE_LIBCRYPTO

View File

@ -16,7 +16,7 @@
#include <stdlib.h>
#include <string.h>
#include "interface.h"
#include "netdissect.h"
#include "extract.h"
#include "smb.h"

View 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.
*/

View File

@ -30,7 +30,7 @@
#include <stdlib.h>
#include <unistd.h>
#include "interface.h"
#include "netdissect.h"
/*
* Stock 4.3 doesn't have vfprintf.

View 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 {