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
16#ifndef VLAN_INIT_H
17#define VLAN_INIT_H
18
19#ifndef CONFIG_NO_VLAN
20int vlan_init(struct hostapd_data *hapd);
21void vlan_deinit(struct hostapd_data *hapd);
22struct hostapd_vlan * vlan_add_dynamic(struct hostapd_data *hapd,
23				       struct hostapd_vlan *vlan,
24				       int vlan_id);
25int vlan_remove_dynamic(struct hostapd_data *hapd, int vlan_id);
26int vlan_setup_encryption_dyn(struct hostapd_data *hapd,
27			      struct hostapd_ssid *mssid,
28			      const char *dyn_vlan);
29#else /* CONFIG_NO_VLAN */
30static inline int vlan_init(struct hostapd_data *hapd)
31{
32	return 0;
33}
34
35static inline void vlan_deinit(struct hostapd_data *hapd)
36{
37}
38
39static inline struct hostapd_vlan * vlan_add_dynamic(struct hostapd_data *hapd,
40						     struct hostapd_vlan *vlan,
41						     int vlan_id)
42{
43	return NULL;
44}
45
46static inline int vlan_remove_dynamic(struct hostapd_data *hapd, int vlan_id)
47{
48	return -1;
49}
50
51static inline int vlan_setup_encryption_dyn(struct hostapd_data *hapd,
52					    struct hostapd_ssid *mssid,
53					    const char *dyn_vlan)
54{
55	return -1;
56}
57#endif /* CONFIG_NO_VLAN */
58
59#endif /* VLAN_INIT_H */
60