The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/net/if_tun.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*      $NetBSD: if_tun.h,v 1.15 2006/04/04 11:23:59 rpaulo 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 it's 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/select mode of
   14  * operation though.
   15  *
   16  * from: Header: if_tnreg.h,v 1.1.2.1 1992/07/16 22:39:16 friedl Exp
   17  */
   18 
   19 #ifndef _NET_IF_TUN_H_
   20 #define _NET_IF_TUN_H_
   21 
   22 #ifdef _KERNEL
   23 struct tun_softc {
   24         struct  ifnet tun_if;           /* the interface */
   25 
   26         u_short tun_flags;              /* misc flags */
   27 #define TUN_OPEN        0x0001
   28 #define TUN_INITED      0x0002
   29 #define TUN_RCOLL       0x0004
   30 #define TUN_IASET       0x0008
   31 #define TUN_DSTADDR     0x0010
   32 #define TUN_RWAIT       0x0040
   33 #define TUN_ASYNC       0x0080
   34 #define TUN_NBIO        0x0100
   35 #define TUN_PREPADDR    0x0200
   36 #define TUN_IFHEAD      0x0400
   37 
   38 #define TUN_READY       (TUN_OPEN | TUN_INITED | TUN_IASET)
   39 
   40         pid_t   tun_pgid;               /* PID or process group ID */
   41         struct  selinfo tun_rsel;       /* read select */
   42         struct  selinfo tun_wsel;       /* write select (not used) */
   43         int     tun_unit;               /* the tunnel unit number */
   44         struct  simplelock tun_lock;    /* lock for this tunnel */
   45         LIST_ENTRY(tun_softc) tun_list; /* list of all tuns */
   46 };
   47 #endif  /* _KERNEL */
   48 
   49 /* Maximum packet size */
   50 #define TUNMTU          1500
   51 
   52 /* ioctl's for get/set debug */
   53 #define TUNSDEBUG       _IOW('t', 90, int)
   54 #define TUNGDEBUG       _IOR('t', 89, int)
   55 #define TUNSIFMODE      _IOW('t', 88, int)
   56 #define TUNSLMODE       _IOW('t', 87, int)
   57 #define TUNSIFHEAD      _IOW('t', 66, int)
   58 #define TUNGIFHEAD      _IOR('t', 65, int)
   59 
   60 #endif /* !_NET_IF_TUN_H_ */

Cache object: ebe4ac667e5ac7083d5c36514eace3cf


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.