1
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
52
53
54
55
59
60
65
66
74
75
76
94
95
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
/* ... */
#ifndef HOSTAPD_H
#define HOSTAPD_H
#include "common/defs.h"
#include "ap/ap_config.h"
struct wpa_driver_ops;
struct wpa_ctrl_dst;
struct radius_server_data;
struct upnp_wps_device_sm;
struct hostapd_data;
struct sta_info;
struct hostap_sta_driver_data;
struct ieee80211_ht_capabilities;
struct full_dynamic_vlan;
enum wps_event;
union wps_event_data;
struct hostapd_iface;
struct hapd_interfaces {
int (*reload_config)(struct hostapd_iface *iface);
struct hostapd_config * (*config_read_cb)(const char *config_fname);
int (*ctrl_iface_init)(struct hostapd_data *hapd);
void (*ctrl_iface_deinit)(struct hostapd_data *hapd);
int (*for_each_interface)(struct hapd_interfaces *interfaces,
int (*cb)(struct hostapd_iface *iface,
void *ctx), void *ctx);
int (*driver_init)(struct hostapd_iface *iface);
size_t count;
int global_ctrl_sock;
char *global_iface_path;
char *global_iface_name;
struct hostapd_iface **iface;
}{ ... };
struct hostapd_probereq_cb {
int (*cb)(void *ctx, const u8 *sa, const u8 *da, const u8 *bssid,
const u8 *ie, size_t ie_len, int ssi_signal);
void *ctx;
}{ ... };
#define HOSTAPD_RATE_BASIC 0x00000001
struct hostapd_rate_data {
int rate;
int flags;
}{ ... };
struct hostapd_frame_info {
u32 channel;
u32 datarate;
int ssi_signal;
}{ ... };
struct hostapd_sae_commit_queue {
struct dl_list list;
size_t len;
u8 bssid[ETH_ALEN];
u32 auth_transaction;
u16 status;
u8 msg[];
}{ ... };
#ifdef CONFIG_WPS
enum hapd_wps_status {
WPS_SUCCESS_STATUS = 1,
WPS_FAILURE_STATUS
}{ ... };
enum pbc_status {
WPS_PBC_STATUS_DISABLE,
WPS_PBC_STATUS_ACTIVE,
WPS_PBC_STATUS_TIMEOUT,
WPS_PBC_STATUS_OVERLAP
}{ ... };
struct wps_stat {
enum hapd_wps_status status;
enum pbc_status pbc_status;
u8 peer_addr[ETH_ALEN];
}{ ... };
/* ... */#endif
/* ... */
struct hostapd_data {
struct hostapd_config *iconf;
struct hostapd_bss_config *conf;
int interface_added;
u8 own_addr[ETH_ALEN];
struct sta_info *sta_list;
#define STA_HASH_SIZE 16
#define STA_HASH(sta) (sta[5] & 0xf)
struct sta_info *sta_hash[STA_HASH_SIZE];
int num_sta;
struct eapol_authenticator *eapol_auth;
struct wpa_authenticator *wpa_auth;
#ifdef CONFIG_FULL_DYNAMIC_VLAN
struct full_dynamic_vlan *full_dynamic_vlan;
#endif
#ifdef CONFIG_WPS
struct wps_context *wps;
unsigned int ap_pin_failures;
unsigned int ap_pin_failures_consecutive;
struct upnp_wps_device_sm *wps_upnp;
unsigned int ap_pin_lockout_time;
struct wps_stat wps_stats;
void (*wps_event_cb)(void *ctx, enum wps_event event,
union wps_event_data *data);/* ... */
#endif
#ifdef CONFIG_P2P
struct p2p_data *p2p;
struct p2p_group *p2p_group;
struct wpabuf *p2p_beacon_ie;
struct wpabuf *p2p_probe_resp_ie;
int num_sta_no_p2p;
int noa_enabled;
int noa_start;
int noa_duration;/* ... */
#endif
#ifdef CONFIG_SAE
#define COMEBACK_KEY_SIZE 8
#define COMEBACK_PENDING_IDX_SIZE 256
u8 comeback_key[COMEBACK_KEY_SIZE];
struct os_reltime last_comeback_key_update;
u16 comeback_idx;
u16 comeback_pending_idx[COMEBACK_PENDING_IDX_SIZE];
int dot11RSNASAERetransPeriod;
struct dl_list sae_commit_queue; /* ... */
#endif
#ifdef CONFIG_INTERWORKING
size_t gas_frag_limit;
#endif
#ifdef CONFIG_SQLITE
struct hostapd_eap_user tmp_eap_user;
#endif
}{ ... };
struct hostapd_data *hostapd_get_hapd_data(void);
const struct hostapd_eap_user *
hostapd_get_eap_user(struct hostapd_data *hapd, const u8 *identity,
size_t identity_len, int phase2);
/* ... */
#endif