xref: /freebsd/sys/net/if_tap.h (revision 0dbac71f19a98bf691dfc26d7af1eb1b5a40a86d)
1c398230bSWarner Losh /*-
2fe267a55SPedro F. Giffuni  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3fe267a55SPedro F. Giffuni  *
4a5213f14SNick Sayer  * Copyright (C) 1999-2000 by Maksim Yevmenkin <m_evmenkin@yahoo.com>
5a5213f14SNick Sayer  * All rights reserved.
6a5213f14SNick Sayer  *
7a5213f14SNick Sayer  * Redistribution and use in source and binary forms, with or without
8a5213f14SNick Sayer  * modification, are permitted provided that the following conditions
9a5213f14SNick Sayer  * are met:
10a5213f14SNick Sayer  * 1. Redistributions of source code must retain the above copyright
11a5213f14SNick Sayer  *    notice, this list of conditions and the following disclaimer.
12a5213f14SNick Sayer  * 2. Redistributions in binary form must reproduce the above copyright
13a5213f14SNick Sayer  *    notice, this list of conditions and the following disclaimer in the
14a5213f14SNick Sayer  *    documentation and/or other materials provided with the distribution.
15a5213f14SNick Sayer  *
16a5213f14SNick Sayer  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17a5213f14SNick Sayer  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18a5213f14SNick Sayer  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19a5213f14SNick Sayer  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20a5213f14SNick Sayer  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21a5213f14SNick Sayer  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22a5213f14SNick Sayer  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23a5213f14SNick Sayer  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24a5213f14SNick Sayer  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25a5213f14SNick Sayer  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26a5213f14SNick Sayer  * SUCH DAMAGE.
27a5213f14SNick Sayer  *
28a5213f14SNick Sayer  * BASED ON:
29a5213f14SNick Sayer  * -------------------------------------------------------------------------
30a5213f14SNick Sayer  *
31a5213f14SNick Sayer  * Copyright (c) 1988, Julian Onions <jpo@cs.nott.ac.uk>
32a5213f14SNick Sayer  * Nottingham University 1987.
33a5213f14SNick Sayer  */
34a5213f14SNick Sayer 
35a5213f14SNick Sayer /*
36a5213f14SNick Sayer  * $FreeBSD$
37a5213f14SNick Sayer  * $Id: if_tap.h,v 0.7 2000/07/12 04:12:51 max Exp $
38a5213f14SNick Sayer  */
39a5213f14SNick Sayer 
40a5213f14SNick Sayer #ifndef _NET_IF_TAP_H_
41a5213f14SNick Sayer #define _NET_IF_TAP_H_
42a5213f14SNick Sayer 
43251a32b5SKyle Evans #include <net/if_tun.h>
44a5213f14SNick Sayer 
45a5213f14SNick Sayer /* maximum receive packet size (hard limit) */
46a5213f14SNick Sayer #define	TAPMRU		16384
47a5213f14SNick Sayer 
48251a32b5SKyle Evans #define	tapinfo		tuninfo
49a5213f14SNick Sayer 
50251a32b5SKyle Evans /*
51251a32b5SKyle Evans  * ioctl's for get/set debug; these are aliases of TUN* ioctls, see net/if_tun.h
52251a32b5SKyle Evans  * for details.
53251a32b5SKyle Evans  */
54251a32b5SKyle Evans #define	TAPSDEBUG		TUNSDEBUG
55251a32b5SKyle Evans #define	TAPGDEBUG		TUNGDEBUG
56251a32b5SKyle Evans #define	TAPSIFINFO		TUNSIFINFO
57251a32b5SKyle Evans #define	TAPGIFINFO		TUNGIFINFO
58*0dbac71fSKyle Evans #define	TAPGIFNAME		TUNGIFNAME
59a5213f14SNick Sayer 
60a5213f14SNick Sayer /* VMware ioctl's */
619fddcc66SRuslan Ermilov #define VMIO_SIOCSIFFLAGS	_IOWINT('V', 0)
62a5213f14SNick Sayer #define VMIO_SIOCSKEEP		_IO('V', 1)
63a5213f14SNick Sayer #define VMIO_SIOCSIFBR		_IO('V', 2)
64a5213f14SNick Sayer #define VMIO_SIOCSLADRF		_IO('V', 3)
65a5213f14SNick Sayer 
66a5213f14SNick Sayer /* XXX -- unimplemented */
67a5213f14SNick Sayer #define VMIO_SIOCSETMACADDR	_IO('V', 4)
68a5213f14SNick Sayer 
69a5213f14SNick Sayer /* XXX -- not used? */
70a5213f14SNick Sayer #define VMIO_SIOCPORT		_IO('V', 5)
71a5213f14SNick Sayer #define VMIO_SIOCBRIDGE		_IO('V', 6)
72a5213f14SNick Sayer #define VMIO_SIOCNETIF		_IO('V', 7)
73a5213f14SNick Sayer 
74a5213f14SNick Sayer #endif /* !_NET_IF_TAP_H_ */
75