if_tun.c (256008) | if_tun.c (256377) |
---|---|
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 256008 2013-10-02 20:44:36Z glebius $ | 16 * $FreeBSD: head/sys/net/if_tun.c 256377 2013-10-12 12:57:57Z markm $ |
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> --- 888 unchanged lines hidden (view full) --- 913 isr = NETISR_ATALK2; 914 break; 915#endif 916 default: 917 m_freem(m); 918 return (EAFNOSUPPORT); 919 } 920 if (harvest.point_to_point) | 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> --- 888 unchanged lines hidden (view full) --- 913 isr = NETISR_ATALK2; 914 break; 915#endif 916 default: 917 m_freem(m); 918 return (EAFNOSUPPORT); 919 } 920 if (harvest.point_to_point) |
921 random_harvest(&(m->m_data), 12, 3, 0, RANDOM_NET_TUN); | 921 random_harvest(&(m->m_data), 12, 2, RANDOM_NET_TUN); |
922 ifp->if_ibytes += m->m_pkthdr.len; 923 ifp->if_ipackets++; 924 CURVNET_SET(ifp->if_vnet); 925 M_SETFIB(m, ifp->if_fib); 926 netisr_dispatch(isr, m); 927 CURVNET_RESTORE(); 928 return (0); 929} --- 115 unchanged lines hidden --- | 922 ifp->if_ibytes += m->m_pkthdr.len; 923 ifp->if_ipackets++; 924 CURVNET_SET(ifp->if_vnet); 925 M_SETFIB(m, ifp->if_fib); 926 netisr_dispatch(isr, m); 927 CURVNET_RESTORE(); 928 return (0); 929} --- 115 unchanged lines hidden --- |