aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/bpf.h
diff options
context:
space:
mode:
Diffstat (limited to 'wiretap/bpf.h')
-rw-r--r--wiretap/bpf.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/wiretap/bpf.h b/wiretap/bpf.h
new file mode 100644
index 0000000000..81b8572873
--- /dev/null
+++ b/wiretap/bpf.h
@@ -0,0 +1,22 @@
+
+/* we limit the number of BPF records a jmp can take by using a few of the
+ * jmp values as special identifiers during the compilation process. Many
+ * pieces of code need to jump to the end of the entire BPF block, returing
+ * either a successful value or a failure value (either the number of bytes
+ * to read, or 0). The code creator uses these 4 variables to represent
+ * the retval of failure or success, then the code cleaner fills in the
+ * true value for these variables.
+ */
+#define NO_LABEL 255
+#define END_OF_PROGRAM_FAILURE 254
+#define END_OF_PROGRAM_SUCCESS 253
+#define NEXT_BLOCK 252
+
+void
+wtap_filter_bpf_init(void);
+
+void
+wtap_filter_offline_init(wtap *wth);
+
+void
+wtap_filter_offline_clear(wtap *wth);