]> git.saurik.com Git - apple/xnu.git/blob - bsd/net/if_tun.h
xnu-344.26.tar.gz
[apple/xnu.git] / bsd / net / if_tun.h
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 <jpo@cs.nott.ac.uk>
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 #include <sys/appleapiopts.h>
42 #ifdef __APPLE_API_PRIVATE
43
44 /* Refer to if_tunvar.h for the softc stuff */
45
46 /* Maximum transmit packet size (default) */
47 #define TUNMTU 1500
48
49 /* Maximum receive packet size (hard limit) */
50 #define TUNMRU 16384
51
52 struct tuninfo {
53 int baudrate; /* linespeed */
54 short mtu; /* maximum transmission unit */
55 u_char type; /* ethernet, tokenring, etc. */
56 u_char dummy; /* place holder */
57 };
58
59 /* ioctl's for get/set debug */
60 #define TUNSDEBUG _IOW('t', 90, int)
61 #define TUNGDEBUG _IOR('t', 89, int)
62 #define TUNSIFINFO _IOW('t', 91, struct tuninfo)
63 #define TUNGIFINFO _IOR('t', 92, struct tuninfo)
64
65 #endif /* __APPLE_API_PRIVATE */
66 #endif /* !_NET_IF_TUN_H_ */