From: Guy Harris Date: Thu, 5 May 2011 09:25:42 +0000 (-0700) Subject: Don't use "struct netdissect_options" in interface.h. X-Git-Tag: tcpdump-4.2.1~48 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/017bac571b9c93cdf53e8de9c68cb307fd306059 Don't use "struct netdissect_options" in interface.h. Use it in netdissect.h, where it's defined; otherwise, we get a bunch of warnings when compiling modules that include interface.h but don't yet include netdissect.h. --- diff --git a/interface.h b/interface.h index 075b78fe..1ea322ed 100644 --- a/interface.h +++ b/interface.h @@ -97,14 +97,6 @@ extern char *program_name; /* used to generate self-identifying messages */ extern int32_t thiszone; /* seconds offset from gmt to local time */ -typedef u_int (*if_ndo_printer)(struct netdissect_options *ndo, - const struct pcap_pkthdr *, const u_char *); -typedef u_int (*if_printer)(const struct pcap_pkthdr *, const u_char *); - -extern if_ndo_printer lookup_ndo_printer(int); -extern if_printer lookup_printer(int); - - /* * True if "l" bytes of "var" were captured. * diff --git a/netdissect.h b/netdissect.h index 48ff2b20..19d3394e 100644 --- a/netdissect.h +++ b/netdissect.h @@ -268,6 +268,12 @@ extern const char *dnnum_string(netdissect_options *, u_short); #include +typedef u_int (*if_ndo_printer)(struct netdissect_options *ndo, + const struct pcap_pkthdr *, const u_char *); +typedef u_int (*if_printer)(const struct pcap_pkthdr *, const u_char *); + +extern if_ndo_printer lookup_ndo_printer(int); +extern if_printer lookup_printer(int); extern void eap_print(netdissect_options *,const u_char *, u_int); extern int esp_print(netdissect_options *,