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

1.1       root        1: /*
                      2:  * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
                      3:  *
                      4:  * @APPLE_LICENSE_HEADER_START@
                      5:  * 
                      6:  * The contents of this file constitute Original Code as defined in and
                      7:  * are subject to the Apple Public Source License Version 1.1 (the
                      8:  * "License").  You may not use this file except in compliance with the
                      9:  * License.  Please obtain a copy of the License at
                     10:  * http://www.apple.com/publicsource and read it before using this file.
                     11:  * 
                     12:  * This Original Code and all software distributed under the License are
                     13:  * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
                     14:  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
                     15:  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
                     16:  * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
                     17:  * License for the specific language governing rights and limitations
                     18:  * under the License.
                     19:  * 
                     20:  * @APPLE_LICENSE_HEADER_END@
                     21:  */
                     22: /*     $NetBSD: if_tun.h,v 1.5 1994/06/29 06:36:27 cgd Exp $   */
                     23: 
                     24: /*
                     25:  * Copyright (c) 1988, Julian Onions <[email protected]>
                     26:  * Nottingham University 1987.
                     27:  *
                     28:  * This source may be freely distributed, however I would be interested
                     29:  * in any changes that are made.
                     30:  *
                     31:  * This driver takes packets off the IP i/f and hands them up to a
                     32:  * user process to have its wicked way with. This driver has it's
                     33:  * roots in a similar driver written by Phil Cockcroft (formerly) at
                     34:  * UCL. This driver is based much more on read/write/select mode of
                     35:  * operation though.
                     36:  *
                     37:  */
                     38: 
                     39: #ifndef _NET_IF_TUN_H_
                     40: #define _NET_IF_TUN_H_
                     41: 
                     42: /* Refer to if_tunvar.h for the softc stuff */
                     43: 
                     44: /* Maximum transmit packet size (default) */
                     45: #define        TUNMTU          1500
                     46: 
                     47: /* Maximum receive packet size (hard limit) */
                     48: #define        TUNMRU          16384
                     49: 
                     50: struct tuninfo {
                     51:        int     baudrate;               /* linespeed */
                     52:        short   mtu;                    /* maximum transmission unit */
                     53:        u_char  type;                   /* ethernet, tokenring, etc. */
                     54:        u_char  dummy;                  /* place holder */
                     55: };
                     56: 
                     57: /* ioctl's for get/set debug */
                     58: #define        TUNSDEBUG       _IOW('t', 90, int)
                     59: #define        TUNGDEBUG       _IOR('t', 89, int)
                     60: #define        TUNSIFINFO      _IOW('t', 91, struct tuninfo)
                     61: #define        TUNGIFINFO      _IOR('t', 92, struct tuninfo)
                     62: 
                     63: #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.