Deleted Added
full compact
if_vlan_var.h (167126) if_vlan_var.h (219819)
1/*-
2 * Copyright 1998 Massachusetts Institute of Technology
3 *
4 * Permission to use, copy, modify, and distribute this software and
5 * its documentation for any purpose and without fee is hereby
6 * granted, provided that both the above copyright notice and this
7 * permission notice appear in all copies, that both the above
8 * copyright notice and this permission notice appear in all

--- 12 unchanged lines hidden (view full) ---

21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
23 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
26 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
1/*-
2 * Copyright 1998 Massachusetts Institute of Technology
3 *
4 * Permission to use, copy, modify, and distribute this software and
5 * its documentation for any purpose and without fee is hereby
6 * granted, provided that both the above copyright notice and this
7 * permission notice appear in all copies, that both the above
8 * copyright notice and this permission notice appear in all

--- 12 unchanged lines hidden (view full) ---

21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
23 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
26 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * $FreeBSD: head/sys/net/if_vlan_var.h 167126 2007-02-28 22:05:30Z bms $
29 * $FreeBSD: head/sys/net/if_vlan_var.h 219819 2011-03-21 09:40:01Z jeff $
30 */
31
32#ifndef _NET_IF_VLAN_VAR_H_
33#define _NET_IF_VLAN_VAR_H_ 1
34
35struct ether_vlan_header {
36 u_char evl_dhost[ETHER_ADDR_LEN];
37 u_char evl_shost[ETHER_ADDR_LEN];

--- 88 unchanged lines hidden (view full) ---

126 * if_capabilities.
127 */
128
129#define VLAN_CAPABILITIES(_ifp) do { \
130 if ((_ifp)->if_vlantrunk != NULL) \
131 (*vlan_trunk_cap_p)(_ifp); \
132} while (0)
133
30 */
31
32#ifndef _NET_IF_VLAN_VAR_H_
33#define _NET_IF_VLAN_VAR_H_ 1
34
35struct ether_vlan_header {
36 u_char evl_dhost[ETHER_ADDR_LEN];
37 u_char evl_shost[ETHER_ADDR_LEN];

--- 88 unchanged lines hidden (view full) ---

126 * if_capabilities.
127 */
128
129#define VLAN_CAPABILITIES(_ifp) do { \
130 if ((_ifp)->if_vlantrunk != NULL) \
131 (*vlan_trunk_cap_p)(_ifp); \
132} while (0)
133
134#define VLAN_TRUNKDEV(_ifp) \
135 (_ifp)->if_type == IFT_L2VLAN ? (*vlan_trunkdev_p)((_ifp)) : NULL
136#define VLAN_TAG(_ifp, _tag) \
137 (_ifp)->if_type == IFT_L2VLAN ? (*vlan_tag_p)((_ifp), (_tag)) : EINVAL
138#define VLAN_COOKIE(_ifp) \
139 (_ifp)->if_type == IFT_L2VLAN ? (*vlan_cookie_p)((_ifp)) : NULL
140#define VLAN_SETCOOKIE(_ifp, _cookie) \
141 (_ifp)->if_type == IFT_L2VLAN ? \
142 (*vlan_setcookie_p)((_ifp), (_cookie)) : EINVAL
143#define VLAN_DEVAT(_ifp, _tag) \
144 (_ifp)->if_vlantrunk != NULL ? (*vlan_devat_p)((_ifp), (_tag)) : NULL
145
134extern void (*vlan_trunk_cap_p)(struct ifnet *);
146extern void (*vlan_trunk_cap_p)(struct ifnet *);
147extern struct ifnet *(*vlan_trunkdev_p)(struct ifnet *);
148extern struct ifnet *(*vlan_devat_p)(struct ifnet *, uint16_t);
149extern int (*vlan_tag_p)(struct ifnet *, uint16_t *);
150extern int (*vlan_setcookie_p)(struct ifnet *, void *);
151extern void *(*vlan_cookie_p)(struct ifnet *);
152
135#endif /* _KERNEL */
136
137#endif /* _NET_IF_VLAN_VAR_H_ */
153#endif /* _KERNEL */
154
155#endif /* _NET_IF_VLAN_VAR_H_ */