Deleted Added
full compact
if_tun.c (222651) if_tun.c (223741)
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 222651 2011-06-03 13:47:05Z jhb $
16 * $FreeBSD: head/sys/net/if_tun.c 223741 2011-07-03 16:08:38Z bz $
17 */
18
19#include "opt_atalk.h"
20#include "opt_inet.h"
21#include "opt_inet6.h"
22#include "opt_ipx.h"
23
24#include <sys/param.h>

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

924 return (EAFNOSUPPORT);
925 }
926 /* First chunk of an mbuf contains good junk */
927 if (harvest.point_to_point)
928 random_harvest(m, 16, 3, 0, RANDOM_NET);
929 ifp->if_ibytes += m->m_pkthdr.len;
930 ifp->if_ipackets++;
931 CURVNET_SET(ifp->if_vnet);
17 */
18
19#include "opt_atalk.h"
20#include "opt_inet.h"
21#include "opt_inet6.h"
22#include "opt_ipx.h"
23
24#include <sys/param.h>

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

924 return (EAFNOSUPPORT);
925 }
926 /* First chunk of an mbuf contains good junk */
927 if (harvest.point_to_point)
928 random_harvest(m, 16, 3, 0, RANDOM_NET);
929 ifp->if_ibytes += m->m_pkthdr.len;
930 ifp->if_ipackets++;
931 CURVNET_SET(ifp->if_vnet);
932 M_SETFIB(m, ifp->if_fib);
932 netisr_dispatch(isr, m);
933 CURVNET_RESTORE();
934 return (0);
935}
936
937/*
938 * tunpoll - the poll interface, this is only useful on reads
939 * really. The write detect always returns true, write never blocks

--- 111 unchanged lines hidden ---
933 netisr_dispatch(isr, m);
934 CURVNET_RESTORE();
935 return (0);
936}
937
938/*
939 * tunpoll - the poll interface, this is only useful on reads
940 * really. The write detect always returns true, write never blocks

--- 111 unchanged lines hidden ---