summaryrefslogtreecommitdiff
path: root/lib/libpcap
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2008-08-13 15:41:21 +0000
committerEd Schouten <ed@FreeBSD.org>2008-08-13 15:41:21 +0000
commit136600fe596c2461359ae3ee5b9c1fc379aa71d0 (patch)
tree1e922da37e301531803c58fc0415966f29b6a5bd /lib/libpcap
parentec109627bda5bb2a9e82c086d67f271d47a8e57c (diff)
downloadsrc-test-136600fe596c2461359ae3ee5b9c1fc379aa71d0.tar.gz
src-test-136600fe596c2461359ae3ee5b9c1fc379aa71d0.zip
Change bpf(4) to use the cdevpriv API.
Right now the bpf(4) driver uses the cloning API to generate /dev/bpf%u. When an application such as tcpdump needs a BPF, it opens /dev/bpf0, /dev/bpf1, etc. until it opens the first available device node. We used this approach, because our devfs implementation didn't allow per-descriptor data. Now that we can, make it use devfs_get_cdevpriv() to obtain the private data. To remain compatible with the existing implementation, add a symlink from /dev/bpf0 to /dev/bpf. I've already changed libpcap to compile with HAVE_CLONING_BPF, which makes it use /dev/bpf. There may be other applications in the base system (dhclient) that use the loop to obtain a valid bpf. Discussed on: src-committers Approved by: csjp
Notes
Notes: svn path=/head/; revision=181690
Diffstat (limited to 'lib/libpcap')
-rw-r--r--lib/libpcap/config.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libpcap/config.h b/lib/libpcap/config.h
index a96d891808381..78bb0db1fc624 100644
--- a/lib/libpcap/config.h
+++ b/lib/libpcap/config.h
@@ -15,7 +15,7 @@
/* #undef BDEBUG */
/* define if you have a cloning BPF device */
-/* #undef HAVE_CLONING_BPF */
+#define HAVE_CLONING_BPF 1
/* define if you have the DAG API */
/* #undef HAVE_DAG_API */