aboutsummaryrefslogtreecommitdiff
path: root/pcap-int.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-08-31 19:53:01 -0700
committerGuy Harris <guy@alum.mit.edu>2018-08-31 19:53:17 -0700
commit225af6c3e8ca2fc63f20761db87af801b83d26da (patch)
treecf3c43baaac4367522768432c9ade4b6900caa4d /pcap-int.h
parenta69f42f7873db778613bbd5c4238acc2d0c31c89 (diff)
Don't put bpf_filter_with_aux_data() in a public header file.
Don't put struct bpf_aux_data there, either. bpf_filter_with_aux_data() is an internal-only routine, and struct bpf_aux_data is a data structure subject to change in the future; don't make them public, so that we *can* change it in the future without having to worry about breaking APIs or ABIs. (Note to any upstream packager of libpcap: if you've made it public, so that it's exported by a shared libary, that was a mistake, so undo it.)
Diffstat (limited to 'pcap-int.h')
-rw-r--r--pcap-int.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/pcap-int.h b/pcap-int.h
index 21036822..ca204b4d 100644
--- a/pcap-int.h
+++ b/pcap-int.h
@@ -479,6 +479,28 @@ pcap_t *pcap_open_offline_common(char *ebuf, size_t size);
void sf_cleanup(pcap_t *p);
/*
+ * Internal interfaces for doing user-mode filtering of packets and
+ * validating filter programs.
+ */
+/*
+ * Auxiliary data, for use when interpreting a filter intended for the
+ * Linux kernel when the kernel rejects the filter (requiring us to
+ * run it in userland). It contains VLAN tag information.
+ */
+struct bpf_aux_data {
+ u_short vlan_tag_present;
+ u_short vlan_tag;
+};
+
+/*
+ * Filtering routine that takes the auxiliary data as an additional
+ * argument.
+ */
+extern u_int bpf_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);
+
+/*
* Internal interfaces for both "pcap_create()" and routines that
* open savefiles.
*