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 |
|---|---|---|---|---|---|---|---|
char *base64_url_encode(const void *src, size_t len, size_t *out_len) {
return base64_gen_encode(
(const unsigned char *)src, len, out_len,
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_", 0);
} | char *base64_url_encode(const void *src, size_t len, size_t *out_len) {
return base64_gen_encode(src, len, out_len, base64_url_table, 0);
} | base64_url_encode | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const char *be_auth_state_txt(int s) {
const char *result;
switch (s) {
case 0:
result = "REQUEST";
break;
case 1:
result = "RESPONSE";
break;
case 2:
result = "SUCCESS";
break;
case 3:
result = "FAIL";
break;
case 4:
result = "TIMEOUT";
break;
case 5:
result... | static inline const char *be_auth_state_txt(int s) {
switch (s) {
case BE_AUTH_REQUEST:
return "REQUEST";
case BE_AUTH_RESPONSE:
return "RESPONSE";
case BE_AUTH_SUCCESS:
return "SUCCESS";
case BE_AUTH_FAIL:
return "FAIL";
case BE_AUTH_TIMEOUT:
return "TIMEOUT";
case BE_AUTH_IDLE:
r... | be_auth_state_txt | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int bin_str_eq(const char *val, size_t len, const char *cmp) {
return len == strlen(cmp) && !memcmp(val, cmp, len);
} | static int bin_str_eq(const char *val, size_t len, const char *cmp) {
return os_strlen(cmp) == len && os_memcmp(val, cmp, len) == 0;
} | bin_str_eq | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const char *bool_txt(bool val) {
if (val)
return "TRUE";
else
return "FALSE";
} | static const char *bool_txt(bool val) { return val ? "TRUE" : "FALSE"; } | bool_txt | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int br_addbr(const char *br_name) {
int *v1;
char *v2;
int *v4;
char *v5;
int *v6;
char *v7;
int fd;
unsigned long arg[4];
ifreq ifr;
unsigned long v11;
v11 = __readfsqword(0x28u);
wpa_printf(2, "VLAN: br_addbr(%s)", br_name);
fd = socket(2, 1, 0);
if (fd < 0) {
v1 = __errno_location();... | static int br_addbr(const char *br_name) {
int fd;
unsigned long arg[4];
struct ifreq ifr;
wpa_printf(MSG_DEBUG, "VLAN: br_addbr(%s)", br_name);
if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
wpa_printf(MSG_ERROR,
"VLAN: %s: socket(AF_INET,SOCK_STREAM) "
"failed: %s",
... | br_addbr | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int br_addif(const char *br_name, const char *if_name) {
int *v2;
char *v3;
int *v5;
char *v6;
int fd;
signed int if_index;
unsigned long args[2];
ifreq ifr;
unsigned long v11;
v11 = __readfsqword(0x28u);
wpa_printf(2, "VLAN: br_addif(%s, %s)", br_name, if_name);
fd = socket(2, 1, 0);
if (fd ... | static int br_addif(const char *br_name, const char *if_name) {
int fd;
struct ifreq ifr;
unsigned long args[2];
int if_index;
wpa_printf(MSG_DEBUG, "VLAN: br_addif(%s, %s)", br_name, if_name);
if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
wpa_printf(MSG_ERROR,
"VLAN: %s: socket(AF_I... | br_addif | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int br_delbr(const char *br_name) {
int *v1;
char *v2;
int *v4;
char *v5;
int fd;
unsigned long arg[3];
unsigned long v8;
v8 = __readfsqword(0x28u);
wpa_printf(2, "VLAN: br_delbr(%s)", br_name);
fd = socket(2, 1, 0);
if (fd >= 0) {
if (!linux_br_del(fd, br_name) ||
(arg[0] = 3, arg[1]... | static int br_delbr(const char *br_name) {
int fd;
unsigned long arg[2];
wpa_printf(MSG_DEBUG, "VLAN: br_delbr(%s)", br_name);
if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
wpa_printf(MSG_ERROR,
"VLAN: %s: socket(AF_INET,SOCK_STREAM) "
"failed: %s",
__func__... | br_delbr | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int br_delif(const char *br_name, const char *if_name) {
int *v2;
char *v3;
int *v5;
char *v6;
int fd;
signed int if_index;
unsigned long args[2];
ifreq ifr;
unsigned long v11;
v11 = __readfsqword(0x28u);
wpa_printf(2, "VLAN: br_delif(%s, %s)", br_name, if_name);
fd = socket(2, 1, 0);
if (fd ... | static int br_delif(const char *br_name, const char *if_name) {
int fd;
struct ifreq ifr;
unsigned long args[2];
int if_index;
wpa_printf(MSG_DEBUG, "VLAN: br_delif(%s, %s)", br_name, if_name);
if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
wpa_printf(MSG_ERROR,
"VLAN: %s: socket(AF_I... | br_delif | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int br_getnumports(const char *br_name) {
int *v1;
char *v2;
int *v4;
char *v5;
int i;
int port_cnt;
int fd;
unsigned long arg[4];
ifreq ifr;
int ifindices[258];
unsigned long v12;
v12 = __readfsqword(0x28u);
port_cnt = 0;
fd = socket(2, 1, 0);
if (fd >= 0) {
arg[0] = 7;
arg[1] = ... | static int br_getnumports(const char *br_name) {
int fd;
int i;
int port_cnt = 0;
unsigned long arg[4];
int ifindices[MAX_BR_PORTS];
struct ifreq ifr;
if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
wpa_printf(MSG_ERROR,
"VLAN: %s: socket(AF_INET,SOCK_STREAM) "
"failed... | br_getnumports | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int bss_info_handler(nl_msg *msg, void *arg) {
size_t num;
wpa_scan_results *res;
wpa_scan_res *r;
wpa_scan_res **tmp;
res = (wpa_scan_results *)*((_QWORD *)arg + 1);
r = nl80211_parse_bss_info(*(wpa_driver_nl80211_data **)arg, msg);
if (!r)
return 1;
if (res) {
tmp = (wpa_scan_res **)os_reallo... | static int bss_info_handler(struct nl_msg *msg, void *arg) {
struct nl80211_bss_info_arg *_arg = arg;
struct wpa_scan_results *res = _arg->res;
struct wpa_scan_res **tmp;
struct wpa_scan_res *r;
r = nl80211_parse_bss_info(_arg->drv, msg);
if (!r)
return NL_SKIP;
if (!res) {
os_free(r);
retur... | bss_info_handler | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void bss_load_update_deinit(hostapd_data *hapd) {
eloop_cancel_timeout((eloop_timeout_handler)update_channel_utilization, hapd,
0);
} | void bss_load_update_deinit(struct hostapd_data *hapd) {
eloop_cancel_timeout(update_channel_utilization, hapd, NULL);
} | bss_load_update_deinit | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int bss_load_update_init(hostapd_data *hapd) {
unsigned int sec;
unsigned int usec;
unsigned long v4;
v4 = __readfsqword(0x28u);
if (get_bss_load_update_timeout(hapd, &sec, &usec) < 0)
return -1;
eloop_register_timeout(
sec, usec, (eloop_timeout_handler)update_channel_utilization, hapd, 0);
ret... | int bss_load_update_init(struct hostapd_data *hapd) {
unsigned int sec, usec;
if (get_bss_load_update_timeout(hapd, &sec, &usec) < 0)
return -1;
eloop_register_timeout(sec, usec, update_channel_utilization, hapd, NULL);
return 0;
} | bss_load_update_init | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *build_fake_wsc_ack() {
wpabuf *msg;
msg = wpabuf_alloc(0x64u);
if (!msg)
return 0;
wpabuf_put_u8_26(msg, 2u);
wpabuf_put_str_0(msg, "00:00:00:00:00:00");
if (!wps_build_version(msg) &&
!wps_build_msg_type(msg, wps_msg_type_WPS_WSC_ACK)) {
wpabuf_put_be16_11(msg, 0x101Au);
wpabuf_p... | static struct wpabuf *build_fake_wsc_ack(void) {
struct wpabuf *msg = wpabuf_alloc(100);
if (msg == NULL)
return NULL;
wpabuf_put_u8(msg, UPNP_WPS_WLANEVENT_TYPE_EAP);
wpabuf_put_str(msg, "00:00:00:00:00:00");
if (wps_build_version(msg) || wps_build_msg_type(msg, WPS_WSC_ACK)) {
wpabuf_free(msg);
... | build_fake_wsc_ack | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int calculate_chan_offset(int width, int freq, int cf1, int cf2) {
int freq1;
freq1 = 0;
switch (convert2width(width)) {
case chan_width_CHAN_WIDTH_20_NOHT:
case chan_width_CHAN_WIDTH_20:
return 0;
case chan_width_CHAN_WIDTH_40:
freq1 = cf1 - 10;
goto LABEL_8;
case chan_width_CHAN_WIDTH_80:
... | static int calculate_chan_offset(int width, int freq, int cf1, int cf2) {
int freq1 = 0;
switch (convert2width(width)) {
case CHAN_WIDTH_20_NOHT:
case CHAN_WIDTH_20:
return 0;
case CHAN_WIDTH_40:
freq1 = cf1 - 10;
break;
case CHAN_WIDTH_80:
freq1 = cf1 - 30;
break;
case CHAN_WIDTH_160... | calculate_chan_offset | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int center_idx_to_bw_6ghz(u8 idx) {
if (idx == 2)
return 0;
if ((idx & 3) == 1)
return 0;
if ((idx & 7) == 3)
return 1;
if ((idx & 0xF) == 7)
return 2;
if ((idx & 0x1F) == 0xF)
return 3;
return -1;
} | int center_idx_to_bw_6ghz(u8 idx) {
if (idx == 2)
return 0;
if ((idx & 0x3) == 0x1)
return 0;
if ((idx & 0x7) == 0x3)
return 1;
if ((idx & 0xf) == 0x7)
return 2;
if ((idx & 0x1f) == 0xf)
return 3;
return -1;
} | center_idx_to_bw_6ghz | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int chan_bw_allowed(const hostapd_channel_data *chan, u32 bw, int ht40_plus,
int pri) {
u32 bw_mask;
if (bw == 160) {
bw_mask = 32;
return bw_mask == (bw_mask & chan->allowed_bw);
}
if (bw > 0xA0)
goto LABEL_18;
if (bw == 80) {
bw_mask = 16;
return bw_mask == (bw_mask ... | int chan_bw_allowed(const struct hostapd_channel_data *chan, u32 bw,
int ht40_plus, int pri) {
u32 bw_mask;
switch (bw) {
case 20:
bw_mask = HOSTAPD_CHAN_WIDTH_20;
break;
case 40:
if (pri && ht40_plus)
bw_mask = HOSTAPD_CHAN_WIDTH_40P;
else if (pri && !ht40_plus)
... | chan_bw_allowed | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int chan_pri_allowed(const hostapd_channel_data *chan) {
return (chan->flag & 1) == 0 && (chan->allowed_bw & 2) != 0;
} | int chan_pri_allowed(const struct hostapd_channel_data *chan) {
return !(chan->flag & HOSTAPD_CHAN_DISABLED) &&
(chan->allowed_bw & HOSTAPD_CHAN_WIDTH_20);
} | chan_pri_allowed | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void channel_list_update_timeout(void *eloop_ctx, void *timeout_ctx) {
if ((*((_BYTE *)eloop_ctx + 72) & 1) != 0) {
wpa_printf(2, "Channel list update timeout - try to continue anyway");
setup_interface2((hostapd_iface *)eloop_ctx);
} else {
wpa_printf(
3, "Channel list update timeout, but inter... | static void channel_list_update_timeout(void *eloop_ctx, void *timeout_ctx) {
struct hostapd_iface *iface = eloop_ctx;
if (!iface->wait_channel_update) {
wpa_printf(
MSG_INFO,
"Channel list update timeout, but interface was not waiting for it");
return;
}
wpa_printf(MSG_DEBUG, "Channel... | channel_list_update_timeout | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int channel_width_to_int(chan_width width) {
if ((unsigned int)width > chan_width_CHAN_WIDTH_160)
return 0;
if ((unsigned int)width >= chan_width_CHAN_WIDTH_80P80)
return 160;
if (width == chan_width_CHAN_WIDTH_80)
return 80;
if ((unsigned int)width <= chan_width_CHAN_WIDTH_20)
return 20;
retu... | int channel_width_to_int(enum chan_width width) {
switch (width) {
case CHAN_WIDTH_20_NOHT:
case CHAN_WIDTH_20:
return 20;
case CHAN_WIDTH_40:
return 40;
case CHAN_WIDTH_80:
return 80;
case CHAN_WIDTH_80P80:
case CHAN_WIDTH_160:
return 160;
default:
return 0;
}
} | channel_width_to_int | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const char *channel_width_to_string(chan_width width) {
const char *result;
switch (width) {
case chan_width_CHAN_WIDTH_20_NOHT:
result = "20 MHz (no HT)";
break;
case chan_width_CHAN_WIDTH_20:
result = "20 MHz";
break;
case chan_width_CHAN_WIDTH_40:
result = "40 MHz";
break;
case c... | const char *channel_width_to_string(enum chan_width width) {
switch (width) {
case CHAN_WIDTH_20_NOHT:
return "20 MHz (no HT)";
case CHAN_WIDTH_20:
return "20 MHz";
case CHAN_WIDTH_40:
return "40 MHz";
case CHAN_WIDTH_80:
return "80 MHz";
case CHAN_WIDTH_80P80:
return "80+80 MHz";
case... | channel_width_to_string | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int chap_md5(u8 id, const u8 *secret, size_t secret_len, const u8 *challenge,
size_t challenge_len, u8 *response) {
u8 ida;
const u8 *addr[3];
size_t len[3];
unsigned long v10;
ida = id;
v10 = __readfsqword(0x28u);
addr[0] = &ida;
len[0] = 1;
addr[1] = secret;
len[1] = secret_len;
ad... | int chap_md5(u8 id, const u8 *secret, size_t secret_len, const u8 *challenge,
size_t challenge_len, u8 *response) {
const u8 *addr[3];
size_t len[3];
addr[0] = &id;
len[0] = 1;
addr[1] = secret;
len[1] = secret_len;
addr[2] = challenge;
len[2] = challenge_len;
return md5_vector(3, addr, ... | chap_md5 | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int check_20mhz_bss(wpa_scan_res *bss, int pri_freq, int start, int end) {
ieee802_11_elems elems;
unsigned long v6;
v6 = __readfsqword(0x28u);
if (start > bss->freq || end < bss->freq || pri_freq == bss->freq)
return 0;
ieee802_11_parse_elems((const u8 *)&bss[1], bss->ie_len, &elems, 0);
if (elems.ht_... | static int check_20mhz_bss(struct wpa_scan_res *bss, int pri_freq, int start,
int end) {
struct ieee802_11_elems elems;
struct ieee80211_ht_operation *oper;
if (bss->freq < start || bss->freq > end || bss->freq == pri_freq)
return 0;
ieee802_11_parse_elems((u8 *)(bss + 1), bss->... | check_20mhz_bss | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int check_40mhz_2g4(hostapd_hw_modes *mode, wpa_scan_results *scan_res,
int pri_chan, int sec_chan) {
long v5;
int sec_chana;
int pri_chana;
wpa_scan_results *scan_resa;
hostapd_hw_modes *modea;
int sec;
int pri_freq;
int sec_freq;
int affected_start;
int affected_end;
int pri;... | int check_40mhz_2g4(struct hostapd_hw_modes *mode,
struct wpa_scan_results *scan_res, int pri_chan,
int sec_chan) {
int pri_freq, sec_freq;
int affected_start, affected_end;
size_t i;
if (!mode || !scan_res || !pri_chan || !sec_chan || pri_chan == sec_chan)
return 0;... | check_40mhz_2g4 | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int check_40mhz_5g(wpa_scan_results *scan_res, hostapd_channel_data *pri_chan,
hostapd_channel_data *sec_chan) {
long bss_pri_chan;
int pri_bss;
int sec_bss;
int match;
size_t i;
wpa_scan_res *bss_0;
wpa_scan_res *bss_1;
wpa_scan_res *bss;
unsigned long v13;
v13 = __readfsqword(0... | int check_40mhz_5g(struct wpa_scan_results *scan_res,
struct hostapd_channel_data *pri_chan,
struct hostapd_channel_data *sec_chan) {
int pri_bss, sec_bss;
int bss_pri_chan, bss_sec_chan;
size_t i;
int match;
if (!scan_res || !pri_chan || !sec_chan || pri_chan->freq == s... | check_40mhz_5g | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int check_assoc_ies(hostapd_data *hapd, sta_info *sta, const u8 *ies,
size_t ies_len, int reassoc) {
int result;
u32 flags;
u32 v7;
size_t v8;
const u8 *v9;
u32 v10;
int resp;
wpa_validate_result res;
int release;
const u8 *wpa_ie;
const u8 *wpa_iea;
size_t wpa_ie_len;
size... | static int check_assoc_ies(struct hostapd_data *hapd, struct sta_info *sta,
const u8 *ies, size_t ies_len, int reassoc) {
struct ieee802_11_elems elems;
int resp;
const u8 *wpa_ie;
size_t wpa_ie_len;
const u8 *p2p_dev_addr = NULL;
if (ieee802_11_parse_elems(ies, ies_len, &elems, ... | check_assoc_ies | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int check_comeback_token(hostapd_data *hapd, const u8 *addr, const u8 *token,
size_t token_len) {
u16 v5;
int v6;
u16 v7;
u8 idx;
u16 token_idx;
const u8 *addrs[2];
size_t len[2];
u8 mac[40];
unsigned long v14;
v14 = __readfsqword(0x28u);
if (token_len != 32 || comeback_t... | static int check_comeback_token(struct hostapd_data *hapd, const u8 *addr,
const u8 *token, size_t token_len) {
u8 mac[SHA256_MAC_LEN];
const u8 *addrs[2];
size_t len[2];
u16 token_idx;
u8 idx;
if (token_len != SHA256_MAC_LEN || comeback_token_hash(hapd, addr, &idx) < 0)
... | check_comeback_token | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
u16 check_ext_capab(hostapd_data *hapd, sta_info *sta, const u8 *ext_capab_ie,
size_t ext_capab_ie_len) {
if (ext_capab_ie_len > 4 && (ext_capab_ie[4] & 1) != 0)
*((_BYTE *)sta + 98) |= 1u;
if (ext_capab_ie_len) {
*((_BYTE *)sta + 98) =
(32 * ((*ext_capab_ie & 4) != 0)) | *((_BYT... | static u16 check_ext_capab(struct hostapd_data *hapd, struct sta_info *sta,
const u8 *ext_capab_ie, size_t ext_capab_ie_len) {
#ifdef CONFIG_INTERWORKING
if (ext_capab_ie_len >= 5) {
if (ext_capab_ie[4] & 0x01)
sta->qos_map_enabled = 1;
}
#endif
if (ext_capab_ie_len > 0) {
... | check_ext_capab | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
u16 check_multi_ap(hostapd_data *hapd, sta_info *sta, const u8 *multi_ap_ie,
size_t multi_ap_len) {
u8 multi_ap_value;
const u8 *multi_ap_subelem;
multi_ap_value = 0;
sta->flags &= ~0x800000u;
if (!hapd->conf->multi_ap)
return 0;
if (multi_ap_ie) {
multi_ap_subelem = get_ie(multi... | static u16 check_multi_ap(struct hostapd_data *hapd, struct sta_info *sta,
const u8 *multi_ap_ie, size_t multi_ap_len) {
u8 multi_ap_value = 0;
sta->flags &= ~WLAN_STA_MULTI_AP;
if (!hapd->conf->multi_ap)
return WLAN_STATUS_SUCCESS;
if (multi_ap_ie) {
const u8 *multi_ap_sube... | check_multi_ap | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
bool check_sa_query(hostapd_data *hapd, sta_info *sta, int reassoc) {
if ((sta->flags & 0x422) != 0x422)
return 0;
if (!sta->sa_query_timed_out && sta->sa_query_count > 0)
ap_check_sa_query_timeout(hapd, sta);
if (sta->sa_query_timed_out || reassoc && sta->auth_alg == 2)
return 0;
if (!sta->sa_query... | static bool check_sa_query(struct hostapd_data *hapd, struct sta_info *sta,
int reassoc) {
if ((sta->flags & (WLAN_STA_ASSOC | WLAN_STA_MFP | WLAN_STA_AUTHORIZED)) !=
(WLAN_STA_ASSOC | WLAN_STA_MFP | WLAN_STA_AUTHORIZED))
return false;
if (!sta->sa_query_timed_out && sta->sa_qu... | check_sa_query | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
bool check_sa_query_need(hostapd_data *hapd, sta_info *sta) {
if ((sta->flags & 0x422) != 0x422)
return 0;
if (!sta->sa_query_timed_out && sta->sa_query_count > 0)
ap_check_sa_query_timeout(hapd, sta);
if (sta->sa_query_timed_out || sta->auth_alg == 2)
return 0;
if (!sta->sa_query_count)
ap_sta_... | static bool check_sa_query_need(struct hostapd_data *hapd,
struct sta_info *sta) {
if ((sta->flags & (WLAN_STA_ASSOC | WLAN_STA_MFP | WLAN_STA_AUTHORIZED)) !=
(WLAN_STA_ASSOC | WLAN_STA_MFP | WLAN_STA_AUTHORIZED))
return false;
if (!sta->sa_query_timed_out && sta->sa_query... | check_sa_query_need | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int check_sae_rejected_groups(hostapd_data *hapd, sae_data *sae) {
const char *v3;
u16 group;
int enabled;
size_t i;
const u8 *pos;
wpabuf *groups;
size_t count;
if (!sae->tmp)
return 0;
groups = sae->tmp->peer_rejected_groups;
if (!groups)
return 0;
pos = (const u8 *)wpabuf_head_72(group... | static int check_sae_rejected_groups(struct hostapd_data *hapd,
struct sae_data *sae) {
const struct wpabuf *groups;
size_t i, count;
const u8 *pos;
if (!sae->tmp)
return 0;
groups = sae->tmp->peer_rejected_groups;
if (!groups)
return 0;
pos = wpabuf_head(gro... | check_sae_rejected_groups | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void check_server_hello(tls_connection *conn, const u8 *pos, const u8 *end) {
signed long payload_len;
size_t id_len;
if (end - pos > 2) {
payload_len = WPA_GET_BE24_6(pos);
if (payload_len <= (unsigned long)(end - (pos + 3)) && payload_len > 33 &&
payload_len - 34 > 0) {
id_len = pos[37];
... | static void check_server_hello(struct tls_connection *conn, const u8 *pos,
const u8 *end) {
size_t payload_len, id_len;
if (end - pos < 3)
return;
payload_len = WPA_GET_BE24(pos);
pos += 3;
if ((size_t)(end - pos) < payload_len)
return;
end = pos + payload_len;
if... | check_server_hello | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void check_server_key_exchange(SSL *ssl, tls_connection *conn, const u8 *pos,
const u8 *end) {
const u8 *endb;
const u8 *posb;
const u8 *posc;
u16 dh_len;
int bits;
signed long payload_len;
BIGNUM *p;
if ((conn->flags & 0x800) != 0 && conn->cipher_suite == 159 &&
en... | static void check_server_key_exchange(SSL *ssl, struct tls_connection *conn,
const u8 *pos, const u8 *end) {
size_t payload_len;
u16 dh_len;
BIGNUM *p;
int bits;
if (!(conn->flags & TLS_CONN_SUITEB))
return;
if (conn->cipher_suite != 0x9f)
return;
if (end -... | check_server_key_exchange | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
u16 check_ssid(hostapd_data *hapd, sta_info *sta, const u8 *ssid_ie,
size_t ssid_ie_len) {
const char *v5;
if (!ssid_ie)
return 1;
if (ssid_ie_len == hapd->conf->ssid.ssid_len &&
!memcmp(ssid_ie, &hapd->conf->ssid, ssid_ie_len))
return 0;
v5 = wpa_ssid_txt(ssid_ie, ssid_ie_len);
... | static u16 check_ssid(struct hostapd_data *hapd, struct sta_info *sta,
const u8 *ssid_ie, size_t ssid_ie_len) {
if (ssid_ie == NULL)
return WLAN_STATUS_UNSPECIFIED_FAILURE;
if (ssid_ie_len != hapd->conf->ssid.ssid_len ||
os_memcmp(ssid_ie, hapd->conf->ssid.ssid, ssid_ie_len) != 0) {... | check_ssid | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int check_survey_ok(nlattr **sinfo, u32 surveyed_freq,
unsigned int freq_filter) {
return !freq_filter || freq_filter == surveyed_freq;
} | static int check_survey_ok(struct nlattr **sinfo, u32 surveyed_freq,
unsigned int freq_filter) {
if (!freq_filter)
return 1;
return freq_filter == surveyed_freq;
} | check_survey_ok | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int check_valid_vht_mcs(hostapd_hw_modes *mode, const u8 *sta_vht_capab) {
int i;
if (!mode)
return 1;
for (i = 0; i <= 7; ++i) {
if (((unsigned short)WORD2(*(_QWORD *)mode->vht_mcs_set) &
(3 << (2 * i))) != 3 &&
(*((unsigned short *)sta_vht_capab + 2) & (3 << (2 * i))) != 3) {
ret... | static int check_valid_vht_mcs(struct hostapd_hw_modes *mode,
const u8 *sta_vht_capab) {
const struct ieee80211_vht_capabilities *vht_cap;
struct ieee80211_vht_capabilities ap_vht_cap;
u16 sta_rx_mcs_set, ap_tx_mcs_set;
int i;
if (!mode)
return 1;
os_memcpy(&ap_vht_cap.v... | check_valid_vht_mcs | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
u16 check_wmm(hostapd_data *hapd, sta_info *sta, const u8 *wmm_ie,
size_t wmm_ie_len) {
u32 flags;
u32 v6;
flags = sta->flags;
BYTE1(flags) &= ~2u;
sta->flags = flags;
sta->qosinfo = 0;
if (wmm_ie && hapd->conf->wmm_enabled) {
if (!hostapd_eid_wmm_valid(hapd, wmm_ie, wmm_ie_len)) {
... | static u16 check_wmm(struct hostapd_data *hapd, struct sta_info *sta,
const u8 *wmm_ie, size_t wmm_ie_len) {
sta->flags &= ~WLAN_STA_WMM;
sta->qosinfo = 0;
if (wmm_ie && hapd->conf->wmm_enabled) {
struct wmm_information_element *wmm;
if (!hostapd_eid_wmm_valid(hapd, wmm_ie, wmm_ie_le... | check_wmm | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void clean_survey_results(survey_results *survey_results) {
freq_survey *survey;
freq_survey *tmp;
if (!dl_list_empty_7(&survey_results->survey_list)) {
survey = (freq_survey *)&survey_results->survey_list.next[-4].prev;
tmp = (freq_survey *)&survey_results->survey_list.next->next[-4].prev;
while (&s... | static void clean_survey_results(struct survey_results *survey_results) {
struct freq_survey *survey, *tmp;
if (dl_list_empty(&survey_results->survey_list))
return;
dl_list_for_each_safe(survey, tmp, &survey_results->survey_list,
struct freq_survey, list) {
dl_list_del(&survey->l... | clean_survey_results | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void clear_state_mismatch(wpa_driver_nl80211_data *drv, const u8 *addr) {
if ((drv->capa.flags & 0x20) != 0) {
wpa_printf(2,
"nl80211: Clear possible state mismatch "
"(%02x:%02x:%02x:%02x:%02x:%02x)",
*addr, addr[1], addr[2], addr[3], addr[4], addr[5]);
wpa_driver... | static void clear_state_mismatch(struct wpa_driver_nl80211_data *drv,
const u8 *addr) {
if (drv->capa.flags & WPA_DRIVER_FLAGS_SME) {
wpa_printf(MSG_DEBUG,
"nl80211: Clear possible state "
"mismatch (" MACSTR ")",
MAC2STR(addr));
wp... | clear_state_mismatch | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int comeback_token_hash(hostapd_data *hapd, const u8 *addr, u8 *idx) {
u8 hash[40];
unsigned long v6;
v6 = __readfsqword(0x28u);
if (hmac_sha256(hapd->comeback_key, 8u, addr, 6u, hash) < 0)
return -1;
*idx = hash[0];
return 0;
} | static int comeback_token_hash(struct hostapd_data *hapd, const u8 *addr,
u8 *idx) {
u8 hash[SHA256_MAC_LEN];
if (hmac_sha256(hapd->comeback_key, sizeof(hapd->comeback_key), addr,
ETH_ALEN, hash) < 0)
return -1;
*idx = hash[0];
return 0;
} | comeback_token_hash | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int compute_keys(EAP_PWD_group *grp, const crypto_bignum *k,
const crypto_bignum *peer_scalar,
const crypto_bignum *server_scalar, const u8 *confirm_peer,
const u8 *confirm_server, const u32 *ciphersuite, u8 *msk,
u8 *emsk, u8 *session_id) {
size_t p... | int compute_keys(EAP_PWD_group *grp, const struct crypto_bignum *k,
const struct crypto_bignum *peer_scalar,
const struct crypto_bignum *server_scalar,
const u8 *confirm_peer, const u8 *confirm_server,
const u32 *ciphersuite, u8 *msk, u8 *emsk, u8 *ses... | compute_keys | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int compute_password_element(EAP_PWD_group *grp, u16 num, const u8 *password,
size_t password_len, const u8 *id_server,
size_t id_server_len, const u8 *id_peer,
size_t id_peer_len, const u8 *token) {
unsigned char ctr;
u8 found;
... | int compute_password_element(EAP_PWD_group *grp, u16 num, const u8 *password,
size_t password_len, const u8 *id_server,
size_t id_server_len, const u8 *id_peer,
size_t id_peer_len, const u8 *token) {
struct crypto_bignum *qr = NULL... | compute_password_element | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int configured_fixed_chan_to_freq(hostapd_iface *iface) {
int i;
int j;
int freq;
hostapd_hw_modes *mode;
hostapd_channel_data *chan;
if (!iface->conf->channel)
return 0;
if (iface->conf->op_class) {
freq =
ieee80211_chan_to_freq(0, iface->conf->op_class, iface->conf->channel);
if (fr... | static int configured_fixed_chan_to_freq(struct hostapd_iface *iface) {
int freq, i, j;
if (!iface->conf->channel)
return 0;
if (iface->conf->op_class) {
freq = ieee80211_chan_to_freq(NULL, iface->conf->op_class,
iface->conf->channel);
if (freq < 0) {
wpa_print... | configured_fixed_chan_to_freq | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
chan_width convert2width(int width) {
chan_width result;
switch (width) {
case 0:
result = chan_width_CHAN_WIDTH_20_NOHT;
break;
case 1:
result = chan_width_CHAN_WIDTH_20;
break;
case 2:
result = chan_width_CHAN_WIDTH_40;
break;
case 3:
result = chan_width_CHAN_WIDTH_80;
bre... | enum chan_width convert2width(int width) {
switch (width) {
case NL80211_CHAN_WIDTH_20_NOHT:
return CHAN_WIDTH_20_NOHT;
case NL80211_CHAN_WIDTH_20:
return CHAN_WIDTH_20;
case NL80211_CHAN_WIDTH_40:
return CHAN_WIDTH_40;
case NL80211_CHAN_WIDTH_80:
return CHAN_WIDTH_80;
case NL80211_CHAN_WIDT... | convert2width | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void convert_to_protected_dual(wpabuf *msg) { *wpabuf_mhead_u8_6(msg) = 9; } | static void convert_to_protected_dual(struct wpabuf *msg) {
u8 *categ = wpabuf_mhead_u8(msg);
*categ = WLAN_ACTION_PROTECTED_DUAL;
} | convert_to_protected_dual | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int cookie_handler(nl_msg *msg, void *arg) {
long v2;
unsigned int v3;
long v4;
genlmsghdr *gnlh;
nlattr *tb[302];
unsigned long v8;
v8 = __readfsqword(0x28u);
v2 = nlmsg_hdr(msg);
gnlh = (genlmsghdr *)nlmsg_data(v2);
v3 = genlmsg_attrlen(gnlh, 0);
v4 = genlmsg_attrdata(gnlh, 0);
nla_parse(tb, ... | static int cookie_handler(struct nl_msg *msg, void *arg) {
struct nlattr *tb[NL80211_ATTR_MAX + 1];
struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg));
u64 *cookie = arg;
nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0),
genlmsg_attrlen(gnlh, 0), NULL);
if (tb[NL80211_ATTR_COOKIE])
... | cookie_handler | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
u16 copy_sta_ht_capab(hostapd_data *hapd, sta_info *sta, const u8 *ht_capab) {
u32 v3;
u32 flags;
if (ht_capab && (sta->flags & 0x200) != 0 && hapd->iconf->ieee80211n &&
!hapd->conf->disable_11n) {
if (sta->ht_capabilities ||
(sta->ht_capabilities =
(ieee80211_ht_capabilities *)os_... | u16 copy_sta_ht_capab(struct hostapd_data *hapd, struct sta_info *sta,
const u8 *ht_capab) {
if (!ht_capab || !(sta->flags & WLAN_STA_WMM) || !hapd->iconf->ieee80211n ||
hapd->conf->disable_11n) {
sta->flags &= ~WLAN_STA_HT;
os_free(sta->ht_capabilities);
sta->ht_capabilities ... | copy_sta_ht_capab | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
u16 copy_sta_vendor_vht(hostapd_data *hapd, sta_info *sta, const u8 *ie,
size_t len) {
if (ie && len > 0x12 && !hapd->conf->disable_11ac && ie[5] == 0xBF &&
ie[6] > 0xBu && (long)(len - 6) > ie[6]) {
if (sta->vht_capabilities ||
(sta->vht_capabilities =
(ieee8021... | u16 copy_sta_vendor_vht(struct hostapd_data *hapd, struct sta_info *sta,
const u8 *ie, size_t len) {
const u8 *vht_capab;
unsigned int vht_capab_len;
if (!ie || len < 5 + 2 + sizeof(struct ieee80211_vht_capabilities) ||
hapd->conf->disable_11ac)
goto no_capab;
vht_capab = ie ... | copy_sta_vendor_vht | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
u16 copy_sta_vht_capab(hostapd_data *hapd, sta_info *sta, const u8 *vht_capab) {
if (vht_capab && (sta->flags & 0x200) != 0 && hapd->iconf->ieee80211ac &&
!hapd->conf->disable_11ac &&
check_valid_vht_mcs(hapd->iface->current_mode, vht_capab)) {
if (sta->vht_capabilities ||
(sta->vht_capabiliti... | u16 copy_sta_vht_capab(struct hostapd_data *hapd, struct sta_info *sta,
const u8 *vht_capab) {
if (!vht_capab || !(sta->flags & WLAN_STA_WMM) || !hapd->iconf->ieee80211ac ||
hapd->conf->disable_11ac ||
!check_valid_vht_mcs(hapd->iface->current_mode, vht_capab)) {
sta->flags &= ... | copy_sta_vht_capab | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
u16 copy_sta_vht_oper(hostapd_data *hapd, sta_info *sta, const u8 *vht_oper) {
if (vht_oper) {
if (sta->vht_operation ||
(sta->vht_operation = (ieee80211_vht_operation *)os_zalloc(5u)) != 0) {
memcpy(sta->vht_operation, vht_oper, sizeof(ieee80211_vht_operation));
return 0;
} else {
r... | u16 copy_sta_vht_oper(struct hostapd_data *hapd, struct sta_info *sta,
const u8 *vht_oper) {
if (!vht_oper) {
os_free(sta->vht_operation);
sta->vht_operation = NULL;
return WLAN_STATUS_SUCCESS;
}
if (!sta->vht_operation) {
sta->vht_operation = os_zalloc(sizeof(struct ieee802... | copy_sta_vht_oper | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
u16 copy_supp_rates(hostapd_data *hapd, sta_info *sta,
ieee802_11_elems *elems) {
if (hapd->iface->current_mode && hapd->iface->current_mode->mode ==
hostapd_hw_mode_HOSTAPD_MODE_IEEE80211AD)
return 0;
if (elems->supp_rates) {
if (elems->supp_rates_... | static u16 copy_supp_rates(struct hostapd_data *hapd, struct sta_info *sta,
struct ieee802_11_elems *elems) {
if (hapd->iface->current_mode &&
hapd->iface->current_mode->mode == HOSTAPD_MODE_IEEE80211AD)
return WLAN_STATUS_SUCCESS;
if (!elems->supp_rates) {
hostapd_logger(... | copy_supp_rates | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int count_interface_cb(hostapd_iface *iface, void *ctx) {
++*(_DWORD *)ctx;
return 0;
} | static int count_interface_cb(struct hostapd_iface *iface, void *ctx) {
int *count = ctx;
(*count)++;
return 0;
} | count_interface_cb | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int country_match(const char *const *cc, const char *const country) {
int i;
if (!country)
return 0;
for (i = 0; cc[i]; ++i) {
if (*cc[i] == *country && *((_BYTE *)cc[i] + 1) == country[1])
return 1;
}
return 0;
} | static int country_match(const char *const cc[], const char *const country) {
int i;
if (country == NULL)
return 0;
for (i = 0; cc[i]; i++) {
if (cc[i][0] == country[0] && cc[i][1] == country[1])
return 1;
}
return 0;
} | country_match | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
u8 country_to_global_op_class(const char *country, u8 op_class) {
u8 g_op_class;
const country_op_class *country_array;
size_t size;
if (country_match(us_op_class_cc, country)) {
country_array = us_op_class;
size = 19;
} else if (country_match(eu_op_class_cc, country)) {
country_array = eu_op_cla... | u8 country_to_global_op_class(const char *country, u8 op_class) {
const struct country_op_class *country_array;
size_t size;
u8 g_op_class;
if (country_match(us_op_class_cc, country)) {
country_array = us_op_class;
size = ARRAY_SIZE(us_op_class);
} else if (country_match(eu_op_class_cc, country)) {
... | country_to_global_op_class | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
u32 crc32(const u8 *frame, size_t frame_len) {
u32 crc;
size_t i;
crc = -1;
for (i = 0; i < frame_len; ++i)
crc = crc32_table[(unsigned char)(crc ^ frame[i])] ^ (crc >> 8);
return ~crc;
} | u32 crc32(const u8 *frame, size_t frame_len) {
size_t i;
u32 crc;
crc = 0xFFFFFFFF;
for (i = 0; i < frame_len; i++)
crc = crc32_table[(crc ^ frame[i]) & 0xff] ^ (crc >> 8);
return ~crc;
} | crc32 | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int crypto_bignum_legendre(const crypto_bignum *a, const crypto_bignum *p) {
long v3;
unsigned int is_word;
unsigned int v5;
unsigned int is_zero;
int res;
int resa;
unsigned int mask;
BIGNUM *exp;
BIGNUM *tmp;
BN_CTX *bnctx;
res = -2;
bnctx = (BN_CTX *)BN_CTX_new(a);
if (!bnctx)
return -... | int crypto_bignum_legendre(const struct crypto_bignum *a,
const struct crypto_bignum *p) {
BN_CTX *bnctx;
BIGNUM *exp = NULL, *tmp = NULL;
int res = -2;
unsigned int mask;
if (TEST_FAIL())
return -2;
bnctx = BN_CTX_new();
if (bnctx == NULL)
return -2;
exp = BN_new()... | crypto_bignum_legendre | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *crypto_csr_sign(crypto_csr *csr, crypto_ec_key *key,
crypto_hash_alg algo) {
int der_len;
unsigned char *der;
const EVP_MD *sign_md;
wpabuf *buf;
unsigned long v8;
v8 = __readfsqword(0x28u);
der = 0;
if (algo == crypto_hash_alg_CRYPTO_HASH_ALG_SHA512) {
sign_md = (co... | struct wpabuf *crypto_csr_sign(struct crypto_csr *csr,
struct crypto_ec_key *key,
enum crypto_hash_alg algo) {
const EVP_MD *sign_md;
struct wpabuf *buf;
unsigned char *der = NULL;
int der_len;
switch (algo) {
case CRYPTO_HASH_ALG_SHA256:
si... | crypto_csr_sign | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
crypto_csr *crypto_csr_verify(const wpabuf *req) {
size_t v1;
const u8 *der;
EVP_PKEY *pkey;
X509_REQ *csr;
unsigned long v6;
v6 = __readfsqword(0x28u);
pkey = 0;
der = (const u8 *)wpabuf_head_68(req);
v1 = wpabuf_len_68(req);
csr = (X509_REQ *)d2i_X509_REQ(0, &der, v1);
if (!csr)
return 0;
... | struct crypto_csr *crypto_csr_verify(const struct wpabuf *req) {
X509_REQ *csr;
EVP_PKEY *pkey = NULL;
const u8 *der = wpabuf_head(req);
csr = d2i_X509_REQ(NULL, &der, wpabuf_len(req));
if (!csr)
return NULL;
pkey = X509_REQ_get_pubkey((X509_REQ *)csr);
if (!pkey)
goto fail;
if (X509_REQ_veri... | crypto_csr_verify | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *crypto_ec_key_get_pubkey_point(crypto_ec_key *key, int prefix) {
int len;
int res;
unsigned char *pos;
EC_KEY *eckey;
wpabuf *buf;
unsigned long v8;
v8 = __readfsqword(0x28u);
eckey = (EC_KEY *)EVP_PKEY_get1_EC_KEY(key);
if (!eckey)
return 0;
EC_KEY_set_conv_form(eckey, 4);
len = i2o_... | struct wpabuf *crypto_ec_key_get_pubkey_point(struct crypto_ec_key *key,
int prefix) {
int len, res;
EC_KEY *eckey;
struct wpabuf *buf;
unsigned char *pos;
eckey = EVP_PKEY_get1_EC_KEY((EVP_PKEY *)key);
if (!eckey)
return NULL;
EC_KEY_set_conv_form(eckey,... | crypto_ec_key_get_pubkey_point | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *crypto_ec_key_sign_r_s(crypto_ec_key *key, const u8 *data, size_t len) {
size_t v4;
int prime_len;
const BIGNUM *r;
const BIGNUM *s;
const unsigned char *p;
BIGNUM *prime;
ECDSA_SIG *sig;
wpabuf *buf;
const EC_KEY *eckey;
const EC_GROUP *group;
u8 *r_buf;
u8 *s_buf;
unsigned long v16;
... | struct wpabuf *crypto_ec_key_sign_r_s(struct crypto_ec_key *key, const u8 *data,
size_t len) {
const EC_GROUP *group;
const EC_KEY *eckey;
BIGNUM *prime = NULL;
ECDSA_SIG *sig = NULL;
const BIGNUM *r, *s;
u8 *r_buf, *s_buf;
struct wpabuf *buf;
const unsigned char *p... | crypto_ec_key_sign_r_s | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void crypto_ec_point_debug_print(const crypto_ec *e, const crypto_ec_point *p,
const char *title) {
char *x_str;
char *y_str;
BIGNUM *x;
BIGNUM *y;
x_str = 0;
y_str = 0;
x = (BIGNUM *)BN_new();
y = (BIGNUM *)BN_new();
if (x) {
if (y) {
if ((unsigned int)EC_P... | void crypto_ec_point_debug_print(const struct crypto_ec *e,
const struct crypto_ec_point *p,
const char *title) {
BIGNUM *x, *y;
char *x_str = NULL, *y_str = NULL;
x = BN_new();
y = BN_new();
if (!x || !y ||
EC_POINT_get_affine_coordinat... | crypto_ec_point_debug_print | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int crypto_ec_point_to_bin(crypto_ec *e, const crypto_ec_point *point, u8 *x,
u8 *y) {
int ret;
int len;
const crypto_bignum *x_bn;
const crypto_bignum *y_bn;
ret = -1;
len = (int)(BN_num_bits(e->prime) + 7) / 8;
x_bn = (const crypto_bignum *)BN_new();
y_bn = (const crypto_bi... | int crypto_ec_point_to_bin(struct crypto_ec *e,
const struct crypto_ec_point *point, u8 *x, u8 *y) {
BIGNUM *x_bn, *y_bn;
int ret = -1;
int len = BN_num_bytes(e->prime);
if (TEST_FAIL())
return -1;
x_bn = BN_new();
y_bn = BN_new();
if (x_bn && y_bn &&
EC_POINT_get_a... | crypto_ec_point_to_bin | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *crypto_ecdh_get_pubkey(crypto_ecdh *ecdh, int inc_y) {
size_t v3;
long error;
const char *v5;
u8 *v6;
u8 *v7;
int len;
wpabuf *buf;
const crypto_bignum *y;
EC_KEY *eckey;
const crypto_ec_point *pubkey;
const crypto_bignum *x;
buf = 0;
y = 0;
len = (int)(BN_num_bits(ecdh->ec->prime) ... | struct wpabuf *crypto_ecdh_get_pubkey(struct crypto_ecdh *ecdh, int inc_y) {
struct wpabuf *buf = NULL;
EC_KEY *eckey;
const EC_POINT *pubkey;
BIGNUM *x, *y = NULL;
int len = BN_num_bytes(ecdh->ec->prime);
int res;
eckey = EVP_PKEY_get1_EC_KEY(ecdh->pkey);
if (!eckey)
return NULL;
pubkey = EC_KE... | crypto_ecdh_get_pubkey | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
crypto_hash *crypto_hash_init(crypto_hash_alg alg, const u8 *key,
size_t key_len) {
unsigned int key_lena;
const EVP_MD *md;
crypto_hash *ctx;
key_lena = key_len;
if (alg == crypto_hash_alg_CRYPTO_HASH_ALG_HMAC_SHA256) {
md = (const EVP_MD *)EVP_sha256(alg, key);
} else {
... | struct crypto_hash *crypto_hash_init(enum crypto_hash_alg alg, const u8 *key,
size_t key_len) {
struct crypto_hash *ctx;
const EVP_MD *md;
switch (alg) {
#ifndef OPENSSL_NO_MD5
case CRYPTO_HASH_ALG_HMAC_MD5:
md = EVP_md5();
break;
#endif
#ifndef OPENSSL_NO_SHA
cas... | crypto_hash_init | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *crypto_pkcs7_get_certificates(const wpabuf *pkcs7) {
size_t v1;
long error;
const char *v3;
int v4;
long v5;
unsigned int v6;
void *v7;
int i;
int num;
int res;
const unsigned char *p;
stack_st_X509 *certs;
BIO *out;
wpabuf *pem;
PKCS7 *p7;
size_t rlen;
X509 *cert;
unsigned l... | struct wpabuf *crypto_pkcs7_get_certificates(const struct wpabuf *pkcs7) {
#ifdef OPENSSL_IS_BORINGSSL
CBS pkcs7_cbs;
#else
PKCS7 *p7 = NULL;
const unsigned char *p = wpabuf_head(pkcs7);
#endif
STACK_OF(X509) * certs;
int i, num;
BIO *out = NULL;
size_t rlen;
struct wpabuf *pem = NULL;
int res;
#ifde... | crypto_pkcs7_get_certificates | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const char *ctrl_dir_state_txt(int s) {
if (!s)
return "FORCE_BOTH";
if (s == 1)
return "IN_OR_BOTH";
return "Unknown";
} | static inline const char *ctrl_dir_state_txt(int s) {
switch (s) {
case CTRL_DIR_FORCE_BOTH:
return "FORCE_BOTH";
case CTRL_DIR_IN_OR_BOTH:
return "IN_OR_BOTH";
default:
return "Unknown";
}
} | ctrl_dir_state_txt | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const char *ctrl_dir_txt(ControlledDirection dir) {
if (dir == Both)
return "Both";
if (dir == In)
return "In";
return "Unknown";
} | static inline const char *ctrl_dir_txt(ControlledDirection dir) {
switch (dir) {
case Both:
return "Both";
case In:
return "In";
default:
return "Unknown";
}
} | ctrl_dir_txt | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ctrl_iface_attach(dl_list *ctrl_dst, sockaddr_storage *from,
socklen_t fromlen, const char *input) {
wpa_ctrl_dst *dst;
wpa_ctrl_dst *dsta;
for (dst = (wpa_ctrl_dst *)ctrl_dst->next; ctrl_dst != (dl_list *)dst;
dst = (wpa_ctrl_dst *)dst->list.next) {
if (!sockaddr_compare(fro... | int ctrl_iface_attach(struct dl_list *ctrl_dst, struct sockaddr_storage *from,
socklen_t fromlen, const char *input) {
struct wpa_ctrl_dst *dst;
dl_list_for_each(dst, ctrl_dst, struct wpa_ctrl_dst, list) {
if (!sockaddr_compare(from, fromlen, &dst->addr, dst->addrlen))
return ctrl_s... | ctrl_iface_attach | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ctrl_iface_detach(dl_list *ctrl_dst, sockaddr_storage *from,
socklen_t fromlen) {
wpa_ctrl_dst *dst;
for (dst = (wpa_ctrl_dst *)ctrl_dst->next; ctrl_dst != (dl_list *)dst;
dst = (wpa_ctrl_dst *)dst->list.next) {
if (!sockaddr_compare(from, fromlen, &dst->addr, dst->addrlen)) {
... | int ctrl_iface_detach(struct dl_list *ctrl_dst, struct sockaddr_storage *from,
socklen_t fromlen) {
struct wpa_ctrl_dst *dst;
dl_list_for_each(dst, ctrl_dst, struct wpa_ctrl_dst, list) {
if (!sockaddr_compare(from, fromlen, &dst->addr, dst->addrlen)) {
sockaddr_print(MSG_DEBUG, "CTR... | ctrl_iface_detach | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ctrl_iface_level(dl_list *ctrl_dst, sockaddr_storage *from,
socklen_t fromlen, const char *level) {
wpa_ctrl_dst *dst;
wpa_printf(2, "CTRL_IFACE LEVEL %s", level);
for (dst = (wpa_ctrl_dst *)ctrl_dst->next; ctrl_dst != (dl_list *)dst;
dst = (wpa_ctrl_dst *)dst->list.next) {
if... | int ctrl_iface_level(struct dl_list *ctrl_dst, struct sockaddr_storage *from,
socklen_t fromlen, const char *level) {
struct wpa_ctrl_dst *dst;
wpa_printf(MSG_DEBUG, "CTRL_IFACE LEVEL %s", level);
dl_list_for_each(dst, ctrl_dst, struct wpa_ctrl_dst, list) {
if (!sockaddr_compare(from, f... | ctrl_iface_level | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int ctrl_set_events(wpa_ctrl_dst *dst, const char *input) {
u32 v3;
unsigned int val;
char *value;
if (!input)
return 0;
value = strchr(input, 61);
if (!value)
return -1;
val = atoi(value + 1);
if (val >= 2)
return -1;
if (str_starts(input, "probe_rx_events=")) {
if (val)
v3 = d... | static int ctrl_set_events(struct wpa_ctrl_dst *dst, const char *input) {
const char *value;
int val;
if (!input)
return 0;
value = os_strchr(input, '=');
if (!value)
return -1;
value++;
val = atoi(value);
if (val < 0 || val > 1)
return -1;
if (str_starts(input, "probe_rx_events=")) {
... | ctrl_set_events | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int cw2ecw(unsigned int cw) {
unsigned int cwa;
int bit;
cwa = cw;
if (!cw)
return 0;
bit = 1;
while (cwa != 1) {
cwa >>= 1;
++bit;
}
return bit;
} | static int cw2ecw(unsigned int cw) {
int bit;
if (cw == 0)
return 0;
for (bit = 1; cw != 1; bit++)
cw >>= 1;
return bit;
} | cw2ecw | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int das_attr_match(rsn_pmksa_cache_entry *entry, radius_das_attrs *attr) {
size_t cui_len;
size_t v4;
const void *v5;
int match;
char buf[24];
unsigned long v8;
v8 = __readfsqword(0x28u);
match = 0;
if (attr->sta_addr) {
if (memcmp(attr->sta_addr, entry->spa, 6u))
return 0;
match = 1;
... | static int das_attr_match(struct rsn_pmksa_cache_entry *entry,
struct radius_das_attrs *attr) {
int match = 0;
if (attr->sta_addr) {
if (os_memcmp(attr->sta_addr, entry->spa, ETH_ALEN) != 0)
return 0;
match++;
}
if (attr->acct_multi_session_id) {
char buf[20];
... | das_attr_match | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void db_update_last_msk(radius_session *sess, const char *msk) { ; } | static void db_update_last_msk(struct radius_session *sess, const char *msk) {
#ifdef CONFIG_RADIUS_TEST
#ifdef CONFIG_SQLITE
char *sql = NULL;
char *id_str = NULL;
const u8 *id;
size_t id_len;
const char *serial_num;
if (!sess->server->db)
return;
serial_num = eap_get_serial_num(sess->eap);
if (s... | db_update_last_msk | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void dbl(u8 *pad) {
int i;
int carry;
carry = *pad & 0x80;
for (i = 0; i <= 14; ++i)
pad[i] = (pad[i + 1] >> 7) | (2 * pad[i]);
pad[15] *= 2;
if (carry)
pad[15] ^= 0x87u;
} | static void dbl(u8 *pad) {
int i, carry;
carry = pad[0] & 0x80;
for (i = 0; i < AES_BLOCK_SIZE - 1; i++)
pad[i] = (pad[i] << 1) | (pad[i + 1] >> 7);
pad[AES_BLOCK_SIZE - 1] <<= 1;
if (carry)
pad[AES_BLOCK_SIZE - 1] ^= 0x87;
} | dbl | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void debug_print_bignum(const char *title, const crypto_bignum *a,
size_t prime_len) {
u8 *bin;
bin = (u8 *)malloc(prime_len);
if (bin && crypto_bignum_to_bin(a, bin, prime_len, prime_len) >= 0)
wpa_hexdump_key(2, title, bin, prime_len);
else
wpa_printf(2, "Could not print bignu... | static void debug_print_bignum(const char *title, const struct crypto_bignum *a,
size_t prime_len) {
u8 *bin;
bin = os_malloc(prime_len);
if (bin && crypto_bignum_to_bin(a, bin, prime_len, prime_len) >= 0)
wpa_hexdump_key(MSG_DEBUG, title, bin, prime_len);
else
wpa_printf... | debug_print_bignum | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void debug_print_cert(X509 *cert, const char *title) {
long v2;
int res;
BIO *out;
size_t rlen;
char *txt;
if (wpa_debug_level <= 2) {
v2 = BIO_s_mem();
out = (BIO *)BIO_new(v2);
if (out) {
X509_print(out, cert);
rlen = BIO_ctrl_pending(out);
txt = (char *)malloc(rlen + 1);
... | static void debug_print_cert(X509 *cert, const char *title) {
#ifndef CONFIG_NO_STDOUT_DEBUG
BIO *out;
size_t rlen;
char *txt;
int res;
if (wpa_debug_level > MSG_DEBUG)
return;
out = BIO_new(BIO_s_mem());
if (!out)
return;
X509_print(out, cert);
rlen = BIO_ctrl_pending(out);
txt = os_mall... | debug_print_cert | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void decode_tunnel_passwords(hostapd_data *hapd, const u8 *shared_secret,
size_t shared_secret_len, radius_msg *msg,
radius_msg *req,
hostapd_cached_radius_acl *cache) {
int passphraselen;
size_t i;
hostapd_sta_wpa_psk_short *p... | static void decode_tunnel_passwords(struct hostapd_data *hapd,
const u8 *shared_secret,
size_t shared_secret_len,
struct radius_msg *msg,
struct radius_msg *req,
... | decode_tunnel_passwords | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
u8 *decrypt_ms_key(const u8 *key, size_t len, const u8 *req_authenticator,
const u8 *secret, size_t secret_len, size_t *reslen) {
size_t v7;
const u8 *v8;
u8 v9;
u8 *v10;
int i;
int first;
u8 *ppos;
const u8 *pos;
size_t left;
size_t plen;
u8 *plain;
u8 *res;
const u8 *addr[... | static u8 *decrypt_ms_key(const u8 *key, size_t len,
const u8 *req_authenticator, const u8 *secret,
size_t secret_len, size_t *reslen) {
u8 *plain, *ppos, *res;
const u8 *pos;
size_t left, plen;
u8 hash[MD5_MAC_LEN];
int i, first = 1;
const u8 *addr[3];
... | decrypt_ms_key | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void del_ifidx(wpa_driver_nl80211_data *drv, int ifidx, int ifidx_reason) {
int i;
for (i = 0; i < drv->num_if_indices; ++i) {
if ((ifidx == drv->if_indices[i].ifindex || ifidx == -1) &&
(ifidx_reason == drv->if_indices[i].reason || ifidx_reason == -1)) {
drv->if_indices[i].ifindex = 0;
drv... | static void del_ifidx(struct wpa_driver_nl80211_data *drv, int ifidx,
int ifidx_reason) {
int i;
for (i = 0; i < drv->num_if_indices; i++) {
if ((drv->if_indices[i].ifindex == ifidx || ifidx == IFIDX_ANY) &&
(drv->if_indices[i].reason == ifidx_reason ||
ifidx_reason == IF... | del_ifidx | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void dfs_adjust_center_freq(hostapd_iface *iface, hostapd_channel_data *chan,
int secondary_channel, int sec_chan_idx_80p80,
u8 *oper_centr_freq_seg0_idx,
u8 *oper_centr_freq_seg1_idx) {
u8 oper_chwidth_4;
char sec_chan_idx_80p80a;
... | static void dfs_adjust_center_freq(struct hostapd_iface *iface,
struct hostapd_channel_data *chan,
int secondary_channel,
int sec_chan_idx_80p80,
u8 *oper_centr_freq_seg0_idx,
... | dfs_adjust_center_freq | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dfs_are_channels_overlapped(hostapd_iface *iface, int freq, int chan_width,
int cf1, int cf2) {
u8 radar_chan;
int start_chan_idx1;
int n_chans1;
int i;
int j;
int frequency;
int radar_n_chans;
int res;
int start_chan_idx;
int n_chans;
hostapd_hw_modes *mode;
... | static int dfs_are_channels_overlapped(struct hostapd_iface *iface, int freq,
int chan_width, int cf1, int cf2) {
int start_chan_idx, start_chan_idx1;
struct hostapd_hw_modes *mode;
struct hostapd_channel_data *chan;
int n_chans, n_chans1, i, j, frequency = freq, radar_n_c... | dfs_are_channels_overlapped | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dfs_chan_range_available(hostapd_hw_modes *mode, int first_chan_idx,
int num_chans, int skip_radar) {
int i;
u32 bw;
hostapd_channel_data *first_chan;
hostapd_channel_data *chan;
bw = num_chan_to_bw(num_chans);
if (num_chans + first_chan_idx <= mode->num_channels) {
fir... | static int dfs_chan_range_available(struct hostapd_hw_modes *mode,
int first_chan_idx, int num_chans,
int skip_radar) {
struct hostapd_channel_data *first_chan, *chan;
int i;
u32 bw = num_chan_to_bw(num_chans);
if (first_chan_idx + num_cha... | dfs_chan_range_available | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dfs_channel_available(hostapd_channel_data *chan, int skip_radar) {
if (skip_radar && (chan->flag & 8) != 0 && (chan->flag & 0x300) != 0x300)
return 0;
if ((chan->flag & 1) != 0)
return 0;
return (chan->flag & 8) == 0 || (chan->flag & 0x300) != 0x200;
} | static int dfs_channel_available(struct hostapd_channel_data *chan,
int skip_radar) {
if (skip_radar && (chan->flag & HOSTAPD_CHAN_RADAR) &&
((chan->flag & HOSTAPD_CHAN_DFS_MASK) != HOSTAPD_CHAN_DFS_AVAILABLE))
return 0;
if (chan->flag & HOSTAPD_CHAN_DISABLED)
return... | dfs_channel_available | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dfs_check_chans_available(hostapd_iface *iface, int start_chan_idx,
int n_chans) {
int i;
hostapd_channel_data *channel;
for (i = 0; i < n_chans; ++i) {
channel = &iface->current_mode->channels[start_chan_idx + i];
if ((channel->flag & 1) != 0 ||
(channel->flag &... | static int dfs_check_chans_available(struct hostapd_iface *iface,
int start_chan_idx, int n_chans) {
struct hostapd_channel_data *channel;
struct hostapd_hw_modes *mode;
int i;
mode = iface->current_mode;
for (i = 0; i < n_chans; i++) {
channel = &mode->channels[star... | dfs_check_chans_available | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dfs_check_chans_radar(hostapd_iface *iface, int start_chan_idx,
int n_chans) {
int i;
int res;
res = 0;
for (i = 0; i < n_chans; ++i) {
if ((iface->current_mode->channels[start_chan_idx + i].flag & 8) != 0)
++res;
}
return res;
} | static int dfs_check_chans_radar(struct hostapd_iface *iface,
int start_chan_idx, int n_chans) {
struct hostapd_channel_data *channel;
struct hostapd_hw_modes *mode;
int i, res = 0;
mode = iface->current_mode;
for (i = 0; i < n_chans; i++) {
channel = &mode->channels[sta... | dfs_check_chans_radar | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dfs_check_chans_unavailable(hostapd_iface *iface, int start_chan_idx,
int n_chans) {
int i;
int res;
hostapd_channel_data *channel;
res = 0;
for (i = 0; i < n_chans; ++i) {
channel = &iface->current_mode->channels[start_chan_idx + i];
if ((channel->flag & 1) != 0)
... | static int dfs_check_chans_unavailable(struct hostapd_iface *iface,
int start_chan_idx, int n_chans) {
struct hostapd_channel_data *channel;
struct hostapd_hw_modes *mode;
int i, res = 0;
mode = iface->current_mode;
for (i = 0; i < n_chans; i++) {
channel = &mode->... | dfs_check_chans_unavailable | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const char *dfs_domain_name(nl80211_dfs_regions region) {
if (region == nl80211_dfs_regions_NL80211_DFS_JP)
return "DFS-JP";
if ((unsigned int)region > nl80211_dfs_regions_NL80211_DFS_JP)
return "DFS-invalid";
if (region == nl80211_dfs_regions_NL80211_DFS_ETSI)
return "DFS-ETSI";
if (region)
ret... | static const char *dfs_domain_name(enum nl80211_dfs_regions region) {
switch (region) {
case NL80211_DFS_UNSET:
return "DFS-UNSET";
case NL80211_DFS_FCC:
return "DFS-FCC";
case NL80211_DFS_ETSI:
return "DFS-ETSI";
case NL80211_DFS_JP:
return "DFS-JP";
default:
return "DFS-invalid";
}
} | dfs_domain_name | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
hostapd_channel_data *dfs_downgrade_bandwidth(hostapd_iface *iface,
int *secondary_channel,
u8 *oper_centr_freq_seg0_idx,
u8 *oper_centr_freq_seg1_idx,
... | static struct hostapd_channel_data *
dfs_downgrade_bandwidth(struct hostapd_iface *iface, int *secondary_channel,
u8 *oper_centr_freq_seg0_idx,
u8 *oper_centr_freq_seg1_idx, int *skip_radar) {
struct hostapd_channel_data *channel;
for (;;) {
channel = dfs_get_val... | dfs_downgrade_bandwidth | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dfs_find_channel(hostapd_iface *iface, hostapd_channel_data **ret_chan,
int idx, int skip_radar) {
int n_chans1;
int i;
int channel_idx;
int n_chans;
hostapd_hw_modes *mode;
hostapd_channel_data *chan;
unsigned long v13;
v13 = __readfsqword(0x28u);
channel_idx = 0;
mode = i... | static int dfs_find_channel(struct hostapd_iface *iface,
struct hostapd_channel_data **ret_chan, int idx,
int skip_radar) {
struct hostapd_hw_modes *mode;
struct hostapd_channel_data *chan;
int i, channel_idx = 0, n_chans, n_chans1;
mode = iface->current_... | dfs_find_channel | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
unsigned int dfs_get_cac_time(hostapd_iface *iface, int start_chan_idx,
int n_chans) {
int i;
unsigned int cac_time_ms;
hostapd_channel_data *channel;
cac_time_ms = 0;
for (i = 0; i < n_chans; ++i) {
channel = &iface->current_mode->channels[start_chan_idx + i];
if ((chan... | static unsigned int dfs_get_cac_time(struct hostapd_iface *iface,
int start_chan_idx, int n_chans) {
struct hostapd_channel_data *channel;
struct hostapd_hw_modes *mode;
int i;
unsigned int cac_time_ms = 0;
mode = iface->current_mode;
for (i = 0; i < n_chans; i++) {
... | dfs_get_cac_time | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
hostapd_channel_data *dfs_get_chan_data(hostapd_hw_modes *mode, int freq,
int first_chan_idx) {
while (first_chan_idx < mode->num_channels) {
if (freq == mode->channels[first_chan_idx].freq)
return &mode->channels[first_chan_idx];
++first_chan_idx;
}
return 0;... | static struct hostapd_channel_data *
dfs_get_chan_data(struct hostapd_hw_modes *mode, int freq, int first_chan_idx) {
int i;
for (i = first_chan_idx; i < mode->num_channels; i++) {
if (mode->channels[i].freq == freq)
return &mode->channels[i];
}
return NULL;
} | dfs_get_chan_data | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dfs_get_start_chan_idx(hostapd_iface *iface, int *seg1_start) {
u8 oper_chwidth_4;
u8 v3;
int channel_no;
int res;
int i;
int ia;
int ib;
int chan_seg1;
int found;
hostapd_hw_modes *mode;
channel_no = iface->conf->channel;
res = -1;
chan_seg1 = -1;
*seg1_start = -1;
if (iface->conf->i... | static int dfs_get_start_chan_idx(struct hostapd_iface *iface,
int *seg1_start) {
struct hostapd_hw_modes *mode;
struct hostapd_channel_data *chan;
int channel_no = iface->conf->channel;
int res = -1, i;
int chan_seg1 = -1;
*seg1_start = -1;
if (iface->conf->ieee80211n ... | dfs_get_start_chan_idx | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dfs_get_used_n_chans(hostapd_iface *iface, int *seg1) {
u8 oper_chwidth_4;
int n_chans;
n_chans = 1;
*seg1 = 0;
if (iface->conf->ieee80211n && iface->conf->secondary_channel)
n_chans = 2;
if (iface->conf->ieee80211ac || iface->conf->ieee80211ax) {
oper_chwidth_4 = hostapd_get_oper_chwidth_4(ifa... | static int dfs_get_used_n_chans(struct hostapd_iface *iface, int *seg1) {
int n_chans = 1;
*seg1 = 0;
if (iface->conf->ieee80211n && iface->conf->secondary_channel)
n_chans = 2;
if (iface->conf->ieee80211ac || iface->conf->ieee80211ax) {
switch (hostapd_get_oper_chwidth(iface->conf)) {
case CHANW... | dfs_get_used_n_chans | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
hostapd_channel_data *dfs_get_valid_channel(hostapd_iface *iface,
int *secondary_channel,
u8 *oper_centr_freq_seg0_idx,
u8 *oper_centr_freq_seg1_idx,
... | static struct hostapd_channel_data *
dfs_get_valid_channel(struct hostapd_iface *iface, int *secondary_channel,
u8 *oper_centr_freq_seg0_idx,
u8 *oper_centr_freq_seg1_idx, int skip_radar) {
struct hostapd_hw_modes *mode;
struct hostapd_channel_data *chan = NULL;
struct ... | dfs_get_valid_channel | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
char *dfs_info(hostapd_channel_data *chan) {
int v1;
v1 = chan->flag & 0x300;
if (v1 == 768) {
snprintf(info_0, 0x100u, " (DFS state = %s)", "available");
} else if (v1 == 512) {
snprintf(info_0, 0x100u, " (DFS state = %s)", "unavailable");
} else {
if ((chan->flag & 0x300u) > 0x200)
return... | static char *dfs_info(struct hostapd_channel_data *chan) {
static char info[256];
char *state;
switch (chan->flag & HOSTAPD_CHAN_DFS_MASK) {
case HOSTAPD_CHAN_DFS_UNKNOWN:
state = "unknown";
break;
case HOSTAPD_CHAN_DFS_USABLE:
state = "usable";
break;
case HOSTAPD_CHAN_DFS_UNAVAILABLE:
... | dfs_info | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int dfs_is_chan_allowed(hostapd_channel_data *chan, int n_chans) {
unsigned int i;
unsigned int allowed_no;
int *allowed;
int allowed_160[3];
int allowed_80[8];
int allowed_40[18];
unsigned long v9;
v9 = __readfsqword(0x28u);
allowed_40[0] = 36;
allowed_40[1] = 44;
allowed_40[2] = 52;
allowed_4... | static int dfs_is_chan_allowed(struct hostapd_channel_data *chan, int n_chans) {
int allowed_40[] = {36, 44, 52, 60, 100, 108, 116, 124,
132, 149, 157, 165, 173, 184, 192};
int allowed_80[] = {36, 52, 100, 116, 132, 149, 165};
int allowed_160[] = {36, 100, 149};
int *allowed = allow... | dfs_is_chan_allowed | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
wpabuf *dh5_derive_shared(void *ctx, const wpabuf *peer_public,
const wpabuf *own_private) {
unsigned int v4;
const void *v5;
void *v6;
int keylen;
wpabuf *res;
BIGNUM *pub_key;
size_t rlen;
if (!ctx)
return 0;
v4 = wpabuf_len_68(peer_public);
v5 = wpabuf_head_68(peer_... | struct wpabuf *dh5_derive_shared(void *ctx, const struct wpabuf *peer_public,
const struct wpabuf *own_private) {
BIGNUM *pub_key;
struct wpabuf *res = NULL;
size_t rlen;
DH *dh = ctx;
int keylen;
if (ctx == NULL)
return NULL;
pub_key = BN_bin2bn(wpabuf_head(peer_pub... | dh5_derive_shared | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void *dh5_init(wpabuf **priv, wpabuf **publ) {
void *v3;
void *v4;
const BIGNUM *priv_key;
const BIGNUM *pub_key;
wpabuf *pubkey;
wpabuf *privkey;
BIGNUM *p;
BIGNUM *g;
BIGNUM *q;
DH *dh_0;
size_t publen;
size_t privlen;
unsigned long v15;
v15 = __readfsqword(0x28u);
pubkey = 0;
privkey... | void *dh5_init(struct wpabuf **priv, struct wpabuf **publ) {
#if OPENSSL_VERSION_NUMBER < 0x10100000L || \
(defined(LIBRESSL_VERSION_NUMBER) && \
LIBRESSL_VERSION_NUMBER < 0x20700000L)
DH *dh;
struct wpabuf *pubkey = NULL, *privkey = ... | dh5_init | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void *dh5_init_fixed(const wpabuf *priv, const wpabuf *publ) {
unsigned int v3;
const void *v4;
unsigned int v5;
const void *v6;
BIGNUM *p;
BIGNUM *g;
BIGNUM *priv_key;
BIGNUM *pub_key;
void *dh_0;
priv_key = 0;
pub_key = 0;
dh_0 = (void *)DH_new();
if (!dh_0)
return 0;
g = (BIGNUM *)BN... | void *dh5_init_fixed(const struct wpabuf *priv, const struct wpabuf *publ) {
#if OPENSSL_VERSION_NUMBER < 0x10100000L || \
(defined(LIBRESSL_VERSION_NUMBER) && \
LIBRESSL_VERSION_NUMBER < 0x20700000L)
DH *dh;
dh = DH_new();
if (dh ... | dh5_init_fixed | 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.