From owner-cvs-src@FreeBSD.ORG Wed Aug 13 15:45:47 2008 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 79E991065678; Wed, 13 Aug 2008 15:45:47 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 73F138FC12; Wed, 13 Aug 2008 15:45:47 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.2/8.14.2) with ESMTP id m7DFjlR0058987; Wed, 13 Aug 2008 15:45:47 GMT (envelope-from ed@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.2/8.14.1/Submit) id m7DFjlLP058986; Wed, 13 Aug 2008 15:45:47 GMT (envelope-from ed@repoman.freebsd.org) Message-Id: <200808131545.m7DFjlLP058986@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to ed@repoman.freebsd.org using -f From: Ed Schouten Date: Wed, 13 Aug 2008 15:41:21 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/lib/libpcap config.h src/sys/net bpf.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Aug 2008 15:45:47 -0000 ed 2008-08-13 15:41:21 UTC FreeBSD src repository Modified files: lib/libpcap config.h sys/net bpf.c Log: SVN rev 181690 on 2008-08-13 15:41:21Z by ed 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 Revision Changes Path 1.7 +1 -1 src/lib/libpcap/config.h 1.200 +62 -80 src/sys/net/bpf.c