vlan_init.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. #ifndef VLAN_INIT_H
  10. #define VLAN_INIT_H
  11. #ifndef CONFIG_NO_VLAN
  12. int vlan_init(struct hostapd_data *hapd);
  13. void vlan_deinit(struct hostapd_data *hapd);
  14. struct hostapd_vlan * vlan_add_dynamic(struct hostapd_data *hapd,
  15. struct hostapd_vlan *vlan,
  16. int vlan_id);
  17. int vlan_remove_dynamic(struct hostapd_data *hapd, int vlan_id);
  18. int vlan_setup_encryption_dyn(struct hostapd_data *hapd,
  19. struct hostapd_ssid *mssid,
  20. const char *dyn_vlan);
  21. #else /* CONFIG_NO_VLAN */
  22. static inline int vlan_init(struct hostapd_data *hapd)
  23. {
  24. return 0;
  25. }
  26. static inline void vlan_deinit(struct hostapd_data *hapd)
  27. {
  28. }
  29. static inline struct hostapd_vlan * vlan_add_dynamic(struct hostapd_data *hapd,
  30. struct hostapd_vlan *vlan,
  31. int vlan_id)
  32. {
  33. return NULL;
  34. }
  35. static inline int vlan_remove_dynamic(struct hostapd_data *hapd, int vlan_id)
  36. {
  37. return -1;
  38. }
  39. static inline int vlan_setup_encryption_dyn(struct hostapd_data *hapd,
  40. struct hostapd_ssid *mssid,
  41. const char *dyn_vlan)
  42. {
  43. return -1;
  44. }
  45. #endif /* CONFIG_NO_VLAN */
  46. #endif /* VLAN_INIT_H */