Home | History | Annotate | Download | only in ap
      1 /*
      2  * hostapd / VLAN initialization
      3  * Copyright 2003, Instant802 Networks, Inc.
      4  * Copyright 2005, Devicescape Software, Inc.
      5  *
      6  * This software may be distributed under the terms of the BSD license.
      7  * See README for more details.
      8  */
      9 
     10 #ifndef VLAN_INIT_H
     11 #define VLAN_INIT_H
     12 
     13 #ifndef CONFIG_NO_VLAN
     14 int vlan_init(struct hostapd_data *hapd);
     15 void vlan_deinit(struct hostapd_data *hapd);
     16 struct hostapd_vlan * vlan_add_dynamic(struct hostapd_data *hapd,
     17 				       struct hostapd_vlan *vlan,
     18 				       int vlan_id);
     19 int vlan_remove_dynamic(struct hostapd_data *hapd, int vlan_id);
     20 int vlan_setup_encryption_dyn(struct hostapd_data *hapd,
     21 			      const char *dyn_vlan);
     22 #else /* CONFIG_NO_VLAN */
     23 static inline int vlan_init(struct hostapd_data *hapd)
     24 {
     25 	return 0;
     26 }
     27 
     28 static inline void vlan_deinit(struct hostapd_data *hapd)
     29 {
     30 }
     31 
     32 static inline struct hostapd_vlan * vlan_add_dynamic(struct hostapd_data *hapd,
     33 						     struct hostapd_vlan *vlan,
     34 						     int vlan_id)
     35 {
     36 	return NULL;
     37 }
     38 
     39 static inline int vlan_remove_dynamic(struct hostapd_data *hapd, int vlan_id)
     40 {
     41 	return -1;
     42 }
     43 
     44 static inline int vlan_setup_encryption_dyn(struct hostapd_data *hapd,
     45 					    const char *dyn_vlan)
     46 {
     47 	return -1;
     48 }
     49 #endif /* CONFIG_NO_VLAN */
     50 
     51 #endif /* VLAN_INIT_H */
     52