xref: /freebsd/sys/net/if_tap.h (revision 2ff63af9b88c7413b7d71715b5532625752a248e)
1c398230bSWarner Losh /*-
2*4d846d26SWarner Losh  * SPDX-License-Identifier: BSD-2-Clause
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  * $Id: if_tap.h,v 0.7 2000/07/12 04:12:51 max Exp $
37a5213f14SNick Sayer  */
38a5213f14SNick Sayer 
39a5213f14SNick Sayer #ifndef _NET_IF_TAP_H_
40a5213f14SNick Sayer #define _NET_IF_TAP_H_
41a5213f14SNick Sayer 
42251a32b5SKyle Evans #include <net/if_tun.h>
43a5213f14SNick Sayer 
44a5213f14SNick Sayer /* maximum receive packet size (hard limit) */
45f8bc74e2SVincenzo Maffione #define	TAPMRU		65535
46a5213f14SNick Sayer 
47251a32b5SKyle Evans #define	tapinfo		tuninfo
48a5213f14SNick Sayer 
49251a32b5SKyle Evans /*
50251a32b5SKyle Evans  * ioctl's for get/set debug; these are aliases of TUN* ioctls, see net/if_tun.h
51251a32b5SKyle Evans  * for details.
52251a32b5SKyle Evans  */
53251a32b5SKyle Evans #define	TAPSDEBUG		TUNSDEBUG
54251a32b5SKyle Evans #define	TAPGDEBUG		TUNGDEBUG
55251a32b5SKyle Evans #define	TAPSIFINFO		TUNSIFINFO
56251a32b5SKyle Evans #define	TAPGIFINFO		TUNGIFINFO
570dbac71fSKyle Evans #define	TAPGIFNAME		TUNGIFNAME
58f8bc74e2SVincenzo Maffione #define	TAPSVNETHDR		_IOW('t', 91, int)
59f8bc74e2SVincenzo Maffione #define	TAPGVNETHDR		_IOR('t', 94, int)
60a5213f14SNick Sayer 
61a5213f14SNick Sayer /* VMware ioctl's */
629fddcc66SRuslan Ermilov #define VMIO_SIOCSIFFLAGS	_IOWINT('V', 0)
63a5213f14SNick Sayer #define VMIO_SIOCSKEEP		_IO('V', 1)
64a5213f14SNick Sayer #define VMIO_SIOCSIFBR		_IO('V', 2)
65a5213f14SNick Sayer #define VMIO_SIOCSLADRF		_IO('V', 3)
66a5213f14SNick Sayer 
67a5213f14SNick Sayer /* XXX -- unimplemented */
68a5213f14SNick Sayer #define VMIO_SIOCSETMACADDR	_IO('V', 4)
69a5213f14SNick Sayer 
70a5213f14SNick Sayer /* XXX -- not used? */
71a5213f14SNick Sayer #define VMIO_SIOCPORT		_IO('V', 5)
72a5213f14SNick Sayer #define VMIO_SIOCBRIDGE		_IO('V', 6)
73a5213f14SNick Sayer #define VMIO_SIOCNETIF		_IO('V', 7)
74a5213f14SNick Sayer 
75a5213f14SNick Sayer #endif /* !_NET_IF_TAP_H_ */
76