xref: /freebsd/contrib/wpa/src/ap/vlan.h (revision 780fb4a2fa9a9aee5ac48a60b790f567c0dc13e9)
1*780fb4a2SCy Schubert /*
2*780fb4a2SCy Schubert  * hostapd / VLAN definition
3*780fb4a2SCy Schubert  * Copyright (c) 2015, Jouni Malinen <j@w1.fi>
4*780fb4a2SCy Schubert  *
5*780fb4a2SCy Schubert  * This software may be distributed under the terms of the BSD license.
6*780fb4a2SCy Schubert  * See README for more details.
7*780fb4a2SCy Schubert  */
8*780fb4a2SCy Schubert 
9*780fb4a2SCy Schubert #ifndef VLAN_H
10*780fb4a2SCy Schubert #define VLAN_H
11*780fb4a2SCy Schubert 
12*780fb4a2SCy Schubert #define MAX_NUM_TAGGED_VLAN 32
13*780fb4a2SCy Schubert 
14*780fb4a2SCy Schubert struct vlan_description {
15*780fb4a2SCy Schubert 	int notempty; /* 0 : no vlan information present, 1: else */
16*780fb4a2SCy Schubert 	int untagged; /* >0 802.1q vid */
17*780fb4a2SCy Schubert 	int tagged[MAX_NUM_TAGGED_VLAN]; /* first k items, ascending order */
18*780fb4a2SCy Schubert };
19*780fb4a2SCy Schubert 
20*780fb4a2SCy Schubert #ifndef CONFIG_NO_VLAN
21*780fb4a2SCy Schubert int vlan_compare(struct vlan_description *a, struct vlan_description *b);
22*780fb4a2SCy Schubert #else /* CONFIG_NO_VLAN */
23*780fb4a2SCy Schubert static inline int
vlan_compare(struct vlan_description * a,struct vlan_description * b)24*780fb4a2SCy Schubert vlan_compare(struct vlan_description *a, struct vlan_description *b)
25*780fb4a2SCy Schubert {
26*780fb4a2SCy Schubert 	return 0;
27*780fb4a2SCy Schubert }
28*780fb4a2SCy Schubert #endif /* CONFIG_NO_VLAN */
29*780fb4a2SCy Schubert 
30*780fb4a2SCy Schubert #endif /* VLAN_H */
31