aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2021-01-01 18:13:18 -0800
committerGuy Harris <gharris@sonic.net>2021-01-01 18:13:18 -0800
commit27aaa1c208456f376c480be675b5995ff39b5db4 (patch)
treebed910d3558b47193baf799a92eb5752eff2cb9e
parentd696dbffd7f7a8e2da486f7711231d521f8c94a7 (diff)
Rename struct bpf_aux_data to avoid NetBSD compile errors.
NetBSD 9.0 defines struct bpf_aux_data in net/bpf.h; that gets included by pcap-bpf.c, along with pcap-int.h, which causes a collision.
-rw-r--r--bpf_filter.c4
-rw-r--r--pcap-int.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/bpf_filter.c b/bpf_filter.c
index 22d25587..8691d0d1 100644
--- a/bpf_filter.c
+++ b/bpf_filter.c
@@ -87,11 +87,11 @@ enum {
#if defined(SKF_AD_VLAN_TAG_PRESENT)
u_int
pcap_filter_with_aux_data(const struct bpf_insn *pc, const u_char *p,
- u_int wirelen, u_int buflen, const struct bpf_aux_data *aux_data)
+ u_int wirelen, u_int buflen, const struct pcap_bpf_aux_data *aux_data)
#else
u_int
pcap_filter_with_aux_data(const struct bpf_insn *pc, const u_char *p,
- u_int wirelen, u_int buflen, const struct bpf_aux_data *aux_data _U_)
+ u_int wirelen, u_int buflen, const struct pcap_bpf_aux_data *aux_data _U_)
#endif
{
register uint32_t A, X;
diff --git a/pcap-int.h b/pcap-int.h
index 3c18dae8..febac031 100644
--- a/pcap-int.h
+++ b/pcap-int.h
@@ -592,7 +592,7 @@ pcap_funcptr_t pcap_find_function(pcap_code_handle_t, const char *);
* Linux kernel when the kernel rejects the filter (requiring us to
* run it in userland). It contains VLAN tag information.
*/
-struct bpf_aux_data {
+struct pcap_bpf_aux_data {
u_short vlan_tag_present;
u_short vlan_tag;
};
@@ -602,7 +602,7 @@ struct bpf_aux_data {
* argument.
*/
u_int pcap_filter_with_aux_data(const struct bpf_insn *,
- const u_char *, u_int, u_int, const struct bpf_aux_data *);
+ const u_char *, u_int, u_int, const struct pcap_bpf_aux_data *);
/*
* Filtering routine that doesn't.