You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
960 B
C
42 lines
960 B
C
/*
|
|
* hostapd / VLAN definition
|
|
* Copyright (c) 2015, Jouni Malinen <j@w1.fi>
|
|
*
|
|
* This software may be distributed under the terms of the BSD license.
|
|
* See README for more details.
|
|
*/
|
|
|
|
#ifndef VLAN_H
|
|
#define VLAN_H
|
|
|
|
#define MAX_NUM_TAGGED_VLAN 32
|
|
|
|
struct vlan_description {
|
|
int notempty; /* 0 : no vlan information present, 1: else */
|
|
int untagged; /* >0 802.1q vid */
|
|
int tagged[MAX_NUM_TAGGED_VLAN]; /* first k items, ascending order */
|
|
};
|
|
|
|
#ifndef CONFIG_NO_VLAN
|
|
int vlan_compare(struct vlan_description *a, struct vlan_description *b);
|
|
struct vlan_description vlan_desc_from_id(int vlan_id);
|
|
#else /* CONFIG_NO_VLAN */
|
|
static inline int
|
|
vlan_compare(struct vlan_description *a, struct vlan_description *b)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static inline struct vlan_description
|
|
vlan_desc_from_id(int vlan_id)
|
|
{
|
|
struct vlan_description vlan_desc;
|
|
|
|
os_memset(&vlan_desc, 0, sizeof(vlan_desc));
|
|
|
|
return vlan_desc;
|
|
}
|
|
#endif /* CONFIG_NO_VLAN */
|
|
|
|
#endif /* VLAN_H */
|