]>
Commit | Line | Data |
---|---|---|
1c79356b | 1 | /* |
4a249263 | 2 | * Copyright (c) 2003 Apple Computer, Inc. All rights reserved. |
1c79356b A |
3 | * |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
e5568f75 A |
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. | |
1c79356b | 11 | * |
e5568f75 A |
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 | |
1c79356b A |
14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, |
15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
e5568f75 A |
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. | |
1c79356b A |
19 | * |
20 | * @APPLE_LICENSE_HEADER_END@ | |
21 | */ | |
22 | /* | |
23 | * Copyright 1998 Massachusetts Institute of Technology | |
24 | * | |
25 | * Permission to use, copy, modify, and distribute this software and | |
26 | * its documentation for any purpose and without fee is hereby | |
27 | * granted, provided that both the above copyright notice and this | |
28 | * permission notice appear in all copies, that both the above | |
29 | * copyright notice and this permission notice appear in all | |
30 | * supporting documentation, and that the name of M.I.T. not be used | |
31 | * in advertising or publicity pertaining to distribution of the | |
32 | * software without specific, written prior permission. M.I.T. makes | |
33 | * no representations about the suitability of this software for any | |
34 | * purpose. It is provided "as is" without express or implied | |
35 | * warranty. | |
36 | * | |
37 | * THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS | |
38 | * ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE, | |
39 | * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | |
40 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT | |
41 | * SHALL M.I.T. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
42 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
43 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF | |
44 | * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | |
45 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | |
46 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT | |
47 | * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
48 | * SUCH DAMAGE. | |
49 | * | |
4a249263 | 50 | * $FreeBSD: src/sys/net/if_vlan_var.h,v 1.16 2003/07/08 21:54:20 wpaul Exp $ |
1c79356b A |
51 | */ |
52 | ||
53 | #ifndef _NET_IF_VLAN_VAR_H_ | |
54 | #define _NET_IF_VLAN_VAR_H_ 1 | |
1c79356b A |
55 | |
56 | struct ether_vlan_header { | |
57 | u_char evl_dhost[ETHER_ADDR_LEN]; | |
58 | u_char evl_shost[ETHER_ADDR_LEN]; | |
59 | u_int16_t evl_encap_proto; | |
60 | u_int16_t evl_tag; | |
61 | u_int16_t evl_proto; | |
62 | }; | |
63 | ||
4a249263 A |
64 | #define EVL_VLID_MASK 0x0FFF |
65 | #define EVL_VLANOFTAG(tag) ((tag) & EVL_VLID_MASK) | |
1c79356b | 66 | #define EVL_PRIOFTAG(tag) (((tag) >> 13) & 7) |
1c79356b | 67 | |
4a249263 | 68 | #if 0 |
1c79356b A |
69 | /* sysctl(3) tags, for compatibility purposes */ |
70 | #define VLANCTL_PROTO 1 | |
71 | #define VLANCTL_MAX 2 | |
4a249263 | 72 | #endif 0 |
1c79356b A |
73 | |
74 | /* | |
75 | * Configuration structure for SIOCSETVLAN and SIOCGETVLAN ioctls. | |
76 | */ | |
77 | struct vlanreq { | |
78 | char vlr_parent[IFNAMSIZ]; | |
79 | u_short vlr_tag; | |
80 | }; | |
1c79356b A |
81 | |
82 | #endif /* _NET_IF_VLAN_VAR_H_ */ |