1 /* 2 * hostapd - Driver operations 3 * Copyright (c) 2009, Jouni Malinen <j@w1.fi> 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License version 2 as 7 * published by the Free Software Foundation. 8 * 9 * Alternatively, this software may be distributed under the terms of BSD 10 * license. 11 * 12 * See README and COPYING for more details. 13 */ 14 15 #ifndef AP_DRV_OPS 16 #define AP_DRV_OPS 17 18 enum wpa_driver_if_type; 19 struct wpa_bss_params; 20 struct wpa_driver_scan_params; 21 22 void hostapd_set_driver_ops(struct hostapd_driver_ops *ops); 23 int hostapd_set_privacy(struct hostapd_data *hapd, int enabled); 24 int hostapd_set_generic_elem(struct hostapd_data *hapd, const u8 *elem, 25 size_t elem_len); 26 int hostapd_get_ssid(struct hostapd_data *hapd, u8 *buf, size_t len); 27 int hostapd_set_ssid(struct hostapd_data *hapd, const u8 *buf, size_t len); 28 int hostapd_if_add(struct hostapd_data *hapd, enum wpa_driver_if_type type, 29 const char *ifname, const u8 *addr, void *bss_ctx, 30 void **drv_priv, char *force_ifname, u8 *if_addr); 31 int hostapd_if_remove(struct hostapd_data *hapd, enum wpa_driver_if_type type, 32 const char *ifname); 33 int hostapd_set_ieee8021x(struct hostapd_data *hapd, 34 struct wpa_bss_params *params); 35 int hostapd_get_seqnum(const char *ifname, struct hostapd_data *hapd, 36 const u8 *addr, int idx, u8 *seq); 37 int hostapd_flush(struct hostapd_data *hapd); 38 int hostapd_set_freq(struct hostapd_data *hapd, int mode, int freq, 39 int channel, int ht_enabled, int sec_channel_offset); 40 int hostapd_set_rts(struct hostapd_data *hapd, int rts); 41 int hostapd_set_frag(struct hostapd_data *hapd, int frag); 42 int hostapd_sta_set_flags(struct hostapd_data *hapd, u8 *addr, 43 int total_flags, int flags_or, int flags_and); 44 int hostapd_set_rate_sets(struct hostapd_data *hapd, int *supp_rates, 45 int *basic_rates, int mode); 46 int hostapd_set_country(struct hostapd_data *hapd, const char *country); 47 int hostapd_set_cts_protect(struct hostapd_data *hapd, int value); 48 int hostapd_set_preamble(struct hostapd_data *hapd, int value); 49 int hostapd_set_short_slot_time(struct hostapd_data *hapd, int value); 50 int hostapd_set_tx_queue_params(struct hostapd_data *hapd, int queue, int aifs, 51 int cw_min, int cw_max, int burst_time); 52 int hostapd_valid_bss_mask(struct hostapd_data *hapd, const u8 *addr, 53 const u8 *mask); 54 struct hostapd_hw_modes * 55 hostapd_get_hw_feature_data(struct hostapd_data *hapd, u16 *num_modes, 56 u16 *flags); 57 int hostapd_driver_commit(struct hostapd_data *hapd); 58 int hostapd_set_ht_params(struct hostapd_data *hapd, 59 const u8 *ht_capab, size_t ht_capab_len, 60 const u8 *ht_oper, size_t ht_oper_len); 61 int hostapd_drv_none(struct hostapd_data *hapd); 62 int hostapd_driver_scan(struct hostapd_data *hapd, 63 struct wpa_driver_scan_params *params); 64 struct wpa_scan_results * hostapd_driver_get_scan_results( 65 struct hostapd_data *hapd); 66 67 #endif /* AP_DRV_OPS */ 68