input stringlengths 16 454k | output stringlengths 13 350k | function_name stringlengths 1 100 | repo_name stringlengths 6 43 | category stringclasses 76
values | sample_id stringlengths 22 88 | decompiler stringclasses 1
value | opt_level stringclasses 1
value |
|---|---|---|---|---|---|---|---|
int i802_set_tx_queue_params(void *priv, int queue, int aifs, int cw_min,
int cw_max, int burst_time) {
int v7;
int res;
nl_msg *msg;
wpa_driver_nl80211_data *drv;
nlattr *txq;
nlattr *params;
drv = *(wpa_driver_nl80211_data **)priv;
msg = nl80211_bss_msg((i802_bss *)priv, ... | static int i802_set_tx_queue_params(void *priv, int queue, int aifs, int cw_min,
int cw_max, int burst_time) {
struct i802_bss *bss = priv;
struct wpa_driver_nl80211_data *drv = bss->drv;
struct nl_msg *msg;
struct nlattr *txq, *params;
int res;
msg = nl80211_bss_msg(bss... | i802_set_tx_queue_params | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int i802_set_wds_sta(void *priv, const u8 *addr, int aid, int val,
const char *bridge_ifname, char *ifname_wds) {
int *v7;
char *v8;
unsigned int v9;
int ret;
wpa_driver_nl80211_data *drv;
wpa_event_data event;
char name[24];
unsigned long v18;
v18 = __readfsqword(0x28u);
drv =... | static int i802_set_wds_sta(void *priv, const u8 *addr, int aid, int val,
const char *bridge_ifname, char *ifname_wds) {
struct i802_bss *bss = priv;
struct wpa_driver_nl80211_data *drv = bss->drv;
char name[IFNAMSIZ + 1];
union wpa_event_data event;
int ret;
ret = os_snprintf(n... | i802_set_wds_sta | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int i802_sta_clear_stats(void *priv, const u8 *addr) { return 0; } | static int i802_sta_clear_stats(void *priv, const u8 *addr) {
#if 0
#endif
return 0;
} | i802_sta_clear_stats | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int i802_sta_deauth(void *priv, const u8 *own_addr, const u8 *addr,
u16 reason) {
u8 channel;
i802_bss *bss;
wpa_driver_nl80211_data *drv;
ieee80211_mgmt mgmt;
unsigned long v11;
v11 = __readfsqword(0x28u);
bss = (i802_bss *)priv;
drv = *(wpa_driver_nl80211_data **)priv;
if (ieee8... | static int i802_sta_deauth(void *priv, const u8 *own_addr, const u8 *addr,
u16 reason) {
struct i802_bss *bss = priv;
struct wpa_driver_nl80211_data *drv = bss->drv;
struct ieee80211_mgmt mgmt;
u8 channel;
if (ieee80211_freq_to_chan(bss->freq, &channel) == HOSTAPD_MODE_IEEE80211AD)... | i802_sta_deauth | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int i802_sta_disassoc(void *priv, const u8 *own_addr, const u8 *addr,
u16 reason) {
wpa_driver_nl80211_data *drv;
ieee80211_mgmt mgmt;
unsigned long v9;
v9 = __readfsqword(0x28u);
drv = *(wpa_driver_nl80211_data **)priv;
if (is_mesh_interface(*(nl80211_iftype *)(*(_QWORD *)priv + 800L... | static int i802_sta_disassoc(void *priv, const u8 *own_addr, const u8 *addr,
u16 reason) {
struct i802_bss *bss = priv;
struct wpa_driver_nl80211_data *drv = bss->drv;
struct ieee80211_mgmt mgmt;
if (is_mesh_interface(drv->nlmode))
return -1;
if (drv->device_ap_sme)
retu... | i802_sta_disassoc | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee80211_11_get_tfs_ie(hostapd_data *hapd, const u8 *addr, u8 *buf,
u16 *buf_len, wnm_oper oper) {
wpa_printf(2, "%s: TFS get operation %d", "ieee80211_11_get_tfs_ie", oper);
return hostapd_drv_wnm_oper(hapd, oper, addr, buf, buf_len);
} | static int ieee80211_11_get_tfs_ie(struct hostapd_data *hapd, const u8 *addr,
u8 *buf, u16 *buf_len, enum wnm_oper oper) {
wpa_printf(MSG_DEBUG, "%s: TFS get operation %d", __func__, oper);
return hostapd_drv_wnm_oper(hapd, oper, addr, buf, buf_len);
} | ieee80211_11_get_tfs_ie | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee80211_11_set_tfs_ie(hostapd_data *hapd, const u8 *addr, u8 *buf,
u16 *buf_len, wnm_oper oper) {
wpa_printf(2, "%s: TFS set operation %d", "ieee80211_11_set_tfs_ie", oper);
return hostapd_drv_wnm_oper(hapd, oper, addr, buf, buf_len);
} | static int ieee80211_11_set_tfs_ie(struct hostapd_data *hapd, const u8 *addr,
u8 *buf, u16 *buf_len, enum wnm_oper oper) {
wpa_printf(MSG_DEBUG, "%s: TFS set operation %d", __func__, oper);
return hostapd_drv_wnm_oper(hapd, oper, addr, buf, buf_len);
} | ieee80211_11_set_tfs_ie | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee80211_chan_to_freq(const char *country, u8 op_class, u8 chan) {
int freq;
int freqa;
int freqb;
int freqc;
if (country_match(us_op_class_cc, country)) {
freq = ieee80211_chan_to_freq_us(op_class, chan);
if (freq > 0)
return freq;
}
if (country_match(eu_op_class_cc, country)) {
f... | int ieee80211_chan_to_freq(const char *country, u8 op_class, u8 chan) {
int freq;
if (country_match(us_op_class_cc, country)) {
freq = ieee80211_chan_to_freq_us(op_class, chan);
if (freq > 0)
return freq;
}
if (country_match(eu_op_class_cc, country)) {
freq = ieee80211_chan_to_freq_eu(op_cla... | ieee80211_chan_to_freq | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee80211_chan_to_freq_cn(u8 op_class, u8 chan) {
int result;
switch (op_class) {
case 1u:
case 2u:
case 4u:
case 5u:
if (chan > 0x23u && chan <= 0x40u)
result = 5 * chan + 5000;
else
result = -1;
break;
case 3u:
case 6u:
if (chan > 0x94u && chan <= 0xA5u)
result =... | static int ieee80211_chan_to_freq_cn(u8 op_class, u8 chan) {
switch (op_class) {
case 7:
case 8:
case 9:
if (chan < 1 || chan > 13)
return -1;
return 2407 + 5 * chan;
case 1:
case 2:
case 4:
case 5:
if (chan < 36 || chan > 64)
return -1;
return 5000 + 5 * chan;
case 3:
ca... | ieee80211_chan_to_freq_cn | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee80211_chan_to_freq_eu(u8 op_class, u8 chan) {
int result;
switch (op_class) {
case 1u:
case 2u:
case 5u:
case 6u:
case 8u:
case 9u:
if (chan > 0x23u && chan <= 0x40u)
result = 5 * chan + 5000;
else
result = -1;
break;
case 3u:
case 7u:
case 0xAu:
case 0x10u:
... | static int ieee80211_chan_to_freq_eu(u8 op_class, u8 chan) {
switch (op_class) {
case 4:
case 11:
case 12:
if (chan < 1 || chan > 13)
return -1;
return 2407 + 5 * chan;
case 1:
case 2:
case 5:
case 6:
case 8:
case 9:
if (chan < 36 || chan > 64)
return -1;
return 5000 + 5 ... | ieee80211_chan_to_freq_eu | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee80211_chan_to_freq_global(u8 op_class, u8 chan) {
int result;
switch (op_class) {
case 0x51u:
if (chan && chan <= 0xDu)
result = 5 * chan + 2407;
else
result = -1;
break;
case 0x52u:
if (chan == 14)
result = 2484;
else
result = -1;
break;
case 0x53u:
... | static int ieee80211_chan_to_freq_global(u8 op_class, u8 chan) {
switch (op_class) {
case 81:
if (chan < 1 || chan > 13)
return -1;
return 2407 + 5 * chan;
case 82:
if (chan != 14)
return -1;
return 2414 + 5 * chan;
case 83:
case 84:
if (chan < 1 || chan > 13)
return -... | ieee80211_chan_to_freq_global | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee80211_chan_to_freq_jp(u8 op_class, u8 chan) {
int result;
switch (op_class) {
case 1u:
case 0x20u:
case 0x21u:
case 0x24u:
case 0x25u:
case 0x26u:
case 0x29u:
case 0x2Au:
case 0x2Bu:
if (chan > 0x21u && chan <= 0x40u)
result = 5 * chan + 5000;
else
result = -1;
bre... | static int ieee80211_chan_to_freq_jp(u8 op_class, u8 chan) {
switch (op_class) {
case 30:
case 56:
case 57:
if (chan < 1 || chan > 13)
return -1;
return 2407 + 5 * chan;
case 31:
if (chan != 14)
return -1;
return 2414 + 5 * chan;
case 1:
case 32:
case 33:
case 36:
case 37... | ieee80211_chan_to_freq_jp | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee80211_chan_to_freq_us(u8 op_class, u8 chan) {
int result;
switch (op_class) {
case 1u:
case 2u:
case 0x16u:
case 0x17u:
case 0x1Bu:
case 0x1Cu:
if (chan > 0x23u && chan <= 0x40u)
result = 5 * chan + 5000;
else
result = -1;
break;
case 3u:
case 0x19u:
case 0x1Au:
... | static int ieee80211_chan_to_freq_us(u8 op_class, u8 chan) {
switch (op_class) {
case 12:
case 32:
case 33:
if (chan < 1 || chan > 11)
return -1;
return 2407 + 5 * chan;
case 1:
case 2:
case 22:
case 23:
case 27:
case 28:
if (chan < 36 || chan > 64)
return -1;
return 5000... | ieee80211_chan_to_freq_us | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee80211_chaninfo_to_channel(unsigned int freq, chan_width chanwidth,
int sec_channel, u8 *op_class, u8 *channel) {
hostapd_hw_mode v5;
int cw;
cw = 10;
switch (chanwidth) {
case chan_width_CHAN_WIDTH_20_NOHT:
case chan_width_CHAN_WIDTH_20:
case chan_width_CHAN_WIDT... | int ieee80211_chaninfo_to_channel(unsigned int freq, enum chan_width chanwidth,
int sec_channel, u8 *op_class, u8 *channel) {
int cw = CHAN_WIDTH_UNKNOWN;
switch (chanwidth) {
case CHAN_WIDTH_UNKNOWN:
case CHAN_WIDTH_20_NOHT:
case CHAN_WIDTH_20:
case CHAN_WIDTH_40:
cw ... | ieee80211_chaninfo_to_channel | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
hostapd_hw_mode ieee80211_freq_to_chan(int freq, u8 *channel) {
u8 op_class;
unsigned long v4;
v4 = __readfsqword(0x28u);
return ieee80211_freq_to_channel_ext(freq, 0, 0, &op_class, channel);
} | enum hostapd_hw_mode ieee80211_freq_to_chan(int freq, u8 *channel) {
u8 op_class;
return ieee80211_freq_to_channel_ext(freq, 0, CHANWIDTH_USE_HT, &op_class,
channel);
} | ieee80211_freq_to_chan | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
hostapd_hw_mode ieee80211_freq_to_channel_ext(unsigned int freq,
int sec_channel, int chanwidth,
u8 *op_class, u8 *channel) {
hostapd_hw_mode result;
u8 vht_opclass;
if (sec_channel > 1 || sec_channel < -1)
return hos... | enum hostapd_hw_mode ieee80211_freq_to_channel_ext(unsigned int freq,
int sec_channel,
int chanwidth, u8 *op_class,
u8 *channel) {
u8 vht_opclass;
if (sec_channel... | ieee80211_freq_to_channel_ext | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
phy_type ieee80211_get_phy_type(int freq, int ht, int vht) {
if (vht)
return phy_type_PHY_TYPE_VHT;
if (ht)
return phy_type_PHY_TYPE_HT;
return ieee80211_phy_type_by_freq(freq);
} | enum phy_type ieee80211_get_phy_type(int freq, int ht, int vht) {
if (vht)
return PHY_TYPE_VHT;
if (ht)
return PHY_TYPE_HT;
return ieee80211_phy_type_by_freq(freq);
} | ieee80211_get_phy_type | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee80211_is_dfs(int freq, const hostapd_hw_modes *modes, u16 num_modes) {
int i;
int j;
if (!modes || !num_modes)
return freq > 5259 && freq <= 5320 || freq > 5499 && freq <= 5700;
for (i = 0; i < num_modes; ++i) {
for (j = 0; j < modes[i].num_channels; ++j) {
if (freq == modes[i].channels[j... | int ieee80211_is_dfs(int freq, const struct hostapd_hw_modes *modes,
u16 num_modes) {
int i, j;
if (!modes || !num_modes)
return (freq >= 5260 && freq <= 5320) || (freq >= 5500 && freq <= 5700);
for (i = 0; i < num_modes; i++) {
for (j = 0; j < modes[i].num_channels; j++) {
if... | ieee80211_is_dfs | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
phy_type ieee80211_phy_type_by_freq(int freq) {
u8 channel;
hostapd_hw_mode hw_mode;
unsigned long v4;
v4 = __readfsqword(0x28u);
hw_mode = ieee80211_freq_to_chan(freq, &channel);
if (hw_mode == hostapd_hw_mode_HOSTAPD_MODE_IEEE80211AD)
return phy_type_PHY_TYPE_DMG;
if ((unsigned int)hw_mode > hostap... | static enum phy_type ieee80211_phy_type_by_freq(int freq) {
enum hostapd_hw_mode hw_mode;
u8 channel;
hw_mode = ieee80211_freq_to_chan(freq, &channel);
switch (hw_mode) {
case HOSTAPD_MODE_IEEE80211A:
return PHY_TYPE_OFDM;
case HOSTAPD_MODE_IEEE80211B:
return PHY_TYPE_HRDSSS;
case HOSTAPD_MODE_I... | ieee80211_phy_type_by_freq | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee80211_radiotap_iterator_init(
ieee80211_radiotap_iterator *iterator,
ieee80211_radiotap_header *radiotap_header, int max_length,
const ieee80211_radiotap_vendor_namespaces *vns) {
if (max_length <= 7)
return -22;
if (radiotap_header->it_version)
return -22;
if (max_length < WPA_GET_LE1... | int ieee80211_radiotap_iterator_init(
struct ieee80211_radiotap_iterator *iterator,
struct ieee80211_radiotap_header *radiotap_header, int max_length,
const struct ieee80211_radiotap_vendor_namespaces *vns) {
if (max_length < (int)sizeof(struct ieee80211_radiotap_header))
return -EINVAL;
if (radio... | ieee80211_radiotap_iterator_init | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee80211_radiotap_iterator_next(ieee80211_radiotap_iterator *iterator) {
int v2;
u16 v3;
int v4;
int hit;
int align;
int size;
int pad;
do {
hit = 0;
if (iterator->_arg_index % 32 == 31 && (iterator->_bitmap_shifter & 1) == 0)
return -2;
if ((iterator->_bitmap_shifter & 1) == 0)
... | int ieee80211_radiotap_iterator_next(
struct ieee80211_radiotap_iterator *iterator) {
while (1) {
int hit = 0;
int pad, align, size, subns;
uint32_t oui;
if ((iterator->_arg_index % 32) == IEEE80211_RADIOTAP_EXT &&
!(iterator->_bitmap_shifter & 1))
return -ENOENT;
if (!(iterato... | ieee80211_radiotap_iterator_next | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ieee80211_tkip_countermeasures_deinit(hostapd_data *hapd) {
eloop_cancel_timeout(
(eloop_timeout_handler)ieee80211_tkip_countermeasures_stop, hapd, 0);
} | void ieee80211_tkip_countermeasures_deinit(struct hostapd_data *hapd) {
eloop_cancel_timeout(ieee80211_tkip_countermeasures_stop, hapd, NULL);
} | ieee80211_tkip_countermeasures_deinit | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ieee80211_tkip_countermeasures_start(hostapd_data *hapd) {
sta_info *sta;
hostapd_logger(hapd, 0, 1u, 2, "TKIP countermeasures initiated");
wpa_auth_countermeasures_start(hapd->wpa_auth);
hapd->tkip_countermeasures = 1;
hostapd_drv_set_countermeasures(hapd, 1);
wpa_gtk_rekey(hapd->wpa_auth);
eloop_c... | static void ieee80211_tkip_countermeasures_start(struct hostapd_data *hapd) {
struct sta_info *sta;
hostapd_logger(hapd, NULL, HOSTAPD_MODULE_IEEE80211, HOSTAPD_LEVEL_INFO,
"TKIP countermeasures initiated");
wpa_auth_countermeasures_start(hapd->wpa_auth);
hapd->tkip_countermeasures = 1;
hos... | ieee80211_tkip_countermeasures_start | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ieee80211_tkip_countermeasures_stop(void *eloop_ctx, void *timeout_ctx) {
long v2;
*((_DWORD *)eloop_ctx + 621) = 0;
hostapd_drv_set_countermeasures((hostapd_data *)eloop_ctx, 0);
hostapd_logger(eloop_ctx, 0, 1u, 2, "TKIP countermeasures ended", v2,
timeout_ctx, eloop_ctx);
} | static void ieee80211_tkip_countermeasures_stop(void *eloop_ctx,
void *timeout_ctx) {
struct hostapd_data *hapd = eloop_ctx;
hapd->tkip_countermeasures = 0;
hostapd_drv_set_countermeasures(hapd, 0);
hostapd_logger(hapd, NULL, HOSTAPD_MODULE_IEEE80211, HOSTAPD_LEVE... | ieee80211_tkip_countermeasures_stop | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee80211ac_cap_check_max(u32 hw, u32 conf, u32 mask, unsigned int shift,
const char *name) {
if ((mask & conf) <= (mask & hw))
return 1;
wpa_printf(5,
"Configured VHT capability [%s] exceeds max value supported by "
"the driver (%d > %d)",
... | static int ieee80211ac_cap_check_max(u32 hw, u32 conf, u32 mask,
unsigned int shift, const char *name) {
u32 hw_max = hw & mask;
u32 conf_val = conf & mask;
if (conf_val > hw_max) {
wpa_printf(MSG_ERROR,
"Configured VHT capability [%s] exceeds max value sup... | ieee80211ac_cap_check_max | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee80211ac_supported_vht_capab(hostapd_iface *iface) {
u32 hw;
u32 hwa;
int i;
u32 conf;
hostapd_hw_modes *mode;
mode = iface->current_mode;
hw = mode->vht_capab;
conf = iface->conf->vht_capab;
wpa_printf(2, "hw vht capab: 0x%x, conf vht capab: 0x%x", hw, conf);
if (mode->mode == hostapd_hw_mo... | static int ieee80211ac_supported_vht_capab(struct hostapd_iface *iface) {
struct hostapd_hw_modes *mode = iface->current_mode;
u32 hw = mode->vht_capab;
u32 conf = iface->conf->vht_capab;
wpa_printf(MSG_DEBUG, "hw vht capab: 0x%x, conf vht capab: 0x%x", hw, conf);
if (mode->mode == HOSTAPD_MODE_IEEE80211G &... | ieee80211ac_supported_vht_capab | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee80211n_allowed_ht40_channel_pair(hostapd_iface *iface) {
int pri_freq;
int sec_freq;
hostapd_channel_data *p_chan;
hostapd_channel_data *s_chan;
pri_freq = iface->freq;
sec_freq = 20 * iface->conf->secondary_channel + pri_freq;
if (!iface->current_mode)
return 0;
p_chan = hw_get_channel_fre... | static int ieee80211n_allowed_ht40_channel_pair(struct hostapd_iface *iface) {
int pri_freq, sec_freq;
struct hostapd_channel_data *p_chan, *s_chan;
pri_freq = iface->freq;
sec_freq = pri_freq + iface->conf->secondary_channel * 20;
if (!iface->current_mode)
return 0;
p_chan = hw_get_channel_freq(ifac... | ieee80211n_allowed_ht40_channel_pair | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee80211n_check_40mhz(hostapd_iface *iface) {
char *v2;
char *v3;
int ret;
wpa_driver_scan_params params;
unsigned long v6;
v6 = __readfsqword(0x28u);
if (!iface->conf->secondary_channel || iface->conf->no_pri_sec_switch)
return 0;
hostapd_set_state(iface, hostapd_iface_state_HAPD_IFACE_HT_SCA... | static int ieee80211n_check_40mhz(struct hostapd_iface *iface) {
struct wpa_driver_scan_params params;
int ret;
if (!iface->conf->secondary_channel || iface->conf->no_pri_sec_switch)
return 0;
hostapd_set_state(iface, HAPD_IFACE_HT_SCAN);
wpa_printf(MSG_DEBUG, "Scan for neighboring BSSes prior to enabli... | ieee80211n_check_40mhz | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee80211n_check_40mhz_2g4(hostapd_iface *iface,
wpa_scan_results *scan_res) {
return check_40mhz_2g4(iface->current_mode, scan_res, iface->conf->channel,
4 * iface->conf->secondary_channel +
iface->conf->channel);
} | static int ieee80211n_check_40mhz_2g4(struct hostapd_iface *iface,
struct wpa_scan_results *scan_res) {
int pri_chan, sec_chan;
pri_chan = iface->conf->channel;
sec_chan = pri_chan + iface->conf->secondary_channel * 4;
return check_40mhz_2g4(iface->current_mode, scan_res,... | ieee80211n_check_40mhz_2g4 | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee80211n_check_40mhz_5g(hostapd_iface *iface,
wpa_scan_results *scan_res) {
hostapd_channel_data *channel_freq;
unsigned int pri_freq;
unsigned int sec_freq;
int res;
hostapd_channel_data *pri_chan;
pri_freq = iface->freq;
sec_freq = 20 * iface->conf->secondary_channel... | static int ieee80211n_check_40mhz_5g(struct hostapd_iface *iface,
struct wpa_scan_results *scan_res) {
unsigned int pri_freq, sec_freq;
int res;
struct hostapd_channel_data *pri_chan, *sec_chan;
pri_freq = iface->freq;
sec_freq = pri_freq + iface->conf->secondary_channel ... | ieee80211n_check_40mhz_5g | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ieee80211n_check_scan(hostapd_iface *iface) {
int oper40;
int res;
wpa_scan_results *scan_res;
res = 0;
iface->scan_cb = 0;
scan_res = hostapd_driver_get_scan_results(*iface->bss);
if (scan_res) {
if (iface->current_mode->mode == hostapd_hw_mode_HOSTAPD_MODE_IEEE80211A)
oper40 = ieee80211n... | static void ieee80211n_check_scan(struct hostapd_iface *iface) {
struct wpa_scan_results *scan_res;
int oper40;
int res = 0;
iface->scan_cb = NULL;
scan_res = hostapd_driver_get_scan_results(iface->bss[0]);
if (scan_res == NULL) {
hostapd_setup_interface_complete(iface, 1);
return;
}
if (ifac... | ieee80211n_check_scan | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ieee80211n_scan_channels_2g4(hostapd_iface *iface,
wpa_driver_scan_params *params) {
int v2;
int sec_freq;
int i;
int pos;
int pri_freq;
hostapd_hw_modes *mode;
hostapd_channel_data *chan;
if (iface->current_mode) {
pri_freq = iface->freq;
sec_freq =
... | static void
ieee80211n_scan_channels_2g4(struct hostapd_iface *iface,
struct wpa_driver_scan_params *params) {
int pri_freq, sec_freq;
int affected_start, affected_end;
int i, pos;
struct hostapd_hw_modes *mode;
if (iface->current_mode == NULL)
return;
pri_freq = iface->f... | ieee80211n_scan_channels_2g4 | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ieee80211n_scan_channels_5g(hostapd_iface *iface,
wpa_driver_scan_params *params) {
int v2;
int affected_start;
int affected_end;
int i;
int pos;
int pri_freq;
hostapd_hw_modes *mode;
hostapd_channel_data *chan;
if (iface->current_mode) {
pri_freq = iface->fr... | static void ieee80211n_scan_channels_5g(struct hostapd_iface *iface,
struct wpa_driver_scan_params *params) {
int pri_freq;
int affected_start, affected_end;
int i, pos;
struct hostapd_hw_modes *mode;
if (iface->current_mode == NULL)
return;
pri_freq = iface->f... | ieee80211n_scan_channels_5g | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee80211n_supported_ht_capab(hostapd_iface *iface) {
short hw;
short conf;
hw = iface->current_mode->ht_capab;
conf = iface->conf->ht_capab;
if ((conf & 1) == 0 || (hw & 1) != 0) {
if (iface->conf->acs || (conf & 2) == 0 || (hw & 2) != 0) {
if ((conf & 0x10) == 0 || (hw & 0x10) != 0) {
... | static int ieee80211n_supported_ht_capab(struct hostapd_iface *iface) {
u16 hw = iface->current_mode->ht_capab;
u16 conf = iface->conf->ht_capab;
if ((conf & HT_CAP_INFO_LDPC_CODING_CAP) &&
!(hw & HT_CAP_INFO_LDPC_CODING_CAP)) {
wpa_printf(MSG_ERROR, "Driver does not support configured "
... | ieee80211n_supported_ht_capab | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ieee80211n_switch_pri_sec(hostapd_iface *iface) {
if (iface->conf->secondary_channel <= 0) {
iface->conf->channel -= 4;
iface->freq -= 20;
iface->conf->secondary_channel = 1;
} else {
iface->conf->channel += 4;
iface->freq += 20;
iface->conf->secondary_channel = -1;
}
} | static void ieee80211n_switch_pri_sec(struct hostapd_iface *iface) {
if (iface->conf->secondary_channel > 0) {
iface->conf->channel += 4;
iface->freq += 20;
iface->conf->secondary_channel = -1;
} else {
iface->conf->channel -= 4;
iface->freq -= 20;
iface->conf->secondary_channel = 1;
}
} | ieee80211n_switch_pri_sec | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
u8 *ieee80211w_kde_add(wpa_state_machine *sm, u8 *pos) {
u8 *posa;
wpa_group *gsm;
wpa_auth_config *conf;
size_t len;
wpa_igtk_kde igtk;
wpa_bigtk_kde bigtk;
u8 rsc[8];
unsigned long v10;
v10 = __readfsqword(0x28u);
gsm = sm->group;
conf = &sm->wpa_auth->conf;
len = wpa_cipher_key_len(sm->wpa_a... | static u8 *ieee80211w_kde_add(struct wpa_state_machine *sm, u8 *pos) {
struct wpa_igtk_kde igtk;
struct wpa_bigtk_kde bigtk;
struct wpa_group *gsm = sm->group;
u8 rsc[WPA_KEY_RSC_LEN];
struct wpa_auth_config *conf = &sm->wpa_auth->conf;
size_t len = wpa_cipher_key_len(conf->group_mgmt_cipher);
if (!sm->m... | ieee80211w_kde_add | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee80211w_kde_len(wpa_state_machine *sm) {
size_t len;
len = 0;
if ((*((_BYTE *)sm + 680) & 0x10) != 0)
len = wpa_cipher_key_len(sm->wpa_auth->conf.group_mgmt_cipher) + 14LL;
if ((*((_BYTE *)sm + 680) & 0x10) != 0 && sm->wpa_auth->conf.beacon_prot)
len += wpa_cipher_key_len(sm->wpa_auth->conf.grou... | static int ieee80211w_kde_len(struct wpa_state_machine *sm) {
size_t len = 0;
if (sm->mgmt_frame_prot) {
len += 2 + RSN_SELECTOR_LEN + WPA_IGTK_KDE_PREFIX_LEN;
len += wpa_cipher_key_len(sm->wpa_auth->conf.group_mgmt_cipher);
}
if (sm->mgmt_frame_prot && sm->wpa_auth->conf.beacon_prot) {
len += 2 + ... | ieee80211w_kde_len | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee802_11_allowed_address(hostapd_data *hapd, const u8 *addr,
const u8 *msg, size_t len, radius_sta *info) {
int res;
res = hostapd_allowed_address(hapd, addr, msg, len, info, 0);
if (res) {
if (res == 2) {
wpa_printf(2,
"Authentication frame from %0... | static int ieee802_11_allowed_address(struct hostapd_data *hapd, const u8 *addr,
const u8 *msg, size_t len,
struct radius_sta *info) {
int res;
res = hostapd_allowed_address(hapd, addr, msg, len, info, 0);
if (res == HOSTAPD_ACL_REJECT)... | ieee802_11_allowed_address | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee802_11_build_ap_params(hostapd_data *hapd,
wpa_driver_ap_params *params) {
size_t ssid_len;
u8 *v4;
u8 *v5;
size_t v6;
u8 *v7;
u8 *v8;
u8 *v9;
u8 *v10;
u8 *v11;
u8 *v12;
u8 *v13;
u8 *v14;
u8 *v15;
u8 *v16;
u8 *v17;
size_t v18;
const void *v19;
u... | int ieee802_11_build_ap_params(struct hostapd_data *hapd,
struct wpa_driver_ap_params *params) {
struct ieee80211_mgmt *head = NULL;
u8 *tail = NULL;
size_t head_len = 0, tail_len = 0;
u8 *resp = NULL;
size_t resp_len = 0;
#ifdef NEED_AP_MLME
u16 capab_info;
u8 *pos, *tailpo... | ieee802_11_build_ap_params | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *ieee802_11_defrag(ieee802_11_elems *elems, u8 eid, u8 eid_ext) {
u8 len;
const u8 *data;
if (eid == 255) {
if (eid_ext == 5) {
data = elems->fils_hlp;
len = elems->fils_hlp_len;
} else {
if (eid_ext != 8) {
wpa_printf(2, "Defragmentation not supported. eid_ext=%u", eid_e... | struct wpabuf *ieee802_11_defrag(struct ieee802_11_elems *elems, u8 eid,
u8 eid_ext) {
const u8 *data;
u8 len;
switch (eid) {
case WLAN_EID_EXTENSION:
switch (eid_ext) {
case WLAN_EID_EXT_FILS_HLP_CONTAINER:
data = elems->fils_hlp;
len = elems->fils_hlp_len;... | ieee802_11_defrag | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *ieee802_11_defrag_data(ieee802_11_elems *elems, u8 eid, u8 eid_ext,
const u8 *data, u8 len) {
unsigned int i;
wpabuf *buf;
frag_ies_info *frag_ies;
unsigned long v10;
v10 = __readfsqword(0x28u);
frag_ies = &elems->frag_ies;
if (!elems || !data || !len)
return 0;... | struct wpabuf *ieee802_11_defrag_data(struct ieee802_11_elems *elems, u8 eid,
u8 eid_ext, const u8 *data, u8 len) {
struct frag_ies_info *frag_ies = &elems->frag_ies;
struct wpabuf *buf;
unsigned int i;
if (!elems || !data || !len)
return NULL;
buf = wpabuf_alloc_co... | ieee802_11_defrag_data | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
u8 ieee802_11_erp_info(hostapd_data *hapd) {
u8 erp;
erp = 0;
if (!hapd->iface->current_mode || hapd->iface->current_mode->mode !=
hostapd_hw_mode_HOSTAPD_MODE_IEEE80211G)
return 0;
if (hapd->iface->olbc)
erp = 2;
if (hapd->iface->num_sta_non_erp > 0)
erp |... | static u8 ieee802_11_erp_info(struct hostapd_data *hapd) {
u8 erp = 0;
if (hapd->iface->current_mode == NULL ||
hapd->iface->current_mode->mode != HOSTAPD_MODE_IEEE80211G)
return 0;
if (hapd->iface->olbc)
erp |= ERP_INFO_USE_PROTECTION;
if (hapd->iface->num_sta_non_erp > 0) {
erp |= ERP_INFO... | ieee802_11_erp_info | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee802_11_ext_capab(const u8 *ie, unsigned int capab) {
return ie && ie[1] > capab >> 3 &&
((ie[(capab >> 3) + 2] >> (capab & 7)) & 1) != 0;
} | int ieee802_11_ext_capab(const u8 *ie, unsigned int capab) {
if (!ie || ie[1] <= capab / 8)
return 0;
return !!(ie[2 + capab / 8] & BIT(capab % 8));
} | ieee802_11_ext_capab | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ieee802_11_free_ap_params(wpa_driver_ap_params *params) {
free(params->tail);
params->tail = 0;
free(params->head);
params->head = 0;
free(params->proberesp);
params->proberesp = 0;
} | void ieee802_11_free_ap_params(struct wpa_driver_ap_params *params) {
os_free(params->tail);
params->tail = NULL;
os_free(params->head);
params->head = NULL;
os_free(params->proberesp);
params->proberesp = NULL;
#ifdef CONFIG_FILS
os_free(params->fd_frame_tmpl);
params->fd_frame_tmpl = NULL;
#endif
#ifd... | ieee802_11_free_ap_params | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee802_11_get_mib(hostapd_data *hapd, char *buf, size_t buflen) {
return 0;
} | int ieee802_11_get_mib(struct hostapd_data *hapd, char *buf, size_t buflen) {
return 0;
} | ieee802_11_get_mib | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee802_11_get_mib_sta(hostapd_data *hapd, sta_info *sta, char *buf,
size_t buflen) {
return 0;
} | int ieee802_11_get_mib_sta(struct hostapd_data *hapd, struct sta_info *sta,
char *buf, size_t buflen) {
return 0;
} | ieee802_11_get_mib_sta | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee802_11_ie_count(const u8 *ies, size_t ies_len) {
int count;
const element *elem;
count = 0;
if (!ies)
return 0;
for (elem = (const element *)ies;
&ies[ies_len] - (const u8 *)elem > 1 &&
&ies[ies_len] - (const u8 *)elem >= elem->datalen + 2;
elem = (const element *)((char *)el... | int ieee802_11_ie_count(const u8 *ies, size_t ies_len) {
const struct element *elem;
int count = 0;
if (ies == NULL)
return 0;
for_each_element(elem, ies, ies_len) count++;
return count;
} | ieee802_11_ie_count | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee802_11_mgmt(hostapd_data *hapd, const u8 *buf, size_t len,
hostapd_frame_info *fi) {
int v4;
u16 stype;
int ret;
unsigned int freq;
int ssi_signal;
ret = 0;
if (fi)
v4 = fi->ssi_signal;
else
v4 = 0;
ssi_signal = v4;
if (len <= 0x17)
return 0;
if (fi && fi->... | int ieee802_11_mgmt(struct hostapd_data *hapd, const u8 *buf, size_t len,
struct hostapd_frame_info *fi) {
struct ieee80211_mgmt *mgmt;
u16 fc, stype;
int ret = 0;
unsigned int freq;
int ssi_signal = fi ? fi->ssi_signal : 0;
if (len < 24)
return 0;
if (fi && fi->freq)
freq = ... | ieee802_11_mgmt | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ieee802_11_mgmt_cb(hostapd_data *hapd, const u8 *buf, size_t len,
u16 stype, int ok) {
switch (stype) {
case 1u:
wpa_printf(2, "mgmt::assoc_resp cb");
handle_assoc_cb(hapd, (const ieee80211_mgmt *)buf, len, 0, ok);
break;
case 3u:
wpa_printf(2, "mgmt::reassoc_resp cb")... | void ieee802_11_mgmt_cb(struct hostapd_data *hapd, const u8 *buf, size_t len,
u16 stype, int ok) {
const struct ieee80211_mgmt *mgmt;
mgmt = (const struct ieee80211_mgmt *)buf;
#ifdef CONFIG_TESTING_OPTIONS
if (hapd->ext_mgmt_frame_handling) {
size_t hex_len = 2 * len + 1;
char *h... | ieee802_11_mgmt_cb | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee802_11_parse_candidate_list(const char *pos, u8 *nei_rep,
size_t nei_rep_len) {
u8 *v4;
u8 v5;
u8 *v6;
u8 v7;
u8 *v8;
u8 v9;
u8 *v10;
char *posb;
const char *posc;
const char *posd;
char *posh;
char *pose;
const char *posi;
char *posf;
char *posg... | int ieee802_11_parse_candidate_list(const char *pos, u8 *nei_rep,
size_t nei_rep_len) {
u8 *nei_pos = nei_rep;
const char *end;
while (pos) {
u8 *nei_start;
long int val;
char *endptr, *tmp;
pos = os_strstr(pos, " neighbor=");
if (!pos)
break;
if... | ieee802_11_parse_candidate_list | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
ParseRes ieee802_11_parse_elems(const u8 *start, size_t len,
ieee802_11_elems *elems, int show_errors) {
u8 id;
u8 elen;
int unknown;
const element *elem;
const u8 *pos;
unknown = 0;
memset(elems, 0, sizeof(ieee802_11_elems));
if (!start)
return ParseOK;
for (elem ... | ParseRes ieee802_11_parse_elems(const u8 *start, size_t len,
struct ieee802_11_elems *elems,
int show_errors) {
const struct element *elem;
int unknown = 0;
os_memset(elems, 0, sizeof(*elems));
if (!start)
return ParseOK;
for_each_element(... | ieee802_11_parse_elems | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee802_11_parse_extension(const u8 *pos, size_t elen,
ieee802_11_elems *elems, int show_errors) {
int result;
size_t elena;
const u8 *posa;
u8 ext_id;
if (elen) {
posa = pos + 1;
ext_id = *pos;
elena = elen - 1;
elems->frag_ies.last_eid_ext = 0;
switch ... | static int ieee802_11_parse_extension(const u8 *pos, size_t elen,
struct ieee802_11_elems *elems,
int show_errors) {
u8 ext_id;
if (elen < 1) {
if (show_errors) {
wpa_printf(MSG_MSGDUMP, "short information element (Ext)");
}
... | ieee802_11_parse_extension | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ieee802_11_parse_fragment(frag_ies_info *frag_ies, const u8 *pos,
u8 elen) {
if (frag_ies->n_frags <= 2u) {
if (frag_ies->last_eid) {
frag_ies->frags[frag_ies->n_frags].ie = pos;
frag_ies->frags[frag_ies->n_frags].ie_len = elen;
frag_ies->frags[frag_ies->n_fra... | static void ieee802_11_parse_fragment(struct frag_ies_info *frag_ies,
const u8 *pos, u8 elen) {
if (frag_ies->n_frags >= MAX_NUM_FRAG_IES_SUPPORTED) {
wpa_printf(MSG_MSGDUMP, "Too many element fragments - skip");
return;
}
if (!frag_ies->last_eid) {
wpa_printf(MS... | ieee802_11_parse_fragment | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee802_11_parse_vendor_specific(const u8 *pos, size_t elen,
ieee802_11_elems *elems, int show_errors) {
int result;
int v5;
int v6;
u32 oui;
if (elen <= 3) {
if (show_errors)
wpa_printf(1,
"short vendor specific information element ignored ... | static int ieee802_11_parse_vendor_specific(const u8 *pos, size_t elen,
struct ieee802_11_elems *elems,
int show_errors) {
unsigned int oui;
if (elen < 4) {
if (show_errors) {
wpa_printf(MSG_MSGDUMP,
... | ieee802_11_parse_vendor_specific | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
bool ieee802_11_rsnx_capab(const u8 *rsnxe, unsigned int capab) {
size_t v2;
const u8 *v3;
if (rsnxe)
v2 = rsnxe[1];
else
v2 = 0;
if (rsnxe)
v3 = rsnxe + 2;
else
v3 = 0;
return ieee802_11_rsnx_capab_len(v3, v2, capab);
} | bool ieee802_11_rsnx_capab(const u8 *rsnxe, unsigned int capab) {
return ieee802_11_rsnx_capab_len(rsnxe ? rsnxe + 2 : NULL,
rsnxe ? rsnxe[1] : 0, capab);
} | ieee802_11_rsnx_capab | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
bool ieee802_11_rsnx_capab_len(const u8 *rsnxe, size_t rsnxe_len,
unsigned int capab) {
u32 capabs;
size_t flen;
size_t i;
capabs = 0;
if (!rsnxe || !rsnxe_len)
return 0;
flen = (*rsnxe & 0xF) + 1;
if (&rsnxe[rsnxe_len] < &rsnxe[flen])
return 0;
if (flen > 4)
... | bool ieee802_11_rsnx_capab_len(const u8 *rsnxe, size_t rsnxe_len,
unsigned int capab) {
const u8 *end;
size_t flen, i;
u32 capabs = 0;
if (!rsnxe || rsnxe_len == 0)
return false;
end = rsnxe + rsnxe_len;
flen = (rsnxe[0] & 0x0f) + 1;
if (rsnxe + flen > end)
return f... | ieee802_11_rsnx_capab_len | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ieee802_11_rx_bss_trans_mgmt_query(hostapd_data *hapd, const u8 *addr,
const u8 *frm, size_t len) {
u8 dialog_token;
if (hapd->conf->bss_transition) {
if (len > 1) {
dialog_token = *frm;
wpa_printf(2,
"WNM: BSS Transition Management Quer... | static void ieee802_11_rx_bss_trans_mgmt_query(struct hostapd_data *hapd,
const u8 *addr, const u8 *frm,
size_t len) {
u8 dialog_token, reason;
const u8 *pos, *end;
int enabled = hapd->conf->bss_transition;
#ifdef CONFI... | ieee802_11_rx_bss_trans_mgmt_query | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ieee802_11_rx_bss_trans_mgmt_resp(hostapd_data *hapd, const u8 *addr,
const u8 *frm, size_t len) {
u8 status_code;
u8 bss_termination_delay;
const u8 *pos;
const u8 *end;
sta_info *sta;
if (!hapd->conf->bss_transition) {
wpa_printf(2,
"Ignore B... | static void ieee802_11_rx_bss_trans_mgmt_resp(struct hostapd_data *hapd,
const u8 *addr, const u8 *frm,
size_t len) {
u8 dialog_token, status_code, bss_termination_delay;
const u8 *pos, *end;
int enabled = hapd->conf->bss_... | ieee802_11_rx_bss_trans_mgmt_resp | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ieee802_11_rx_from_unknown(hostapd_data *hapd, const u8 *src, int wds) {
u32 flags;
sta_info *sta;
char ifname_wds[24];
unsigned long v7;
v7 = __readfsqword(0x28u);
sta = ap_get_sta(hapd, src);
if (sta && ((sta->flags & 2) != 0 || (sta->flags & 0x8000) != 0 && wds)) {
if (hapd->conf->wds_sta) {
... | void ieee802_11_rx_from_unknown(struct hostapd_data *hapd, const u8 *src,
int wds) {
struct sta_info *sta;
sta = ap_get_sta(hapd, src);
if (sta && ((sta->flags & WLAN_STA_ASSOC) ||
((sta->flags & WLAN_STA_ASSOC_REQ_OK) && wds))) {
if (!hapd->conf->wds_sta)
... | ieee802_11_rx_from_unknown | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee802_11_rx_wnm_action_ap(hostapd_data *hapd, const ieee80211_mgmt *mgmt,
size_t len) {
int result;
u8 action;
u8 *payload;
size_t plen;
if (len <= 0x19)
return -1;
payload = &mgmt->u.beacon.timestamp[2];
action = mgmt->u.beacon.timestamp[1];
plen = len - 26;
... | int ieee802_11_rx_wnm_action_ap(struct hostapd_data *hapd,
const struct ieee80211_mgmt *mgmt, size_t len) {
u8 action;
const u8 *payload;
size_t plen;
if (len < IEEE80211_HDRLEN + 2)
return -1;
payload = ((const u8 *)mgmt) + IEEE80211_HDRLEN + 1;
action = *payload++;
... | ieee802_11_rx_wnm_action_ap | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ieee802_11_rx_wnm_coloc_intf_report(hostapd_data *hapd, const u8 *addr,
const u8 *buf, size_t len) {
size_t lena;
const u8 *bufa;
u8 dialog_token;
char *hex;
if (hapd->conf->coloc_intf_reporting) {
if (len) {
bufa = buf + 1;
dialog_token = *buf;
... | static void ieee802_11_rx_wnm_coloc_intf_report(struct hostapd_data *hapd,
const u8 *addr, const u8 *buf,
size_t len) {
u8 dialog_token;
char *hex;
size_t hex_len;
if (!hapd->conf->coloc_intf_reporting) {
wpa_pr... | ieee802_11_rx_wnm_coloc_intf_report | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ieee802_11_rx_wnm_notification_req(hostapd_data *hapd, const u8 *addr,
const u8 *buf, size_t len) {
size_t lena;
const u8 *bufa;
u8 type;
if (len > 1) {
bufa = buf + 2;
type = buf[1];
lena = len - 2;
wpa_printf(2,
"WNM: Received WNM No... | static void ieee802_11_rx_wnm_notification_req(struct hostapd_data *hapd,
const u8 *addr, const u8 *buf,
size_t len) {
u8 dialog_token, type;
if (len < 2)
return;
dialog_token = *buf++;
type = *buf++;
len -= 2;
... | ieee802_11_rx_wnm_notification_req | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ieee802_11_rx_wnmsleep_req(hostapd_data *hapd, const u8 *addr,
const u8 *frm, int len) {
u8 *v4;
int seg1_idx;
int v6;
u8 oci_ie_len;
u8 dialog_token;
u8 ie_len;
u16 tfsreq_ie_len;
const u8 *pos;
wnm_sleep_element *wnmsleep_ie;
u8 *tfsreq_ie_start;
u8 *tfsreq_i... | static void ieee802_11_rx_wnmsleep_req(struct hostapd_data *hapd,
const u8 *addr, const u8 *frm, int len) {
const u8 *pos = frm;
u8 dialog_token;
struct wnm_sleep_element *wnmsleep_ie = NULL;
u8 *tfsreq_ie_start = NULL;
u8 *tfsreq_ie_end = NULL;
u16 tfsreq_ie_len = 0... | ieee802_11_rx_wnmsleep_req | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ieee802_11_sa_query_action(hostapd_data *hapd, const ieee80211_mgmt *mgmt,
size_t len) {
int seg1_idx;
int v4;
const char *v5;
u8 action_type;
int tx_chanwidth;
int tx_seg1_idx;
int i;
const u8 *sa;
const u8 *trans_id;
sta_info *sta;
const u8 *ies;
size_t ies... | void ieee802_11_sa_query_action(struct hostapd_data *hapd,
const struct ieee80211_mgmt *mgmt, size_t len) {
struct sta_info *sta;
int i;
const u8 *sa = mgmt->sa;
const u8 action_type = mgmt->u.action.u.sa_query_resp.action;
const u8 *trans_id = mgmt->u.action.u.sa_query_resp.tr... | ieee802_11_sa_query_action | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee802_11_send_bss_trans_mgmt_request(hostapd_data *hapd, const u8 *addr,
u8 dialog_token) {
int res;
ieee80211_mgmt *mgmt;
mgmt = (ieee80211_mgmt *)os_zalloc(0x28u);
if (!mgmt)
return -1;
memcpy(mgmt->da, addr, sizeof(mgmt->da));
memcpy(mgmt->sa, hapd->o... | static int ieee802_11_send_bss_trans_mgmt_request(struct hostapd_data *hapd,
const u8 *addr,
u8 dialog_token) {
struct ieee80211_mgmt *mgmt;
size_t len;
u8 *pos;
int res;
mgmt = os_zalloc(sizeof(*mgmt));
if ... | ieee802_11_send_bss_trans_mgmt_request | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ieee802_11_send_sa_query_req(hostapd_data *hapd, const u8 *addr,
const u8 *trans_id) {
u8 oci_ie_len;
u8 *oci_ie;
u8 *end;
sta_info *sta;
ieee80211_mgmt *mgmt;
wpa_channel_info ci;
unsigned long v10;
v10 = __readfsqword(0x28u);
oci_ie = 0;
oci_ie_len = 0;
wp... | void ieee802_11_send_sa_query_req(struct hostapd_data *hapd, const u8 *addr,
const u8 *trans_id) {
#ifdef CONFIG_OCV
struct sta_info *sta;
#endif
struct ieee80211_mgmt *mgmt;
u8 *oci_ie = NULL;
u8 oci_ie_len = 0;
u8 *end;
wpa_printf(MSG_DEBUG, "IEEE 802.11: Sending SA Quer... | ieee802_11_send_sa_query_req | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ieee802_11_send_sa_query_resp(hostapd_data *hapd, const u8 *sa,
const u8 *trans_id) {
u8 oci_ie_len;
u8 *oci_ie;
u8 *end;
sta_info *sta;
ieee80211_mgmt *resp;
wpa_channel_info ci;
unsigned long v10;
v10 = __readfsqword(0x28u);
oci_ie = 0;
oci_ie_len = 0;
wp... | static void ieee802_11_send_sa_query_resp(struct hostapd_data *hapd,
const u8 *sa, const u8 *trans_id) {
struct sta_info *sta;
struct ieee80211_mgmt *resp;
u8 *oci_ie = NULL;
u8 oci_ie_len = 0;
u8 *end;
wpa_printf(MSG_DEBUG, "IEEE 802.11: Received SA Query Request ... | ieee802_11_send_sa_query_resp | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee802_11_send_wnmsleep_resp(hostapd_data *hapd, const u8 *addr,
u8 dialog_token, u8 action_type, u16 intval) {
wnm_oper v5;
int v7;
u8 oci_ie_len;
u16 wnmtfs_ie_len;
int res;
wnm_oper tfs_oper;
wnm_sleep_element wnmsleep_ie;
size_t gtk_elem_len;
size_t igtk_elem... | static int ieee802_11_send_wnmsleep_resp(struct hostapd_data *hapd,
const u8 *addr, u8 dialog_token,
u8 action_type, u16 intval) {
struct ieee80211_mgmt *mgmt;
int res;
size_t len;
size_t gtk_elem_len = 0;
size_t igtk_elem_len =... | ieee802_11_send_wnmsleep_resp | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee802_11_set_beacon(hostapd_data *hapd) {
bool is_6g;
int ret;
size_t i;
size_t j;
hostapd_iface *iface;
hostapd_iface *colocated;
iface = hapd->iface;
ret = _ieee802_11_set_beacon(hapd);
if (ret)
return ret;
if (!iface->interfaces || iface->interfaces->count <= 1)
return 0;
is_6g =... | int ieee802_11_set_beacon(struct hostapd_data *hapd) {
struct hostapd_iface *iface = hapd->iface;
int ret;
size_t i, j;
bool is_6g;
ret = __ieee802_11_set_beacon(hapd);
if (ret != 0)
return ret;
if (!iface->interfaces || iface->interfaces->count <= 1)
return 0;
is_6g = is_6ghz_op_class(iface-... | ieee802_11_set_beacon | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee802_11_set_beacons(hostapd_iface *iface) {
int ret;
size_t i;
ret = 0;
for (i = 0; i < iface->num_bss; ++i) {
if ((*((_BYTE *)iface->bss[i] + 28) & 1) != 0 &&
ieee802_11_set_beacon(iface->bss[i]) < 0)
ret = -1;
}
return ret;
} | int ieee802_11_set_beacons(struct hostapd_iface *iface) {
size_t i;
int ret = 0;
for (i = 0; i < iface->num_bss; i++) {
if (iface->bss[i]->started && ieee802_11_set_beacon(iface->bss[i]) < 0)
ret = -1;
}
return ret;
} | ieee802_11_set_beacons | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee802_11_set_radius_info(hostapd_data *hapd, sta_info *sta, int res,
radius_sta *info) {
const char *v4;
u32 session_timeout;
int acct_interim_interval;
vlan_description *vlan_id;
hostapd_sta_wpa_psk_short *psk;
const char *identity;
const char *radius_cui;
session_... | static int ieee802_11_set_radius_info(struct hostapd_data *hapd,
struct sta_info *sta, int res,
struct radius_sta *info) {
u32 session_timeout = info->session_timeout;
u32 acct_interim_interval = info->acct_interim_interval;
struct vlan_d... | ieee802_11_set_radius_info | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee802_11_update_beacons(hostapd_iface *iface) {
int ret;
size_t i;
ret = 0;
for (i = 0; i < iface->num_bss; ++i) {
if (iface->bss[i]->beacon_set_done &&
(*((_BYTE *)iface->bss[i] + 28) & 1) != 0 &&
ieee802_11_set_beacon(iface->bss[i]) < 0) {
ret = -1;
}
}
return ret;
} | int ieee802_11_update_beacons(struct hostapd_iface *iface) {
size_t i;
int ret = 0;
for (i = 0; i < iface->num_bss; i++) {
if (iface->bss[i]->beacon_set_done && iface->bss[i]->started &&
ieee802_11_set_beacon(iface->bss[i]) < 0)
ret = -1;
}
return ret;
} | ieee802_11_update_beacons | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *ieee802_11_vendor_ie_concat(const u8 *ies, size_t ies_len,
u32 oui_type) {
const element *elem;
const element *elema;
const element *found;
wpabuf *buf;
found = 0;
for (elem = (const element *)ies;
&ies[ies_len] - (const u8 *)elem > 1 &&
&ies[ies_le... | struct wpabuf *ieee802_11_vendor_ie_concat(const u8 *ies, size_t ies_len,
u32 oui_type) {
struct wpabuf *buf;
const struct element *elem, *found = NULL;
for_each_element_id(elem, WLAN_EID_VENDOR_SPECIFIC, ies, ies_len) {
if (elem->datalen >= 4 && WPA_GET_BE32(elem->... | ieee802_11_vendor_ie_concat | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ieee802_1x_aaa_send(void *ctx, void *sta_ctx, const u8 *data,
size_t datalen) {
ieee802_1x_encapsulate_radius((hostapd_data *)ctx, (sta_info *)sta_ctx, data,
datalen);
} | static void ieee802_1x_aaa_send(void *ctx, void *sta_ctx, const u8 *data,
size_t datalen) {
#ifndef CONFIG_NO_RADIUS
struct hostapd_data *hapd = ctx;
struct sta_info *sta = sta_ctx;
ieee802_1x_encapsulate_radius(hapd, sta, data, datalen);
#endif
} | ieee802_1x_aaa_send | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
eapol_state_machine *ieee802_1x_alloc_eapol_sm(hostapd_data *hapd,
sta_info *sta) {
int flags;
flags = (sta->flags & 0x100) != 0;
if (sta->wpa_sm) {
flags |= 4u;
if (wpa_auth_sta_get_pmksa(sta->wpa_sm))
flags |= 8u;
}
return eapol_auth_alloc(hapd->... | struct eapol_state_machine *ieee802_1x_alloc_eapol_sm(struct hostapd_data *hapd,
struct sta_info *sta) {
int flags = 0;
if (sta->flags & WLAN_STA_PREAUTH)
flags |= EAPOL_SM_PREAUTH;
if (sta->wpa_sm) {
flags |= EAPOL_SM_USES_WPA;
if (wpa_auth_sta_g... | ieee802_1x_alloc_eapol_sm | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ieee802_1x_check_hs20(hostapd_data *hapd, sta_info *sta, radius_msg *msg,
int session_timeout) {
u8 *v4;
u8 *v5;
u8 type;
u8 sublen;
u8 *buf;
size_t len;
u8 *pos;
u8 *end;
unsigned long v14;
v14 = __readfsqword(0x28u);
buf = 0;
*((_BYTE *)sta + 98) &= ~2u;
*((_... | static void ieee802_1x_check_hs20(struct hostapd_data *hapd,
struct sta_info *sta, struct radius_msg *msg,
int session_timeout) {
#ifdef CONFIG_HS20
u8 *buf, *pos, *end, type, sublen;
size_t len;
buf = NULL;
sta->remediation = 0;
sta->hs20_d... | ieee802_1x_check_hs20 | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ieee802_1x_decapsulate_radius(hostapd_data *hapd, sta_info *sta) {
int code;
const char *name;
const char *v4;
__uint16_t v5;
eap_type eap_type;
eapol_state_machine *sm;
wpabuf *eap;
const eap_hdr *hdr;
char buf[72];
unsigned long v11;
v11 = __readfsqword(0x28u);
eap_type = -1;
sm = sta-... | static void ieee802_1x_decapsulate_radius(struct hostapd_data *hapd,
struct sta_info *sta) {
struct wpabuf *eap;
const struct eap_hdr *hdr;
int eap_type = -1;
char buf[64];
struct radius_msg *msg;
struct eapol_state_machine *sm = sta->eapol_sm;
if (!sm || !sm->la... | ieee802_1x_decapsulate_radius | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ieee802_1x_deinit(hostapd_data *hapd) {
if (hapd->driver && hapd->drv_priv &&
(hapd->conf->ieee802_1x || hapd->conf->wpa))
hostapd_set_drv_ieee8021x(hapd, hapd->conf->iface, 0);
eapol_auth_deinit(hapd->eapol_auth);
hapd->eapol_auth = 0;
ieee802_1x_erp_flush(hapd);
} | void ieee802_1x_deinit(struct hostapd_data *hapd) {
#ifdef CONFIG_WEP
eloop_cancel_timeout(ieee802_1x_rekey, hapd, NULL);
#endif
if (hapd->driver && hapd->drv_priv &&
(hapd->conf->ieee802_1x || hapd->conf->wpa))
hostapd_set_drv_ieee8021x(hapd, hapd->conf->iface, 0);
eapol_auth_deinit(hapd->eapol_auth)... | ieee802_1x_deinit | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ieee802_1x_eapol_event(void *ctx, void *sta_ctx, eapol_event type) {
if (type) {
if (type == eapol_event_EAPOL_AUTH_REAUTHENTICATE)
wpa_auth_sm_event(*((wpa_state_machine **)sta_ctx + 24),
wpa_event_WPA_REAUTH_EAPOL);
} else {
wpa_auth_sm_notify(*((wpa_state_machine **)sta... | static void ieee802_1x_eapol_event(void *ctx, void *sta_ctx,
enum eapol_event type) {
struct sta_info *sta = sta_ctx;
switch (type) {
case EAPOL_AUTH_SM_CHANGE:
wpa_auth_sm_notify(sta->wpa_sm);
break;
case EAPOL_AUTH_REAUTHENTICATE:
wpa_auth_sm_event(sta->wpa_sm,... | ieee802_1x_eapol_event | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ieee802_1x_eapol_send(void *ctx, void *sta_ctx, u8 type, const u8 *data,
size_t datalen) {
u32 flags;
size_t identity_len;
sta_info *sta;
eapol_state_machine *sm;
const u8 *identity;
unsigned long v13;
v13 = __readfsqword(0x28u);
sta = (sta_info *)sta_ctx;
if ((*((_DWO... | static void ieee802_1x_eapol_send(void *ctx, void *sta_ctx, u8 type,
const u8 *data, size_t datalen) {
#ifdef CONFIG_WPS
struct sta_info *sta = sta_ctx;
if ((sta->flags & (WLAN_STA_WPS | WLAN_STA_MAYBE_WPS)) ==
WLAN_STA_MAYBE_WPS) {
const u8 *identity;
size_t identit... | ieee802_1x_eapol_send | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee802_1x_eapol_tx_status(hostapd_data *hapd, sta_info *sta, const u8 *buf,
int len, int ack) {
__uint16_t v6;
const char *v7;
const u8 *pos;
pos = buf + 4;
if (len <= 3)
return 0;
v6 = _bswap_16_0(*((_WORD *)buf + 1));
wpa_printf(2,
"IEEE 802.1X: %02x... | int ieee802_1x_eapol_tx_status(struct hostapd_data *hapd, struct sta_info *sta,
const u8 *buf, int len, int ack) {
const struct ieee802_1x_hdr *xhdr = (const struct ieee802_1x_hdr *)buf;
const u8 *pos = buf + sizeof(*xhdr);
struct ieee802_1x_eapol_key *key;
if (len < (int)sizeof(... | ieee802_1x_eapol_tx_status | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ieee802_1x_encapsulate_radius(hostapd_data *hapd, sta_info *sta,
const u8 *eap, size_t len) {
size_t v4;
const u8 *v5;
size_t v6;
u8 ver;
u16 id;
be32 timestamp;
int res;
const u8 *cui;
size_t cui_len;
eapol_state_machine *sm;
radius_msg *msg;
const u8 *po... | void ieee802_1x_encapsulate_radius(struct hostapd_data *hapd,
struct sta_info *sta, const u8 *eap,
size_t len) {
struct radius_msg *msg;
struct eapol_state_machine *sm = sta->eapol_sm;
if (!sm)
return;
ieee802_1x_learn_identity(hapd, sm... | ieee802_1x_encapsulate_radius | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee802_1x_erp_add_key(void *ctx, eap_server_erp_key *erp) {
dl_list_add_2((dl_list *)((char *)ctx + 2536), &erp->list);
return 0;
} | static int ieee802_1x_erp_add_key(void *ctx, struct eap_server_erp_key *erp) {
struct hostapd_data *hapd = ctx;
dl_list_add(&hapd->erp_keys, &erp->list);
return 0;
} | ieee802_1x_erp_add_key | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ieee802_1x_erp_flush(hostapd_data *hapd) {
dl_list *v1;
eap_server_erp_key *erp;
while (1) {
v1 = dl_list_empty_1(&hapd->erp_keys) ? 0LL : hapd->erp_keys.next;
erp = (eap_server_erp_key *)v1;
if (!v1)
break;
dl_list_del_2(v1);
bin_clear_free(erp, 0xA8u);
}
} | void ieee802_1x_erp_flush(struct hostapd_data *hapd) {
struct eap_server_erp_key *erp;
while ((erp = dl_list_first(&hapd->erp_keys, struct eap_server_erp_key,
list)) != NULL) {
dl_list_del(&erp->list);
bin_clear_free(erp, sizeof(*erp));
}
} | ieee802_1x_erp_flush | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
eap_server_erp_key *ieee802_1x_erp_get_key(void *ctx, const char *keyname) {
eap_server_erp_key *erp;
for (erp = (eap_server_erp_key *)*((_QWORD *)ctx + 317);
erp != (eap_server_erp_key *)((char *)ctx + 2536);
erp = (eap_server_erp_key *)erp->list.next) {
if (!strcmp((const char *)&erp->cryptosui... | static struct eap_server_erp_key *ieee802_1x_erp_get_key(void *ctx,
const char *keyname) {
struct hostapd_data *hapd = ctx;
struct eap_server_erp_key *erp;
dl_list_for_each(erp, &hapd->erp_keys, struct eap_server_erp_key, list) {
if (os_strcmp(erp->key... | ieee802_1x_erp_get_key | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ieee802_1x_free_station(hostapd_data *hapd, sta_info *sta) {
eapol_state_machine *sm;
sm = sta->eapol_sm;
eloop_cancel_timeout((eloop_timeout_handler)ieee802_1x_wnm_notif_send, hapd,
sta);
if (sta->pending_eapol_rx) {
wpabuf_free(sta->pending_eapol_rx->buf);
free(sta->pendin... | void ieee802_1x_free_station(struct hostapd_data *hapd, struct sta_info *sta) {
struct eapol_state_machine *sm = sta->eapol_sm;
#ifdef CONFIG_HS20
eloop_cancel_timeout(ieee802_1x_wnm_notif_send, hapd, sta);
#endif
if (sta->pending_eapol_rx) {
wpabuf_free(sta->pending_eapol_rx->buf);
os_free(sta->pending... | ieee802_1x_free_station | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee802_1x_get_eap_user(void *ctx, const u8 *identity, size_t identity_len,
int phase2, eap_user *user) {
int i;
int rv;
const hostapd_eap_user *eap_user;
rv = -1;
eap_user =
hostapd_get_eap_user((hostapd_data *)ctx, identity, identity_len, phase2);
if (eap_user) {
... | static int ieee802_1x_get_eap_user(void *ctx, const u8 *identity,
size_t identity_len, int phase2,
struct eap_user *user) {
struct hostapd_data *hapd = ctx;
const struct hostapd_eap_user *eap_user;
int i;
int rv = -1;
eap_user = hostapd_ge... | ieee802_1x_get_eap_user | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
u8 *ieee802_1x_get_identity(eapol_state_machine *sm, size_t *len) {
if (!sm || !sm->identity)
return 0;
*len = sm->identity_len;
return sm->identity;
} | u8 *ieee802_1x_get_identity(struct eapol_state_machine *sm, size_t *len) {
if (!sm || !sm->identity)
return NULL;
*len = sm->identity_len;
return sm->identity;
} | ieee802_1x_get_identity | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const u8 *ieee802_1x_get_key(eapol_state_machine *sm, size_t *len) {
*len = 0;
if (!sm)
return 0;
*len = sm->eap_if->eapKeyDataLen;
return sm->eap_if->eapKeyData;
} | const u8 *ieee802_1x_get_key(struct eapol_state_machine *sm, size_t *len) {
*len = 0;
if (!sm)
return NULL;
*len = sm->eap_if->eapKeyDataLen;
return sm->eap_if->eapKeyData;
} | ieee802_1x_get_key | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ieee802_1x_get_keys(hostapd_data *hapd, sta_info *sta, radius_msg *msg,
radius_msg *req, const u8 *shared_secret,
size_t shared_secret_len) {
eap_eapol_interface *eap_if;
u8 *recv;
u8 *send;
eap_eapol_interface *v9;
u8 *buf;
size_t len;
eapol_state_ma... | static void ieee802_1x_get_keys(struct hostapd_data *hapd, struct sta_info *sta,
struct radius_msg *msg, struct radius_msg *req,
const u8 *shared_secret,
size_t shared_secret_len) {
struct radius_ms_mppe_keys *keys;
u8 *... | ieee802_1x_get_keys | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee802_1x_get_mib(hostapd_data *hapd, char *buf, size_t buflen) {
return 0;
} | int ieee802_1x_get_mib(struct hostapd_data *hapd, char *buf, size_t buflen) {
return 0;
} | ieee802_1x_get_mib | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee802_1x_get_mib_sta(hostapd_data *hapd, sta_info *sta, char *buf,
size_t buflen) {
const char *v5;
const char *v6;
long v7;
const char *identity;
int sec;
int v10;
int v11;
int len;
int lena;
int lenb;
int lenc;
int lend;
int ret;
int reta;
int retb;
int... | int ieee802_1x_get_mib_sta(struct hostapd_data *hapd, struct sta_info *sta,
char *buf, size_t buflen) {
int len = 0, ret;
struct eapol_state_machine *sm = sta->eapol_sm;
struct os_reltime diff;
const char *name1;
const char *name2;
char *identity_buf = NULL;
if (!sm)
return... | ieee802_1x_get_mib_sta | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
u8 *ieee802_1x_get_radius_class(eapol_state_machine *sm, size_t *len, int idx) {
if (!sm || !sm->radius_class.attr || idx >= (int)sm->radius_class.count)
return 0;
*len = sm->radius_class.attr[idx].len;
return sm->radius_class.attr[idx].data;
} | u8 *ieee802_1x_get_radius_class(struct eapol_state_machine *sm, size_t *len,
int idx) {
if (!sm || !sm->radius_class.attr || idx >= (int)sm->radius_class.count)
return NULL;
*len = sm->radius_class.attr[idx].len;
return sm->radius_class.attr[idx].data;
} | ieee802_1x_get_radius_class | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *ieee802_1x_get_radius_cui(eapol_state_machine *sm) {
if (sm)
return sm->radius_cui;
else
return 0;
} | struct wpabuf *ieee802_1x_get_radius_cui(struct eapol_state_machine *sm) {
if (!sm)
return NULL;
return sm->radius_cui;
} | ieee802_1x_get_radius_cui | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ieee802_1x_hs20_deauth_req(hostapd_data *hapd, sta_info *sta, u8 *pos,
size_t len) {
u16 v4;
if (len > 2) {
*((_BYTE *)sta + 98) |= 4u;
v4 = WPA_GET_LE16(pos + 1);
wpa_printf(2,
"HS 2.0: Deauthentication request - Code %u Re-auth Delay %u",
... | static void ieee802_1x_hs20_deauth_req(struct hostapd_data *hapd,
struct sta_info *sta, u8 *pos,
size_t len) {
if (len < 3)
return;
sta->hs20_deauth_requested = 1;
wpa_printf(MSG_DEBUG,
"HS 2.0: Deauthentication request... | ieee802_1x_hs20_deauth_req | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ieee802_1x_hs20_session_info(hostapd_data *hapd, sta_info *sta, u8 *pos,
size_t len, int session_timeout) {
unsigned int swt;
int warning_time;
unsigned int beacon_int;
if (len) {
free(sta->hs20_session_info_url);
sta->hs20_session_info_url = (char *)malloc(len);
... | static void ieee802_1x_hs20_session_info(struct hostapd_data *hapd,
struct sta_info *sta, u8 *pos,
size_t len, int session_timeout) {
unsigned int swt;
int warning_time, beacon_int;
if (len < 1)
return;
os_free(sta->hs20_sess... | ieee802_1x_hs20_session_info | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ieee802_1x_hs20_sub_rem(sta_info *sta, u8 *pos, size_t len) {
*((_BYTE *)sta + 98) |= 2u;
free(sta->remediation_url);
if (len <= 2) {
sta->remediation_url = 0;
wpa_printf(2,
"HS 2.0: Subscription remediation needed for "
"%02x:%02x:%02x:%02x:%02x:%02x",
st... | static void ieee802_1x_hs20_sub_rem(struct sta_info *sta, u8 *pos, size_t len) {
sta->remediation = 1;
os_free(sta->remediation_url);
if (len > 2) {
sta->remediation_url = os_malloc(len);
if (!sta->remediation_url)
return;
sta->remediation_method = pos[0];
os_memcpy(sta->remediation_url, pos... | ieee802_1x_hs20_sub_rem | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ieee802_1x_hs20_t_c_filtering(hostapd_data *hapd, sta_info *sta, u8 *pos,
size_t len) {
if (len > 3) {
wpa_printf(2, "HS 2.0: Terms and Conditions filtering %02x %02x %02x %02x",
*pos, pos[1], pos[2], pos[3]);
hs20_t_c_filtering(hapd, sta, *pos & 1);
}
... | static void ieee802_1x_hs20_t_c_filtering(struct hostapd_data *hapd,
struct sta_info *sta, u8 *pos,
size_t len) {
if (len < 4)
return;
wpa_printf(MSG_DEBUG,
"HS 2.0: Terms and Conditions filtering %02x %02x %02x %02... | ieee802_1x_hs20_t_c_filtering | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void ieee802_1x_hs20_t_c_url(hostapd_data *hapd, sta_info *sta, u8 *pos,
size_t len) {
free(sta->t_c_url);
sta->t_c_url = (char *)malloc(len + 1);
if (sta->t_c_url) {
memcpy(sta->t_c_url, pos, len);
sta->t_c_url[len] = 0;
wpa_printf(2, "HS 2.0: Terms and Conditions URL %s"... | static void ieee802_1x_hs20_t_c_url(struct hostapd_data *hapd,
struct sta_info *sta, u8 *pos, size_t len) {
os_free(sta->t_c_url);
sta->t_c_url = os_malloc(len + 1);
if (!sta->t_c_url)
return;
os_memcpy(sta->t_c_url, pos, len);
sta->t_c_url[len] = '\0';
wpa_printf(MSG... | ieee802_1x_hs20_t_c_url | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ieee802_1x_init(hostapd_data *hapd) {
eapol_auth_config conf;
eapol_auth_cb cb;
unsigned long v4;
v4 = __readfsqword(0x28u);
dl_list_init_1(&hapd->erp_keys);
memset(&conf, 0, sizeof(conf));
conf.eap_cfg = hapd->eap_cfg;
conf.ctx = hapd;
conf.eap_reauth_period = hapd->conf->eap_reauth_period;
co... | int ieee802_1x_init(struct hostapd_data *hapd) {
struct eapol_auth_config conf;
struct eapol_auth_cb cb;
dl_list_init(&hapd->erp_keys);
os_memset(&conf, 0, sizeof(conf));
conf.eap_cfg = hapd->eap_cfg;
conf.ctx = hapd;
conf.eap_reauth_period = hapd->conf->eap_reauth_period;
conf.wpa = hapd->conf->wpa;
... | ieee802_1x_init | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.