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