bpf.c (47625) | bpf.c (47640) |
---|---|
1/* 2 * Copyright (c) 1990, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from the Stanford/CMU enet packet filter, 6 * (net/enet.c) distributed as part of 4.3BSD, and code contributed 7 * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence 8 * Berkeley Laboratory. --- 23 unchanged lines hidden (view full) --- 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)bpf.c 8.2 (Berkeley) 3/28/94 39 * | 1/* 2 * Copyright (c) 1990, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from the Stanford/CMU enet packet filter, 6 * (net/enet.c) distributed as part of 4.3BSD, and code contributed 7 * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence 8 * Berkeley Laboratory. --- 23 unchanged lines hidden (view full) --- 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)bpf.c 8.2 (Berkeley) 3/28/94 39 * |
40 * $Id: bpf.c,v 1.49 1999/04/28 11:37:30 phk Exp $ | 40 * $Id: bpf.c,v 1.50 1999/05/30 16:53:04 phk Exp $ |
41 */ 42 43#include "bpfilter.h" 44 45#ifndef __GNUC__ 46#define inline 47#else 48#define inline __inline --- 1252 unchanged lines hidden (view full) --- 1301 1302static int bpf_devsw_installed; 1303 1304static void bpf_drvinit __P((void *unused)); 1305static void 1306bpf_drvinit(unused) 1307 void *unused; 1308{ | 41 */ 42 43#include "bpfilter.h" 44 45#ifndef __GNUC__ 46#define inline 47#else 48#define inline __inline --- 1252 unchanged lines hidden (view full) --- 1301 1302static int bpf_devsw_installed; 1303 1304static void bpf_drvinit __P((void *unused)); 1305static void 1306bpf_drvinit(unused) 1307 void *unused; 1308{ |
1309 dev_t dev; | |
1310#ifdef DEVFS 1311 int i; 1312#endif 1313 1314 if( ! bpf_devsw_installed ) { | 1309#ifdef DEVFS 1310 int i; 1311#endif 1312 1313 if( ! bpf_devsw_installed ) { |
1315 dev = makedev(CDEV_MAJOR, 0); 1316 cdevsw_add(&dev,&bpf_cdevsw, NULL); | 1314 cdevsw_add(&bpf_cdevsw); |
1317 bpf_devsw_installed = 1; 1318#ifdef DEVFS 1319 1320 for ( i = 0 ; i < NBPFILTER ; i++ ) { 1321 bpf_devfs_token[i] = 1322 devfs_add_devswf(&bpf_cdevsw, i, DV_CHR, 0, 0, 1323 0600, "bpf%d", i); 1324 } --- 47 unchanged lines hidden --- | 1315 bpf_devsw_installed = 1; 1316#ifdef DEVFS 1317 1318 for ( i = 0 ; i < NBPFILTER ; i++ ) { 1319 bpf_devfs_token[i] = 1320 devfs_add_devswf(&bpf_cdevsw, i, DV_CHR, 0, 0, 1321 0600, "bpf%d", i); 1322 } --- 47 unchanged lines hidden --- |