vlan_init.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. const char *dyn_vlan);
  20. #else /* CONFIG_NO_VLAN */
  21. static inline int vlan_init(struct hostapd_data *hapd)
  22. {
  23. return 0;
  24. }
  25. static inline void vlan_deinit(struct hostapd_data *hapd)
  26. {
  27. }
  28. static inline struct hostapd_vlan * vlan_add_dynamic(struct hostapd_data *hapd,
  29. struct hostapd_vlan *vlan,
  30. int vlan_id)
  31. {
  32. return NULL;
  33. }
  34. static inline int vlan_remove_dynamic(struct hostapd_data *hapd, int vlan_id)
  35. {
  36. return -1;
  37. }
  38. static inline int vlan_setup_encryption_dyn(struct hostapd_data *hapd,
  39. const char *dyn_vlan)
  40. {
  41. return -1;
  42. }
  43. #endif /* CONFIG_NO_VLAN */
  44. #endif /* VLAN_INIT_H */