xref: /dflybsd-src/contrib/libpcap/pcap/vlan.h (revision 3a289941c307ff3d45415fd0d643fa7c8a113dff)
1a85e14b0SPeter Avalos /*-
2a85e14b0SPeter Avalos  * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
3a85e14b0SPeter Avalos  *	The Regents of the University of California.  All rights reserved.
4a85e14b0SPeter Avalos  *
5a85e14b0SPeter Avalos  * Redistribution and use in source and binary forms, with or without
6a85e14b0SPeter Avalos  * modification, are permitted provided that the following conditions
7a85e14b0SPeter Avalos  * are met:
8a85e14b0SPeter Avalos  * 1. Redistributions of source code must retain the above copyright
9a85e14b0SPeter Avalos  *    notice, this list of conditions and the following disclaimer.
10a85e14b0SPeter Avalos  * 2. Redistributions in binary form must reproduce the above copyright
11a85e14b0SPeter Avalos  *    notice, this list of conditions and the following disclaimer in the
12a85e14b0SPeter Avalos  *    documentation and/or other materials provided with the distribution.
13a85e14b0SPeter Avalos  * 3. All advertising materials mentioning features or use of this software
14a85e14b0SPeter Avalos  *    must display the following acknowledgement:
15a85e14b0SPeter Avalos  *      This product includes software developed by the University of
16a85e14b0SPeter Avalos  *      California, Berkeley and its contributors.
17a85e14b0SPeter Avalos  * 4. Neither the name of the University nor the names of its contributors
18a85e14b0SPeter Avalos  *    may be used to endorse or promote products derived from this software
19a85e14b0SPeter Avalos  *    without specific prior written permission.
20a85e14b0SPeter Avalos  *
21a85e14b0SPeter Avalos  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22a85e14b0SPeter Avalos  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23a85e14b0SPeter Avalos  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24a85e14b0SPeter Avalos  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25a85e14b0SPeter Avalos  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26a85e14b0SPeter Avalos  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27a85e14b0SPeter Avalos  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28a85e14b0SPeter Avalos  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29a85e14b0SPeter Avalos  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30a85e14b0SPeter Avalos  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31a85e14b0SPeter Avalos  * SUCH DAMAGE.
32a85e14b0SPeter Avalos  */
33a85e14b0SPeter Avalos 
34a85e14b0SPeter Avalos #ifndef lib_pcap_vlan_h
35a85e14b0SPeter Avalos #define lib_pcap_vlan_h
36a85e14b0SPeter Avalos 
37*3a289941SAaron LI #include <pcap/pcap-inttypes.h>
38*3a289941SAaron LI 
39a85e14b0SPeter Avalos struct vlan_tag {
40*3a289941SAaron LI 	uint16_t	vlan_tpid;		/* ETH_P_8021Q */
41*3a289941SAaron LI 	uint16_t	vlan_tci;		/* VLAN TCI */
42a85e14b0SPeter Avalos };
43a85e14b0SPeter Avalos 
44a85e14b0SPeter Avalos #define VLAN_TAG_LEN	4
45a85e14b0SPeter Avalos 
46a85e14b0SPeter Avalos #endif
47