Home | History | Annotate | Download | only in ap
      1 /*
      2  * hostapd / Initialization and configuration
      3  * Copyright (c) 2002-2014, Jouni Malinen <j (at) w1.fi>
      4  *
      5  * This software may be distributed under the terms of the BSD license.
      6  * See README for more details.
      7  */
      8 
      9 #ifndef HOSTAPD_H
     10 #define HOSTAPD_H
     11 
     12 #include "common/defs.h"
     13 #include "utils/list.h"
     14 #include "ap_config.h"
     15 #include "drivers/driver.h"
     16 
     17 #define OCE_STA_CFON_ENABLED(hapd) \
     18 	((hapd->conf->oce & OCE_STA_CFON) && \
     19 	 (hapd->iface->drv_flags & WPA_DRIVER_FLAGS_OCE_STA_CFON))
     20 #define OCE_AP_ENABLED(hapd) \
     21 	((hapd->conf->oce & OCE_AP) && \
     22 	 (hapd->iface->drv_flags & WPA_DRIVER_FLAGS_OCE_AP))
     23 
     24 struct wpa_ctrl_dst;
     25 struct radius_server_data;
     26 struct upnp_wps_device_sm;
     27 struct hostapd_data;
     28 struct sta_info;
     29 struct ieee80211_ht_capabilities;
     30 struct full_dynamic_vlan;
     31 enum wps_event;
     32 union wps_event_data;
     33 #ifdef CONFIG_MESH
     34 struct mesh_conf;
     35 #endif /* CONFIG_MESH */
     36 
     37 struct hostapd_iface;
     38 
     39 struct hapd_interfaces {
     40 	int (*reload_config)(struct hostapd_iface *iface);
     41 	struct hostapd_config * (*config_read_cb)(const char *config_fname);
     42 	int (*ctrl_iface_init)(struct hostapd_data *hapd);
     43 	void (*ctrl_iface_deinit)(struct hostapd_data *hapd);
     44 	int (*for_each_interface)(struct hapd_interfaces *interfaces,
     45 				  int (*cb)(struct hostapd_iface *iface,
     46 					    void *ctx), void *ctx);
     47 	int (*driver_init)(struct hostapd_iface *iface);
     48 
     49 	size_t count;
     50 	int global_ctrl_sock;
     51 	struct dl_list global_ctrl_dst;
     52 	char *global_iface_path;
     53 	char *global_iface_name;
     54 #ifndef CONFIG_NATIVE_WINDOWS
     55 	gid_t ctrl_iface_group;
     56 #endif /* CONFIG_NATIVE_WINDOWS */
     57 	struct hostapd_iface **iface;
     58 
     59 	size_t terminate_on_error;
     60 #ifndef CONFIG_NO_VLAN
     61 	struct dynamic_iface *vlan_priv;
     62 #endif /* CONFIG_NO_VLAN */
     63 #ifdef CONFIG_ETH_P_OUI
     64 	struct dl_list eth_p_oui; /* OUI Extended EtherType handlers */
     65 #endif /* CONFIG_ETH_P_OUI */
     66 	int eloop_initialized;
     67 
     68 #ifdef CONFIG_DPP
     69 	struct dpp_global *dpp;
     70 #endif /* CONFIG_DPP */
     71 };
     72 
     73 enum hostapd_chan_status {
     74 	HOSTAPD_CHAN_VALID = 0, /* channel is ready */
     75 	HOSTAPD_CHAN_INVALID = 1, /* no usable channel found */
     76 	HOSTAPD_CHAN_ACS = 2, /* ACS work being performed */
     77 };
     78 
     79 struct hostapd_probereq_cb {
     80 	int (*cb)(void *ctx, const u8 *sa, const u8 *da, const u8 *bssid,
     81 		  const u8 *ie, size_t ie_len, int ssi_signal);
     82 	void *ctx;
     83 };
     84 
     85 #define HOSTAPD_RATE_BASIC 0x00000001
     86 
     87 struct hostapd_rate_data {
     88 	int rate; /* rate in 100 kbps */
     89 	int flags; /* HOSTAPD_RATE_ flags */
     90 };
     91 
     92 struct hostapd_frame_info {
     93 	unsigned int freq;
     94 	u32 channel;
     95 	u32 datarate;
     96 	int ssi_signal; /* dBm */
     97 };
     98 
     99 enum wps_status {
    100 	WPS_STATUS_SUCCESS = 1,
    101 	WPS_STATUS_FAILURE
    102 };
    103 
    104 enum pbc_status {
    105 	WPS_PBC_STATUS_DISABLE,
    106 	WPS_PBC_STATUS_ACTIVE,
    107 	WPS_PBC_STATUS_TIMEOUT,
    108 	WPS_PBC_STATUS_OVERLAP
    109 };
    110 
    111 struct wps_stat {
    112 	enum wps_status status;
    113 	enum wps_error_indication failure_reason;
    114 	enum pbc_status pbc_status;
    115 	u8 peer_addr[ETH_ALEN];
    116 };
    117 
    118 struct hostapd_neighbor_entry {
    119 	struct dl_list list;
    120 	u8 bssid[ETH_ALEN];
    121 	struct wpa_ssid_value ssid;
    122 	struct wpabuf *nr;
    123 	struct wpabuf *lci;
    124 	struct wpabuf *civic;
    125 	/* LCI update time */
    126 	struct os_time lci_date;
    127 	int stationary;
    128 };
    129 
    130 struct hostapd_sae_commit_queue {
    131 	struct dl_list list;
    132 	int rssi;
    133 	size_t len;
    134 	u8 msg[];
    135 };
    136 
    137 /**
    138  * struct hostapd_data - hostapd per-BSS data structure
    139  */
    140 struct hostapd_data {
    141 	struct hostapd_iface *iface;
    142 	struct hostapd_config *iconf;
    143 	struct hostapd_bss_config *conf;
    144 	int interface_added; /* virtual interface added for this BSS */
    145 	unsigned int started:1;
    146 	unsigned int disabled:1;
    147 	unsigned int reenable_beacon:1;
    148 
    149 	u8 own_addr[ETH_ALEN];
    150 
    151 	int num_sta; /* number of entries in sta_list */
    152 	struct sta_info *sta_list; /* STA info list head */
    153 #define STA_HASH_SIZE 256
    154 #define STA_HASH(sta) (sta[5])
    155 	struct sta_info *sta_hash[STA_HASH_SIZE];
    156 
    157 	/*
    158 	 * Bitfield for indicating which AIDs are allocated. Only AID values
    159 	 * 1-2007 are used and as such, the bit at index 0 corresponds to AID
    160 	 * 1.
    161 	 */
    162 #define AID_WORDS ((2008 + 31) / 32)
    163 	u32 sta_aid[AID_WORDS];
    164 
    165 	const struct wpa_driver_ops *driver;
    166 	void *drv_priv;
    167 
    168 	void (*new_assoc_sta_cb)(struct hostapd_data *hapd,
    169 				 struct sta_info *sta, int reassoc);
    170 
    171 	void *msg_ctx; /* ctx for wpa_msg() calls */
    172 	void *msg_ctx_parent; /* parent interface ctx for wpa_msg() calls */
    173 
    174 	struct radius_client_data *radius;
    175 	u64 acct_session_id;
    176 	struct radius_das_data *radius_das;
    177 
    178 	struct iapp_data *iapp;
    179 
    180 	struct hostapd_cached_radius_acl *acl_cache;
    181 	struct hostapd_acl_query_data *acl_queries;
    182 
    183 	struct wpa_authenticator *wpa_auth;
    184 	struct eapol_authenticator *eapol_auth;
    185 
    186 	struct rsn_preauth_interface *preauth_iface;
    187 	struct os_reltime michael_mic_failure;
    188 	int michael_mic_failures;
    189 	int tkip_countermeasures;
    190 
    191 	int ctrl_sock;
    192 	struct dl_list ctrl_dst;
    193 
    194 	void *ssl_ctx;
    195 	void *eap_sim_db_priv;
    196 	struct radius_server_data *radius_srv;
    197 	struct dl_list erp_keys; /* struct eap_server_erp_key */
    198 
    199 	int parameter_set_count;
    200 
    201 	/* Time Advertisement */
    202 	u8 time_update_counter;
    203 	struct wpabuf *time_adv;
    204 
    205 #ifdef CONFIG_FULL_DYNAMIC_VLAN
    206 	struct full_dynamic_vlan *full_dynamic_vlan;
    207 #endif /* CONFIG_FULL_DYNAMIC_VLAN */
    208 
    209 	struct l2_packet_data *l2;
    210 
    211 #ifdef CONFIG_IEEE80211R_AP
    212 	struct dl_list l2_queue;
    213 	struct dl_list l2_oui_queue;
    214 	struct eth_p_oui_ctx *oui_pull;
    215 	struct eth_p_oui_ctx *oui_resp;
    216 	struct eth_p_oui_ctx *oui_push;
    217 	struct eth_p_oui_ctx *oui_sreq;
    218 	struct eth_p_oui_ctx *oui_sresp;
    219 #endif /* CONFIG_IEEE80211R_AP */
    220 
    221 	struct wps_context *wps;
    222 
    223 	int beacon_set_done;
    224 	struct wpabuf *wps_beacon_ie;
    225 	struct wpabuf *wps_probe_resp_ie;
    226 #ifdef CONFIG_WPS
    227 	unsigned int ap_pin_failures;
    228 	unsigned int ap_pin_failures_consecutive;
    229 	struct upnp_wps_device_sm *wps_upnp;
    230 	unsigned int ap_pin_lockout_time;
    231 
    232 	struct wps_stat wps_stats;
    233 #endif /* CONFIG_WPS */
    234 
    235 	struct hostapd_probereq_cb *probereq_cb;
    236 	size_t num_probereq_cb;
    237 
    238 	void (*public_action_cb)(void *ctx, const u8 *buf, size_t len,
    239 				 int freq);
    240 	void *public_action_cb_ctx;
    241 	void (*public_action_cb2)(void *ctx, const u8 *buf, size_t len,
    242 				  int freq);
    243 	void *public_action_cb2_ctx;
    244 
    245 	int (*vendor_action_cb)(void *ctx, const u8 *buf, size_t len,
    246 				int freq);
    247 	void *vendor_action_cb_ctx;
    248 
    249 	void (*wps_reg_success_cb)(void *ctx, const u8 *mac_addr,
    250 				   const u8 *uuid_e);
    251 	void *wps_reg_success_cb_ctx;
    252 
    253 	void (*wps_event_cb)(void *ctx, enum wps_event event,
    254 			     union wps_event_data *data);
    255 	void *wps_event_cb_ctx;
    256 
    257 	void (*sta_authorized_cb)(void *ctx, const u8 *mac_addr,
    258 				  int authorized, const u8 *p2p_dev_addr);
    259 	void *sta_authorized_cb_ctx;
    260 
    261 	void (*setup_complete_cb)(void *ctx);
    262 	void *setup_complete_cb_ctx;
    263 
    264 	void (*new_psk_cb)(void *ctx, const u8 *mac_addr,
    265 			   const u8 *p2p_dev_addr, const u8 *psk,
    266 			   size_t psk_len);
    267 	void *new_psk_cb_ctx;
    268 
    269 	/* channel switch parameters */
    270 	struct hostapd_freq_params cs_freq_params;
    271 	u8 cs_count;
    272 	int cs_block_tx;
    273 	unsigned int cs_c_off_beacon;
    274 	unsigned int cs_c_off_proberesp;
    275 	int csa_in_progress;
    276 	unsigned int cs_c_off_ecsa_beacon;
    277 	unsigned int cs_c_off_ecsa_proberesp;
    278 
    279 #ifdef CONFIG_P2P
    280 	struct p2p_data *p2p;
    281 	struct p2p_group *p2p_group;
    282 	struct wpabuf *p2p_beacon_ie;
    283 	struct wpabuf *p2p_probe_resp_ie;
    284 
    285 	/* Number of non-P2P association stations */
    286 	int num_sta_no_p2p;
    287 
    288 	/* Periodic NoA (used only when no non-P2P clients in the group) */
    289 	int noa_enabled;
    290 	int noa_start;
    291 	int noa_duration;
    292 #endif /* CONFIG_P2P */
    293 #ifdef CONFIG_PROXYARP
    294 	struct l2_packet_data *sock_dhcp;
    295 	struct l2_packet_data *sock_ndisc;
    296 #endif /* CONFIG_PROXYARP */
    297 #ifdef CONFIG_MESH
    298 	int num_plinks;
    299 	int max_plinks;
    300 	void (*mesh_sta_free_cb)(struct hostapd_data *hapd,
    301 				 struct sta_info *sta);
    302 	struct wpabuf *mesh_pending_auth;
    303 	struct os_reltime mesh_pending_auth_time;
    304 	u8 mesh_required_peer[ETH_ALEN];
    305 #endif /* CONFIG_MESH */
    306 
    307 #ifdef CONFIG_SQLITE
    308 	struct hostapd_eap_user tmp_eap_user;
    309 #endif /* CONFIG_SQLITE */
    310 
    311 #ifdef CONFIG_SAE
    312 	/** Key used for generating SAE anti-clogging tokens */
    313 	u8 sae_token_key[8];
    314 	struct os_reltime last_sae_token_key_update;
    315 	u16 sae_token_idx;
    316 	u16 sae_pending_token_idx[256];
    317 	int dot11RSNASAERetransPeriod; /* msec */
    318 	struct dl_list sae_commit_queue; /* struct hostapd_sae_commit_queue */
    319 #endif /* CONFIG_SAE */
    320 
    321 #ifdef CONFIG_TESTING_OPTIONS
    322 	unsigned int ext_mgmt_frame_handling:1;
    323 	unsigned int ext_eapol_frame_io:1;
    324 
    325 	struct l2_packet_data *l2_test;
    326 
    327 	enum wpa_alg last_gtk_alg;
    328 	int last_gtk_key_idx;
    329 	u8 last_gtk[WPA_GTK_MAX_LEN];
    330 	size_t last_gtk_len;
    331 
    332 #ifdef CONFIG_IEEE80211W
    333 	enum wpa_alg last_igtk_alg;
    334 	int last_igtk_key_idx;
    335 	u8 last_igtk[WPA_IGTK_MAX_LEN];
    336 	size_t last_igtk_len;
    337 #endif /* CONFIG_IEEE80211W */
    338 #endif /* CONFIG_TESTING_OPTIONS */
    339 
    340 #ifdef CONFIG_MBO
    341 	unsigned int mbo_assoc_disallow;
    342 #endif /* CONFIG_MBO */
    343 
    344 	struct dl_list nr_db;
    345 
    346 	u8 beacon_req_token;
    347 	u8 lci_req_token;
    348 	u8 range_req_token;
    349 	unsigned int lci_req_active:1;
    350 	unsigned int range_req_active:1;
    351 
    352 	int dhcp_sock; /* UDP socket used with the DHCP server */
    353 
    354 #ifdef CONFIG_DPP
    355 	int dpp_init_done;
    356 	struct dpp_authentication *dpp_auth;
    357 	u8 dpp_allowed_roles;
    358 	int dpp_qr_mutual;
    359 	int dpp_auth_ok_on_ack;
    360 	int dpp_in_response_listen;
    361 	struct gas_query_ap *gas;
    362 	struct dpp_pkex *dpp_pkex;
    363 	struct dpp_bootstrap_info *dpp_pkex_bi;
    364 	char *dpp_pkex_code;
    365 	char *dpp_pkex_identifier;
    366 	char *dpp_pkex_auth_cmd;
    367 	char *dpp_configurator_params;
    368 	struct os_reltime dpp_last_init;
    369 	struct os_reltime dpp_init_iter_start;
    370 	unsigned int dpp_init_max_tries;
    371 	unsigned int dpp_init_retry_time;
    372 	unsigned int dpp_resp_wait_time;
    373 	unsigned int dpp_resp_max_tries;
    374 	unsigned int dpp_resp_retry_time;
    375 #ifdef CONFIG_TESTING_OPTIONS
    376 	char *dpp_config_obj_override;
    377 	char *dpp_discovery_override;
    378 	char *dpp_groups_override;
    379 	unsigned int dpp_ignore_netaccesskey_mismatch:1;
    380 #endif /* CONFIG_TESTING_OPTIONS */
    381 #endif /* CONFIG_DPP */
    382 };
    383 
    384 
    385 struct hostapd_sta_info {
    386 	struct dl_list list;
    387 	u8 addr[ETH_ALEN];
    388 	struct os_reltime last_seen;
    389 	int ssi_signal;
    390 #ifdef CONFIG_TAXONOMY
    391 	struct wpabuf *probe_ie_taxonomy;
    392 #endif /* CONFIG_TAXONOMY */
    393 };
    394 
    395 enum hostapd_iface_state {
    396 	HAPD_IFACE_UNINITIALIZED,
    397 	HAPD_IFACE_DISABLED,
    398 	HAPD_IFACE_COUNTRY_UPDATE,
    399 	HAPD_IFACE_ACS,
    400 	HAPD_IFACE_HT_SCAN,
    401 	HAPD_IFACE_DFS,
    402 	HAPD_IFACE_ENABLED
    403 };
    404 
    405 /**
    406  * struct hostapd_iface - hostapd per-interface data structure
    407  */
    408 struct hostapd_iface {
    409 	struct hapd_interfaces *interfaces;
    410 	void *owner;
    411 	char *config_fname;
    412 	struct hostapd_config *conf;
    413 	char phy[16]; /* Name of the PHY (radio) */
    414 
    415         enum hostapd_iface_state state;
    416 #ifdef CONFIG_MESH
    417 	struct mesh_conf *mconf;
    418 #endif /* CONFIG_MESH */
    419 
    420 	size_t num_bss;
    421 	struct hostapd_data **bss;
    422 
    423 	unsigned int wait_channel_update:1;
    424 	unsigned int cac_started:1;
    425 #ifdef CONFIG_FST
    426 	struct fst_iface *fst;
    427 	const struct wpabuf *fst_ies;
    428 #endif /* CONFIG_FST */
    429 
    430 	/*
    431 	 * When set, indicates that the driver will handle the AP
    432 	 * teardown: delete global keys, station keys, and stations.
    433 	 */
    434 	unsigned int driver_ap_teardown:1;
    435 
    436 	/*
    437 	 * When set, indicates that this interface is part of list of
    438 	 * interfaces that need to be started together (synchronously).
    439 	 */
    440 	unsigned int need_to_start_in_sync:1;
    441 
    442 	/* Ready to start but waiting for other interfaces to become ready. */
    443 	unsigned int ready_to_start_in_sync:1;
    444 
    445 	int num_ap; /* number of entries in ap_list */
    446 	struct ap_info *ap_list; /* AP info list head */
    447 	struct ap_info *ap_hash[STA_HASH_SIZE];
    448 
    449 	u64 drv_flags;
    450 
    451 	/* SMPS modes supported by the driver (WPA_DRIVER_SMPS_MODE_*) */
    452 	unsigned int smps_modes;
    453 
    454 	/*
    455 	 * A bitmap of supported protocols for probe response offload. See
    456 	 * struct wpa_driver_capa in driver.h
    457 	 */
    458 	unsigned int probe_resp_offloads;
    459 
    460 	/* extended capabilities supported by the driver */
    461 	const u8 *extended_capa, *extended_capa_mask;
    462 	unsigned int extended_capa_len;
    463 
    464 	unsigned int drv_max_acl_mac_addrs;
    465 
    466 	struct hostapd_hw_modes *hw_features;
    467 	int num_hw_features;
    468 	struct hostapd_hw_modes *current_mode;
    469 	/* Rates that are currently used (i.e., filtered copy of
    470 	 * current_mode->channels */
    471 	int num_rates;
    472 	struct hostapd_rate_data *current_rates;
    473 	int *basic_rates;
    474 	int freq;
    475 
    476 	u16 hw_flags;
    477 
    478 	/* Number of associated Non-ERP stations (i.e., stations using 802.11b
    479 	 * in 802.11g BSS) */
    480 	int num_sta_non_erp;
    481 
    482 	/* Number of associated stations that do not support Short Slot Time */
    483 	int num_sta_no_short_slot_time;
    484 
    485 	/* Number of associated stations that do not support Short Preamble */
    486 	int num_sta_no_short_preamble;
    487 
    488 	int olbc; /* Overlapping Legacy BSS Condition */
    489 
    490 	/* Number of HT associated stations that do not support greenfield */
    491 	int num_sta_ht_no_gf;
    492 
    493 	/* Number of associated non-HT stations */
    494 	int num_sta_no_ht;
    495 
    496 	/* Number of HT associated stations 20 MHz */
    497 	int num_sta_ht_20mhz;
    498 
    499 	/* Number of HT40 intolerant stations */
    500 	int num_sta_ht40_intolerant;
    501 
    502 	/* Overlapping BSS information */
    503 	int olbc_ht;
    504 
    505 	u16 ht_op_mode;
    506 
    507 	/* surveying helpers */
    508 
    509 	/* number of channels surveyed */
    510 	unsigned int chans_surveyed;
    511 
    512 	/* lowest observed noise floor in dBm */
    513 	s8 lowest_nf;
    514 
    515 	/* channel utilization calculation */
    516 	u64 last_channel_time;
    517 	u64 last_channel_time_busy;
    518 	u8 channel_utilization;
    519 
    520 	unsigned int chan_util_samples_sum;
    521 	unsigned int chan_util_num_sample_periods;
    522 	unsigned int chan_util_average;
    523 
    524 	/* eCSA IE will be added only if operating class is specified */
    525 	u8 cs_oper_class;
    526 
    527 	unsigned int dfs_cac_ms;
    528 	struct os_reltime dfs_cac_start;
    529 
    530 	/* Latched with the actual secondary channel information and will be
    531 	 * used while juggling between HT20 and HT40 modes. */
    532 	int secondary_ch;
    533 
    534 #ifdef CONFIG_ACS
    535 	unsigned int acs_num_completed_scans;
    536 #endif /* CONFIG_ACS */
    537 
    538 	void (*scan_cb)(struct hostapd_iface *iface);
    539 	int num_ht40_scan_tries;
    540 
    541 	struct dl_list sta_seen; /* struct hostapd_sta_info */
    542 	unsigned int num_sta_seen;
    543 
    544 	u8 dfs_domain;
    545 };
    546 
    547 /* hostapd.c */
    548 int hostapd_for_each_interface(struct hapd_interfaces *interfaces,
    549 			       int (*cb)(struct hostapd_iface *iface,
    550 					 void *ctx), void *ctx);
    551 int hostapd_reload_config(struct hostapd_iface *iface);
    552 void hostapd_reconfig_encryption(struct hostapd_data *hapd);
    553 struct hostapd_data *
    554 hostapd_alloc_bss_data(struct hostapd_iface *hapd_iface,
    555 		       struct hostapd_config *conf,
    556 		       struct hostapd_bss_config *bss);
    557 int hostapd_setup_interface(struct hostapd_iface *iface);
    558 int hostapd_setup_interface_complete(struct hostapd_iface *iface, int err);
    559 void hostapd_interface_deinit(struct hostapd_iface *iface);
    560 void hostapd_interface_free(struct hostapd_iface *iface);
    561 struct hostapd_iface * hostapd_alloc_iface(void);
    562 struct hostapd_iface * hostapd_init(struct hapd_interfaces *interfaces,
    563 				    const char *config_file);
    564 struct hostapd_iface *
    565 hostapd_interface_init_bss(struct hapd_interfaces *interfaces, const char *phy,
    566 			   const char *config_fname, int debug);
    567 void hostapd_new_assoc_sta(struct hostapd_data *hapd, struct sta_info *sta,
    568 			   int reassoc);
    569 void hostapd_interface_deinit_free(struct hostapd_iface *iface);
    570 int hostapd_enable_iface(struct hostapd_iface *hapd_iface);
    571 int hostapd_reload_iface(struct hostapd_iface *hapd_iface);
    572 int hostapd_disable_iface(struct hostapd_iface *hapd_iface);
    573 int hostapd_add_iface(struct hapd_interfaces *ifaces, char *buf);
    574 int hostapd_remove_iface(struct hapd_interfaces *ifaces, char *buf);
    575 void hostapd_channel_list_updated(struct hostapd_iface *iface, int initiator);
    576 void hostapd_set_state(struct hostapd_iface *iface, enum hostapd_iface_state s);
    577 const char * hostapd_state_text(enum hostapd_iface_state s);
    578 int hostapd_csa_in_progress(struct hostapd_iface *iface);
    579 void hostapd_chan_switch_vht_config(struct hostapd_data *hapd, int vht_enabled);
    580 int hostapd_switch_channel(struct hostapd_data *hapd,
    581 			   struct csa_settings *settings);
    582 void
    583 hostapd_switch_channel_fallback(struct hostapd_iface *iface,
    584 				const struct hostapd_freq_params *freq_params);
    585 void hostapd_cleanup_cs_params(struct hostapd_data *hapd);
    586 void hostapd_periodic_iface(struct hostapd_iface *iface);
    587 int hostapd_owe_trans_get_info(struct hostapd_data *hapd);
    588 
    589 /* utils.c */
    590 int hostapd_register_probereq_cb(struct hostapd_data *hapd,
    591 				 int (*cb)(void *ctx, const u8 *sa,
    592 					   const u8 *da, const u8 *bssid,
    593 					   const u8 *ie, size_t ie_len,
    594 					   int ssi_signal),
    595 				 void *ctx);
    596 void hostapd_prune_associations(struct hostapd_data *hapd, const u8 *addr);
    597 
    598 /* drv_callbacks.c (TODO: move to somewhere else?) */
    599 void hostapd_notify_assoc_fils_finish(struct hostapd_data *hapd,
    600 				      struct sta_info *sta);
    601 int hostapd_notif_assoc(struct hostapd_data *hapd, const u8 *addr,
    602 			const u8 *ie, size_t ielen, int reassoc);
    603 void hostapd_notif_disassoc(struct hostapd_data *hapd, const u8 *addr);
    604 void hostapd_event_sta_low_ack(struct hostapd_data *hapd, const u8 *addr);
    605 void hostapd_event_connect_failed_reason(struct hostapd_data *hapd,
    606 					 const u8 *addr, int reason_code);
    607 int hostapd_probe_req_rx(struct hostapd_data *hapd, const u8 *sa, const u8 *da,
    608 			 const u8 *bssid, const u8 *ie, size_t ie_len,
    609 			 int ssi_signal);
    610 void hostapd_event_ch_switch(struct hostapd_data *hapd, int freq, int ht,
    611 			     int offset, int width, int cf1, int cf2);
    612 struct survey_results;
    613 void hostapd_event_get_survey(struct hostapd_iface *iface,
    614 			      struct survey_results *survey_results);
    615 void hostapd_acs_channel_selected(struct hostapd_data *hapd,
    616 				  struct acs_selected_channels *acs_res);
    617 
    618 const struct hostapd_eap_user *
    619 hostapd_get_eap_user(struct hostapd_data *hapd, const u8 *identity,
    620 		     size_t identity_len, int phase2);
    621 
    622 struct hostapd_data * hostapd_get_iface(struct hapd_interfaces *interfaces,
    623 					const char *ifname);
    624 void hostapd_event_sta_opmode_changed(struct hostapd_data *hapd, const u8 *addr,
    625 				      enum smps_mode smps_mode,
    626 				      enum chan_width chan_width, u8 rx_nss);
    627 
    628 #ifdef CONFIG_FST
    629 void fst_hostapd_fill_iface_obj(struct hostapd_data *hapd,
    630 				struct fst_wpa_obj *iface_obj);
    631 #endif /* CONFIG_FST */
    632 
    633 #endif /* HOSTAPD_H */
    634