bpf.c (bcf11e8d0048006ba97cb460a134cc23290428b2) bpf.c (d8b0556c6dcaf4c506039f86af2b52b29524f89e)
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.

--- 634 unchanged lines hidden (view full) ---

643 d->bd_direction = BPF_D_INOUT;
644 d->bd_pid = td->td_proc->p_pid;
645#ifdef MAC
646 mac_bpfdesc_init(d);
647 mac_bpfdesc_create(td->td_ucred, d);
648#endif
649 mtx_init(&d->bd_mtx, devtoname(dev), "bpf cdev lock", MTX_DEF);
650 callout_init(&d->bd_callout, CALLOUT_MPSAFE);
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.

--- 634 unchanged lines hidden (view full) ---

643 d->bd_direction = BPF_D_INOUT;
644 d->bd_pid = td->td_proc->p_pid;
645#ifdef MAC
646 mac_bpfdesc_init(d);
647 mac_bpfdesc_create(td->td_ucred, d);
648#endif
649 mtx_init(&d->bd_mtx, devtoname(dev), "bpf cdev lock", MTX_DEF);
650 callout_init(&d->bd_callout, CALLOUT_MPSAFE);
651 knlist_init(&d->bd_sel.si_note, &d->bd_mtx, NULL, NULL, NULL);
651 knlist_init_mtx(&d->bd_sel.si_note, &d->bd_mtx);
652
653 return (0);
654}
655
656/*
657 * bpfread - read next chunk of packets from buffers
658 */
659static int

--- 1508 unchanged lines hidden ---
652
653 return (0);
654}
655
656/*
657 * bpfread - read next chunk of packets from buffers
658 */
659static int

--- 1508 unchanged lines hidden ---