Deleted Added
full compact
if_tun.c (51709) if_tun.c (56349)
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 51709 1999-09-27 00:55:29Z peter $
16 * $FreeBSD: head/sys/net/if_tun.c 56349 2000-01-21 00:31:43Z brian $
17 */
18
19#include "opt_inet.h"
20
21#include <sys/param.h>
22#include <sys/proc.h>
23#include <sys/systm.h>
24#include <sys/mbuf.h>

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

456 case IFF_BROADCAST:
457 tp->tun_if.if_flags &= ~IFF_POINTOPOINT;
458 tp->tun_if.if_flags |= IFF_BROADCAST;
459 break;
460 default:
461 return(EINVAL);
462 }
463 break;
17 */
18
19#include "opt_inet.h"
20
21#include <sys/param.h>
22#include <sys/proc.h>
23#include <sys/systm.h>
24#include <sys/mbuf.h>

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

456 case IFF_BROADCAST:
457 tp->tun_if.if_flags &= ~IFF_POINTOPOINT;
458 tp->tun_if.if_flags |= IFF_BROADCAST;
459 break;
460 default:
461 return(EINVAL);
462 }
463 break;
464 case TUNSIFPID:
465 tp->tun_pid = curproc->p_pid;
466 break;
464 case FIONBIO:
465 break;
466 case FIOASYNC:
467 if (*(int *)data)
468 tp->tun_flags |= TUN_ASYNC;
469 else
470 tp->tun_flags &= ~TUN_ASYNC;
471 break;

--- 219 unchanged lines hidden ---
467 case FIONBIO:
468 break;
469 case FIOASYNC:
470 if (*(int *)data)
471 tp->tun_flags |= TUN_ASYNC;
472 else
473 tp->tun_flags &= ~TUN_ASYNC;
474 break;

--- 219 unchanged lines hidden ---