Annotation of kernel/bsd/net/if_tun.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
                      3:  *
                      4:  * @APPLE_LICENSE_HEADER_START@
                      5:  * 
                      6:  * Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
                      7:  * Reserved.  This file contains Original Code and/or Modifications of
                      8:  * Original Code as defined in and that are subject to the Apple Public
                      9:  * Source License Version 1.1 (the "License").  You may not use this file
                     10:  * except in compliance with the License.  Please obtain a copy of the
                     11:  * License at http://www.apple.com/publicsource and read it before using
                     12:  * this file.
                     13:  * 
                     14:  * The Original Code and all software distributed under the License are
                     15:  * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
                     16:  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
                     17:  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
                     18:  * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
                     19:  * License for the specific language governing rights and limitations
                     20:  * under the License.
                     21:  * 
                     22:  * @APPLE_LICENSE_HEADER_END@
                     23:  */
                     24: 
                     25: /* Copyright (c) 1997 Apple Computer, Inc. All Rights Reserved */
                     26: /*
                     27:  * Copyright (c) 1988, Julian Onions <[email protected]>
                     28:  * Nottingham University 1987.
                     29:  *
                     30:  * This source may be freely distributed, however I would be interested
                     31:  * in any changes that are made.
                     32:  *
                     33:  * This driver takes packets off the IP i/f and hands them up to a
                     34:  * user process to have it's wicked way with. This driver has it's
                     35:  * roots in a similar driver written by Phil Cockcroft (formerly) at
                     36:  * UCL. This driver is based much more on read/write/select mode of
                     37:  * operation though.
                     38:  *
                     39:  */
                     40: 
                     41: #ifndef _NET_IF_TUN_H_
                     42: #define _NET_IF_TUN_H_
                     43: 
                     44: struct tun_softc {
                     45:        u_short tun_flags;              /* misc flags */
                     46: #define        TUN_OPEN        0x0001
                     47: #define        TUN_INITED      0x0002
                     48: #define        TUN_RCOLL       0x0004
                     49: #define        TUN_IASET       0x0008
                     50: #define        TUN_DSTADDR     0x0010
                     51: #define        TUN_RWAIT       0x0040
                     52: #define        TUN_ASYNC       0x0080
                     53: #define        TUN_NBIO        0x0100
                     54: 
                     55: #define        TUN_READY       (TUN_OPEN | TUN_INITED | TUN_IASET)
                     56: 
                     57:        struct  ifnet tun_if;           /* the interface */
                     58:        int     tun_pgrp;               /* the process group - if any */
                     59:        struct  selinfo tun_rsel;       /* read select */
                     60:        struct  selinfo tun_wsel;       /* write select (not used) */
                     61: #if NBPFILTER > 0
                     62:        caddr_t         tun_bpf;
                     63: #endif
                     64: };
                     65: 
                     66: /* Maximum packet size */
                     67: #define        TUNMTU          1500
                     68: 
                     69: /* ioctl's for get/set debug */
                     70: #define        TUNSDEBUG       _IOW('t', 90, int)
                     71: #define        TUNGDEBUG       _IOR('t', 89, int)
                     72: 
                     73: #endif /* !_NET_IF_TUN_H_ */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.