Deleted Added
full compact
if_tun.c (111748) if_tun.c (111815)
1/* $NetBSD: if_tun.c,v 1.14 1994/06/29 06:36:25 cgd Exp $ */
2
3/*
4 * Copyright (c) 1988, Julian Onions <jpo@cs.nott.ac.uk>
5 * Nottingham University 1987.
6 *
7 * This source may be freely distributed, however I would be interested
8 * in any changes that are made.
9 *
10 * This driver takes packets off the IP i/f and hands them up to a
11 * user process to have its wicked way with. This driver has it's
12 * roots in a similar driver written by Phil Cockcroft (formerly) at
13 * UCL. This driver is based much more on read/write/poll mode of
14 * operation though.
15 *
1/* $NetBSD: if_tun.c,v 1.14 1994/06/29 06:36:25 cgd Exp $ */
2
3/*
4 * Copyright (c) 1988, Julian Onions <jpo@cs.nott.ac.uk>
5 * Nottingham University 1987.
6 *
7 * This source may be freely distributed, however I would be interested
8 * in any changes that are made.
9 *
10 * This driver takes packets off the IP i/f and hands them up to a
11 * user process to have its wicked way with. This driver has it's
12 * roots in a similar driver written by Phil Cockcroft (formerly) at
13 * UCL. This driver is based much more on read/write/poll mode of
14 * operation though.
15 *
16 * $FreeBSD: head/sys/net/if_tun.c 111748 2003-03-02 16:54:40Z des $
16 * $FreeBSD: head/sys/net/if_tun.c 111815 2003-03-03 12:15:54Z phk $
17 */
18
19#include "opt_inet.h"
20#include "opt_mac.h"
21
22#include <sys/param.h>
23#include <sys/proc.h>
24#include <sys/systm.h>

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

76static d_close_t tunclose;
77static d_read_t tunread;
78static d_write_t tunwrite;
79static d_ioctl_t tunioctl;
80static d_poll_t tunpoll;
81
82#define CDEV_MAJOR 52
83static struct cdevsw tun_cdevsw = {
17 */
18
19#include "opt_inet.h"
20#include "opt_mac.h"
21
22#include <sys/param.h>
23#include <sys/proc.h>
24#include <sys/systm.h>

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

76static d_close_t tunclose;
77static d_read_t tunread;
78static d_write_t tunwrite;
79static d_ioctl_t tunioctl;
80static d_poll_t tunpoll;
81
82#define CDEV_MAJOR 52
83static struct cdevsw tun_cdevsw = {
84 /* open */ tunopen,
85 /* close */ tunclose,
86 /* read */ tunread,
87 /* write */ tunwrite,
88 /* ioctl */ tunioctl,
89 /* poll */ tunpoll,
90 /* mmap */ nommap,
91 /* strategy */ nostrategy,
92 /* name */ TUNNAME,
93 /* maj */ CDEV_MAJOR,
94 /* dump */ nodump,
95 /* psize */ nopsize,
96 /* flags */ 0,
84 .d_open = tunopen,
85 .d_close = tunclose,
86 .d_read = tunread,
87 .d_write = tunwrite,
88 .d_ioctl = tunioctl,
89 .d_poll = tunpoll,
90 .d_name = TUNNAME,
91 .d_maj = CDEV_MAJOR,
97};
98
99static void
100tunclone(void *arg, char *name, int namelen, dev_t *dev)
101{
102 struct resource *r;
103 int err;
104 int u;

--- 729 unchanged lines hidden ---
92};
93
94static void
95tunclone(void *arg, char *name, int namelen, dev_t *dev)
96{
97 struct resource *r;
98 int err;
99 int u;

--- 729 unchanged lines hidden ---