vlan_init.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * hostapd / VLAN initialization
  3. * Copyright 2003, Instant802 Networks, Inc.
  4. * Copyright 2005, Devicescape Software, Inc.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. *
  10. * Alternatively, this software may be distributed under the terms of BSD
  11. * license.
  12. *
  13. * See README and COPYING for more details.
  14. */
  15. #ifndef VLAN_INIT_H
  16. #define VLAN_INIT_H
  17. #ifndef CONFIG_NO_VLAN
  18. int vlan_init(struct hostapd_data *hapd);
  19. void vlan_deinit(struct hostapd_data *hapd);
  20. int vlan_reconfig(struct hostapd_data *hapd, struct hostapd_config *oldconf,
  21. struct hostapd_bss_config *oldbss);
  22. struct hostapd_vlan * vlan_add_dynamic(struct hostapd_data *hapd,
  23. struct hostapd_vlan *vlan,
  24. int vlan_id);
  25. int vlan_remove_dynamic(struct hostapd_data *hapd, int vlan_id);
  26. int vlan_setup_encryption_dyn(struct hostapd_data *hapd,
  27. struct hostapd_ssid *mssid,
  28. const char *dyn_vlan);
  29. #else /* CONFIG_NO_VLAN */
  30. static inline int vlan_init(struct hostapd_data *hapd)
  31. {
  32. return 0;
  33. }
  34. static inline void vlan_deinit(struct hostapd_data *hapd)
  35. {
  36. }
  37. static inline struct hostapd_vlan * vlan_add_dynamic(struct hostapd_data *hapd,
  38. struct hostapd_vlan *vlan,
  39. int vlan_id)
  40. {
  41. return NULL;
  42. }
  43. static inline int vlan_remove_dynamic(struct hostapd_data *hapd, int vlan_id)
  44. {
  45. return -1;
  46. }
  47. static inline int vlan_setup_encryption_dyn(struct hostapd_data *hapd,
  48. struct hostapd_ssid *mssid,
  49. const char *dyn_vlan)
  50. {
  51. return -1;
  52. }
  53. #endif /* CONFIG_NO_VLAN */
  54. #endif /* VLAN_INIT_H */