if_tun.c (255471) | if_tun.c (256008) |
---|---|
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 255471 2013-09-11 09:19:44Z glebius $ | 16 * $FreeBSD: head/sys/net/if_tun.c 256008 2013-10-02 20:44:36Z glebius $ |
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> --- 228 unchanged lines hidden (view full) --- 253 254 CURVNET_SET(TUN2IFP(tp)->if_vnet); 255 dev = tp->tun_dev; 256 bpfdetach(TUN2IFP(tp)); 257 if_detach(TUN2IFP(tp)); 258 if_free(TUN2IFP(tp)); 259 destroy_dev(dev); 260 seldrain(&tp->tun_rsel); | 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> --- 228 unchanged lines hidden (view full) --- 253 254 CURVNET_SET(TUN2IFP(tp)->if_vnet); 255 dev = tp->tun_dev; 256 bpfdetach(TUN2IFP(tp)); 257 if_detach(TUN2IFP(tp)); 258 if_free(TUN2IFP(tp)); 259 destroy_dev(dev); 260 seldrain(&tp->tun_rsel); |
261 knlist_clear(&tp->tun_rsel.si_note, 0); |
|
261 knlist_destroy(&tp->tun_rsel.si_note); 262 mtx_destroy(&tp->tun_mtx); 263 cv_destroy(&tp->tun_cv); 264 free(tp, M_TUN); 265 CURVNET_RESTORE(); 266} 267 268static void --- 775 unchanged lines hidden --- | 262 knlist_destroy(&tp->tun_rsel.si_note); 263 mtx_destroy(&tp->tun_mtx); 264 cv_destroy(&tp->tun_cv); 265 free(tp, M_TUN); 266 CURVNET_RESTORE(); 267} 268 269static void --- 775 unchanged lines hidden --- |