summaryrefslogtreecommitdiffstats
path: root/sys/net/bpf.h
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2003-01-20 19:08:46 +0000
committersam <sam@FreeBSD.org>2003-01-20 19:08:46 +0000
commite74e7998d85e20fd5058a68774726109a7e871c3 (patch)
tree51dc91b693b58616b22b6d7ee57801e66b2f868c /sys/net/bpf.h
parent63b49e34b0350fa2f80e80e3a4c3b6adb875d9bb (diff)
downloadFreeBSD-src-e74e7998d85e20fd5058a68774726109a7e871c3.zip
FreeBSD-src-e74e7998d85e20fd5058a68774726109a7e871c3.tar.gz
o add BIOCGDLTLIST and BIOCSDLT ioctls to get the data link type list
and set the link type for use by libpcap and tcpdump o move mtx unlock in bpfdetach up; it doesn't need to be held so long o change printf in bpf_detach to distinguish it from the same one in bpfsetdlt Note there are locking issues here related to ioctl processing; they have not been addressed here. Submitted by: Guy Harris <guy@alum.mit.edu> Obtained from: NetBSD (w/ locking modifications)
Diffstat (limited to 'sys/net/bpf.h')
-rw-r--r--sys/net/bpf.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/net/bpf.h b/sys/net/bpf.h
index 5e931ce..6d3e800 100644
--- a/sys/net/bpf.h
+++ b/sys/net/bpf.h
@@ -115,6 +115,8 @@ struct bpf_version {
#define BIOCSHDRCMPLT _IOW('B',117, u_int)
#define BIOCGSEESENT _IOR('B',118, u_int)
#define BIOCSSEESENT _IOW('B',119, u_int)
+#define BIOCSDLT _IOW('B',120, u_int)
+#define BIOCGDLTLIST _IOWR('B',121, struct bpf_dltlist)
/*
* Structure prepended to each packet.
@@ -339,6 +341,14 @@ struct bpf_insn {
#define BPF_STMT(code, k) { (u_short)(code), 0, 0, k }
#define BPF_JUMP(code, k, jt, jf) { (u_short)(code), jt, jf, k }
+/*
+ * Structure to retrieve available DLTs for the interface.
+ */
+struct bpf_dltlist {
+ u_int bfl_len; /* number of bfd_list array */
+ u_int *bfl_list; /* array of DLTs */
+};
+
#ifdef _KERNEL
struct bpf_if;
int bpf_validate(const struct bpf_insn *, int);
OpenPOWER on IntegriCloud