Deleted Added
full compact
if_vlan_var.h (109623) if_vlan_var.h (111119)
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 109623 2003-01-21 08:56:16Z alfred $
29 * $FreeBSD: head/sys/net/if_vlan_var.h 111119 2003-02-19 05:47:46Z imp $
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];

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

93 * tagging by marking IFCAP_VLAN_HWTAGGING in if_capabilities.
94 */
95#define MTAG_VLAN 1035328035
96#define MTAG_VLAN_TAG 0 /* tag of VLAN interface */
97
98#define VLAN_INPUT_TAG(_ifp, _m, _t, _errcase) do { \
99 struct m_tag *mtag; \
100 mtag = m_tag_alloc(MTAG_VLAN, MTAG_VLAN_TAG, \
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];

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

93 * tagging by marking IFCAP_VLAN_HWTAGGING in if_capabilities.
94 */
95#define MTAG_VLAN 1035328035
96#define MTAG_VLAN_TAG 0 /* tag of VLAN interface */
97
98#define VLAN_INPUT_TAG(_ifp, _m, _t, _errcase) do { \
99 struct m_tag *mtag; \
100 mtag = m_tag_alloc(MTAG_VLAN, MTAG_VLAN_TAG, \
101 sizeof (u_int), M_NOWAIT); \
101 sizeof (u_int), M_DONTWAIT); \
102 if (mtag == NULL) { \
103 (_ifp)->if_ierrors++; \
104 m_freem(_m); \
105 _errcase; \
106 } \
107 *(u_int *)(mtag+1) = (_t); \
108 m_tag_prepend((_m), mtag); \
109} while (0)
110
111#define VLAN_OUTPUT_TAG(_ifp, _m) \
112 ((_ifp)->if_nvlans != 0 ? \
113 m_tag_locate((_m), MTAG_VLAN, MTAG_VLAN_TAG, NULL) : NULL)
114#define VLAN_TAG_VALUE(_mt) (*(u_int *)((_mt)+1))
115#endif /* _KERNEL */
116
117#endif /* _NET_IF_VLAN_VAR_H_ */
102 if (mtag == NULL) { \
103 (_ifp)->if_ierrors++; \
104 m_freem(_m); \
105 _errcase; \
106 } \
107 *(u_int *)(mtag+1) = (_t); \
108 m_tag_prepend((_m), mtag); \
109} while (0)
110
111#define VLAN_OUTPUT_TAG(_ifp, _m) \
112 ((_ifp)->if_nvlans != 0 ? \
113 m_tag_locate((_m), MTAG_VLAN, MTAG_VLAN_TAG, NULL) : NULL)
114#define VLAN_TAG_VALUE(_mt) (*(u_int *)((_mt)+1))
115#endif /* _KERNEL */
116
117#endif /* _NET_IF_VLAN_VAR_H_ */