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.4 (Berkeley) 1/9/95
39 *
40 * $FreeBSD: head/sys/net/bpf.c 111815 2003-03-03 12:15:54Z phk $
41 */
42
43#include "opt_bpf.h"
44#include "opt_mac.h"
45#include "opt_netgraph.h"
46
47#include <sys/param.h>
48#include <sys/systm.h>
--- 67 unchanged lines hidden (view full) ---
116static d_close_t bpfclose;
117static d_read_t bpfread;
118static d_write_t bpfwrite;
119static d_ioctl_t bpfioctl;
120static d_poll_t bpfpoll;
121
122#define CDEV_MAJOR 23
123static struct cdevsw bpf_cdevsw = {
124 .d_open = bpfopen,
125 .d_close = bpfclose,
126 .d_read = bpfread,
127 .d_write = bpfwrite,
128 .d_ioctl = bpfioctl,
129 .d_poll = bpfpoll,
130 .d_name = "bpf",
131 .d_maj = CDEV_MAJOR,
132};
133
134
135static int
136bpf_movein(uio, linktype, mp, sockp, datlen)
137 struct uio *uio;
138 int linktype, *datlen;
139 struct mbuf **mp;
--- 1412 unchanged lines hidden ---
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.4 (Berkeley) 1/9/95
39 *
40 * $FreeBSD: head/sys/net/bpf.c 111815 2003-03-03 12:15:54Z phk $
41 */
42
43#include "opt_bpf.h"
44#include "opt_mac.h"
45#include "opt_netgraph.h"
46
47#include <sys/param.h>
48#include <sys/systm.h>
--- 67 unchanged lines hidden (view full) ---
116static d_close_t bpfclose;
117static d_read_t bpfread;
118static d_write_t bpfwrite;
119static d_ioctl_t bpfioctl;
120static d_poll_t bpfpoll;
121
122#define CDEV_MAJOR 23
123static struct cdevsw bpf_cdevsw = {
124 .d_open = bpfopen,
125 .d_close = bpfclose,
126 .d_read = bpfread,
127 .d_write = bpfwrite,
128 .d_ioctl = bpfioctl,
129 .d_poll = bpfpoll,
130 .d_name = "bpf",
131 .d_maj = CDEV_MAJOR,
132};
133
134
135static int
136bpf_movein(uio, linktype, mp, sockp, datlen)
137 struct uio *uio;
138 int linktype, *datlen;
139 struct mbuf **mp;
--- 1412 unchanged lines hidden ---