if_tun.c (144389) | if_tun.c (145883) |
---|---|
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 144389 2005-03-31 12:19:44Z phk $ | 16 * $FreeBSD: head/sys/net/if_tun.c 145883 2005-05-04 18:55:03Z emax $ |
17 */ 18 19#include "opt_atalk.h" 20#include "opt_inet.h" 21#include "opt_inet6.h" 22#include "opt_ipx.h" 23#include "opt_mac.h" 24 --- 731 unchanged lines hidden (view full) --- 756 if (uio->uio_resid == 0) 757 return (0); 758 759 if (uio->uio_resid < 0 || uio->uio_resid > TUNMRU) { 760 TUNDEBUG(ifp, "len=%d!\n", uio->uio_resid); 761 return (EIO); 762 } 763 | 17 */ 18 19#include "opt_atalk.h" 20#include "opt_inet.h" 21#include "opt_inet6.h" 22#include "opt_ipx.h" 23#include "opt_mac.h" 24 --- 731 unchanged lines hidden (view full) --- 756 if (uio->uio_resid == 0) 757 return (0); 758 759 if (uio->uio_resid < 0 || uio->uio_resid > TUNMRU) { 760 TUNDEBUG(ifp, "len=%d!\n", uio->uio_resid); 761 return (EIO); 762 } 763 |
764 if ((m = m_uiotombuf(uio, M_DONTWAIT, 0)) == NULL) { | 764 if ((m = m_uiotombuf(uio, M_DONTWAIT, 0, 0)) == NULL) { |
765 ifp->if_ierrors++; 766 return (error); 767 } 768 769 m->m_pkthdr.rcvif = ifp; 770#ifdef MAC 771 mac_create_mbuf_from_ifnet(ifp, m); 772#endif --- 86 unchanged lines hidden --- | 765 ifp->if_ierrors++; 766 return (error); 767 } 768 769 m->m_pkthdr.rcvif = ifp; 770#ifdef MAC 771 mac_create_mbuf_from_ifnet(ifp, m); 772#endif --- 86 unchanged lines hidden --- |