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 |
|---|---|---|---|---|---|---|---|
tls_fail_reason openssl_tls_fail_reason(int err) {
tls_fail_reason result;
switch (err) {
case 2:
case 3:
case 18:
case 19:
case 20:
case 21:
case 22:
case 24:
case 25:
case 33:
result = tls_fail_reason_TLS_FAIL_UNTRUSTED;
break;
case 4:
case 5:
case 6:
case 13:
case 14:
cas... | static enum tls_fail_reason openssl_tls_fail_reason(int err) {
switch (err) {
case X509_V_ERR_CERT_REVOKED:
return TLS_FAIL_REVOKED;
case X509_V_ERR_CERT_NOT_YET_VALID:
case X509_V_ERR_CRL_NOT_YET_VALID:
return TLS_FAIL_NOT_YET_VALID;
case X509_V_ERR_CERT_HAS_EXPIRED:
case X509_V_ERR_CRL_HAS_EXPIRED... | openssl_tls_fail_reason | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int oper_class_bw_to_int(const oper_class_map *map) {
int result;
switch (map->bw) {
case BW20:
result = 20;
break;
case BW40PLUS:
case BW40MINUS:
case BW40:
result = 40;
break;
case BW80:
result = 80;
break;
case BW2160:
result = 2160;
break;
case BW160:
case BW80P8... | int oper_class_bw_to_int(const struct oper_class_map *map) {
switch (map->bw) {
case BW20:
return 20;
case BW40:
case BW40PLUS:
case BW40MINUS:
return 40;
case BW80:
return 80;
case BW80P80:
case BW160:
return 160;
case BW2160:
return 2160;
default:
return 0;
}
} | oper_class_bw_to_int | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const char *operstate_str(int state) {
if (state == 6)
return "IF_OPER_UP";
if (state > 6)
return "?";
if (state == -1)
return "no change";
if (state == 5)
return "IF_OPER_DORMANT";
else
return "?";
} | static const char *operstate_str(int state) {
switch (state) {
case -1:
return "no change";
case IF_OPER_DORMANT:
return "IF_OPER_DORMANT";
case IF_OPER_UP:
return "IF_OPER_UP";
}
return "?";
} | operstate_str | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
u8 *owe_assoc_req_process(hostapd_data *hapd, sta_info *sta, const u8 *owe_dh,
u8 owe_dh_len, u8 *owe_buf, size_t owe_buf_len,
u16 *status) {
u8 *result;
u8 *v8;
_BYTE *v9;
size_t v10;
const void *v11;
u8 *owe_bufb;
u8 *owe_bufc;
wpabuf *pub;
if (wp... | u8 *owe_assoc_req_process(struct hostapd_data *hapd, struct sta_info *sta,
const u8 *owe_dh, u8 owe_dh_len, u8 *owe_buf,
size_t owe_buf_len, u16 *status) {
#ifdef CONFIG_TESTING_OPTIONS
if (hapd->conf->own_ie_override) {
wpa_printf(MSG_DEBUG, "OWE: Using IE over... | owe_assoc_req_process | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int owe_group_supported(hostapd_data *hapd, u16 group) {
int i;
int *groups;
groups = hapd->conf->owe_groups;
if (group != 19 && group != 20 && group != 21)
return 0;
if (!groups)
return 1;
for (i = 0; groups[i] > 0; ++i) {
if (groups[i] == group)
return 1;
}
return 0;
} | static int owe_group_supported(struct hostapd_data *hapd, u16 group) {
int i;
int *groups = hapd->conf->owe_groups;
if (group != 19 && group != 20 && group != 21)
return 0;
if (!groups)
return 1;
for (i = 0; groups[i] > 0; i++) {
if (groups[i] == group)
return 1;
}
return 0;
} | owe_group_supported | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
u16 owe_process_assoc_req(hostapd_data *hapd, sta_info *sta, const u8 *owe_dh,
u8 owe_dh_len) {
wpabuf *v5;
size_t v6;
size_t v7;
const u8 *v8;
size_t v9;
const u8 *v10;
size_t v11;
const u8 *v12;
size_t v13;
const u8 *v14;
u8 *owe_pmk;
size_t v16;
u8 *v17;
size_t v... | static u16 owe_process_assoc_req(struct hostapd_data *hapd,
struct sta_info *sta, const u8 *owe_dh,
u8 owe_dh_len) {
struct wpabuf *secret, *pub, *hkey;
int res;
u8 prk[SHA512_MAC_LEN], pmkid[SHA512_MAC_LEN];
const char *info = "OWE Key Generatio... | owe_process_assoc_req | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
u16 owe_process_rsn_ie(hostapd_data *hapd, sta_info *sta, const u8 *rsn_ie,
size_t rsn_ie_len, const u8 *owe_dh, size_t owe_dh_len) {
u8 *v6;
_BYTE *v7;
size_t v8;
const void *v9;
u8 *v10;
u16 status;
wpa_validate_result res;
u8 *owe_buf;
u8 *owe_bufa;
size_t ie_len;
wpabuf ... | u16 owe_process_rsn_ie(struct hostapd_data *hapd, struct sta_info *sta,
const u8 *rsn_ie, size_t rsn_ie_len, const u8 *owe_dh,
size_t owe_dh_len) {
u16 status;
u8 *owe_buf, ie[256 * 2];
size_t ie_len = 0;
enum wpa_validate_result res;
if (!rsn_ie || rsn_ie_len < ... | owe_process_rsn_ie | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
u16 owe_validate_request(hostapd_data *hapd, const u8 *peer, const u8 *rsn_ie,
size_t rsn_ie_len, const u8 *owe_dh,
size_t owe_dh_len) {
size_t rsn_ie_lena;
const u8 *rsn_iea;
wpa_validate_result res;
wpa_ie_data data;
unsigned long v12;
v12 = __readfsqword... | u16 owe_validate_request(struct hostapd_data *hapd, const u8 *peer,
const u8 *rsn_ie, size_t rsn_ie_len, const u8 *owe_dh,
size_t owe_dh_len) {
struct wpa_ie_data data;
int res;
if (!rsn_ie || rsn_ie_len < 2) {
wpa_printf(MSG_DEBUG, "OWE: Invalid RSNE from " ... | owe_validate_request | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int p2p_filter(ndef_record *record) {
return record->type && record->type_length == 23 &&
memcmp(record->type, "application/vnd.wfa.p2p", 0x17u) == 0;
} | static int p2p_filter(struct ndef_record *record) {
if (record->type == NULL ||
record->type_length != os_strlen(p2p_handover_type))
return 0;
if (os_memcmp(record->type, p2p_handover_type,
os_strlen(p2p_handover_type)) != 0)
return 0;
return 1;
} | p2p_filter | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void pad_block(u8 *pad, const u8 *addr, size_t len) {
memset(pad, 0, 0x10u);
memcpy(pad, addr, len);
if (len <= 0xF)
pad[len] = 0x80;
} | static void pad_block(u8 *pad, const u8 *addr, size_t len) {
os_memset(pad, 0, AES_BLOCK_SIZE);
os_memcpy(pad, addr, len);
if (len < AES_BLOCK_SIZE)
pad[len] = 0x80;
} | pad_block | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int parse_3gpp_cell_net(hostapd_bss_config *bss, char *buf, int line) {
char *v4;
const char *v5;
u8 *v6;
char v7;
_BYTE *v8;
size_t count;
char *pos;
const char *posa;
u8 *info;
u8 *ipos;
u8 *iposa;
char *mcc;
char *mnc;
char *mnca;
size_t mnc_len;
info = 0;
count = 1;
for (pos = b... | static int parse_3gpp_cell_net(struct hostapd_bss_config *bss, char *buf,
int line) {
size_t count;
char *pos;
u8 *info = NULL, *ipos;
count = 1;
for (pos = buf; *pos; pos++) {
if ((*pos < '0' || *pos > '9') && *pos != ';' && *pos != ',')
goto fail;
if (*pos == ';... | parse_3gpp_cell_net | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int parse_anqp_elem(hostapd_bss_config *bss, char *buf, int line) {
u8 *v4;
u16 infoid;
anqp_element *elem;
anqp_element *elema;
char *delim;
char *delima;
size_t len;
size_t lena;
wpabuf *payload;
delim = strchr(buf, 58);
if (!delim)
return -1;
delima = delim + 1;
infoid = atoi(buf);
l... | static int parse_anqp_elem(struct hostapd_bss_config *bss, char *buf,
int line) {
char *delim;
u16 infoid;
size_t len;
struct wpabuf *payload;
struct anqp_element *elem;
delim = os_strchr(buf, ':');
if (!delim)
return -1;
delim++;
infoid = atoi(buf);
len = os_strlen(d... | parse_anqp_elem | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int parse_lang_string(hostapd_lang_string **array, unsigned int *count,
char *pos) {
char *v4;
const char *posa;
int ret;
size_t slen;
char *str;
char *sep;
size_t clen;
size_t nlen;
hostapd_lang_string *ls;
unsigned long v13;
posa = pos;
v13 = __readfsqword(0x28u);
str ... | static int parse_lang_string(struct hostapd_lang_string **array,
unsigned int *count, char *pos) {
char *sep, *str = NULL;
size_t clen, nlen, slen;
struct hostapd_lang_string *ls;
int ret = -1;
if (*pos == '"' || (*pos == 'P' && pos[1] == '"')) {
str = wpa_config_parse_string... | parse_lang_string | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int parse_nai_realm(hostapd_bss_config *bss, char *buf, int line) {
int v4;
size_t v5;
char *v6;
int offs;
size_t i;
size_t ia;
size_t ib;
size_t j;
size_t ja;
size_t len;
char *pos;
char *posa;
char *posb;
char *posc;
char *posd;
char *pose;
char *posg;
char *posf;
char *end;
ch... | static int parse_nai_realm(struct hostapd_bss_config *bss, char *buf,
int line) {
struct hostapd_nai_realm_data *realm;
size_t i, j, len;
int *offsets;
char *pos, *end, *rpos;
offsets = os_calloc(bss->nai_realm_count * MAX_NAI_REALMS, sizeof(int));
if (offsets == NULL)
return... | parse_nai_realm | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int parse_qos_map_set(hostapd_bss_config *bss, char *buf, int line) {
u8 v4;
u8 count;
unsigned int val;
const char *pos;
char *posa;
u8 qos_map_set[72];
unsigned long v11;
v11 = __readfsqword(0x28u);
count = 0;
for (pos = buf;; pos = posa + 1) {
if (count == 58) {
wpa_printf(5, "Line %d:... | static int parse_qos_map_set(struct hostapd_bss_config *bss, char *buf,
int line) {
u8 qos_map_set[16 + 2 * 21], count = 0;
char *pos = buf;
int val;
for (;;) {
if (count == sizeof(qos_map_set)) {
wpa_printf(MSG_ERROR,
"Line %d: Too many qos_map_set "
... | parse_qos_map_set | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int parse_roaming_consortium(hostapd_bss_config *bss, char *pos, int line) {
size_t len;
size_t lena;
hostapd_roaming_consortium *rc;
u8 oi[15];
unsigned long v9;
v9 = __readfsqword(0x28u);
len = strlen(pos);
if ((len & 1) != 0 || len <= 5 || len > 0x1F ||
hexstr2bin(pos, oi, len >> 1)) {
wpa... | static int parse_roaming_consortium(struct hostapd_bss_config *bss, char *pos,
int line) {
size_t len = os_strlen(pos);
u8 oi[MAX_ROAMING_CONSORTIUM_LEN];
struct hostapd_roaming_consortium *rc;
if ((len & 1) || len < 2 * 3 || len / 2 > MAX_ROAMING_CONSORTIUM_LEN ||
he... | parse_roaming_consortium | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int parse_sae_password(hostapd_bss_config *bss, const char *val) {
const char *pos;
const char *end;
sae_password_entry *pw;
char *pos2;
const char *pos2a;
char *pos2b;
char *pos2c;
pos = val;
end = 0;
pw = (sae_password_entry *)os_zalloc(0x38u);
if (!pw)
return -1;
memset(pw->peer_addr, 25... | static int parse_sae_password(struct hostapd_bss_config *bss, const char *val) {
struct sae_password_entry *pw;
const char *pos = val, *pos2, *end = NULL;
pw = os_zalloc(sizeof(*pw));
if (!pw)
return -1;
os_memset(pw->peer_addr, 0xff, ETH_ALEN);
pos2 = os_strstr(pos, "|mac=");
if (pos2) {
end = ... | parse_sae_password | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
unsigned int parse_tls_flags(const char *val) {
int flags;
flags = 0x2000;
if (strstr(val, "[ALLOW-SIGN-RSA-MD5]"))
flags = 8193;
if (strstr(val, "[DISABLE-TIME-CHECKS]"))
flags |= 2u;
if (strstr(val, "[DISABLE-TLSv1.0]"))
flags |= 0x100u;
if (strstr(val, "[ENABLE-TLSv1.0]"))
flags |= 0x400... | static unsigned int parse_tls_flags(const char *val) {
unsigned int flags = 0;
flags |= TLS_CONN_DISABLE_TLSv1_3;
if (os_strstr(val, "[ALLOW-SIGN-RSA-MD5]"))
flags |= TLS_CONN_ALLOW_SIGN_RSA_MD5;
if (os_strstr(val, "[DISABLE-TIME-CHECKS]"))
flags |= TLS_CONN_DISABLE_TIME_CHECKS;
if (os_strstr(val, "... | parse_tls_flags | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int parse_venue_name(hostapd_bss_config *bss, char *pos, int line) {
if (!parse_lang_string(&bss->venue_name, &bss->venue_name_count, pos))
return 0;
wpa_printf(5, "Line %d: Invalid venue_name '%s'", line, pos);
return -1;
} | static int parse_venue_name(struct hostapd_bss_config *bss, char *pos,
int line) {
if (parse_lang_string(&bss->venue_name, &bss->venue_name_count, pos)) {
wpa_printf(MSG_ERROR, "Line %d: Invalid venue_name '%s'", line, pos);
return -1;
}
return 0;
} | parse_venue_name | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int parse_venue_url(hostapd_bss_config *bss, char *pos, int line) {
char *v3;
hostapd_venue_url *venue_url;
unsigned int venue_url_count;
int ret;
char *sep;
char *sepa;
size_t nlen;
hostapd_venue_url *url;
hostapd_venue_url *urla;
ret = -1;
sep = strchr(pos, 58);
if (sep) {
v3 = sep;
s... | static int parse_venue_url(struct hostapd_bss_config *bss, char *pos,
int line) {
char *sep;
size_t nlen;
struct hostapd_venue_url *url;
int ret = -1;
sep = os_strchr(pos, ':');
if (!sep)
goto fail;
*sep++ = '\0';
nlen = os_strlen(sep);
if (nlen > 254)
goto fail;
... | parse_venue_url | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int parse_wpabuf_hex(int line, const char *name, wpabuf **buf,
const char *val) {
wpabuf *elems;
if (*val) {
elems = wpabuf_parse_bin(val);
if (elems) {
wpabuf_free(*buf);
*buf = elems;
return 0;
} else {
wpa_printf(5, "Line %d: Invalid %s '%s'", line, name,... | static int parse_wpabuf_hex(int line, const char *name, struct wpabuf **buf,
const char *val) {
struct wpabuf *elems;
if (val[0] == '\0') {
wpabuf_free(*buf);
*buf = NULL;
return 0;
}
elems = wpabuf_parse_bin(val);
if (!elems) {
wpa_printf(MSG_ERROR, "Line %d: Inv... | parse_wpabuf_hex | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const char *pbc_status_str(pbc_status status) {
if (status == pbc_status_WPS_PBC_STATUS_OVERLAP)
return "Overlap";
if ((unsigned int)status > pbc_status_WPS_PBC_STATUS_OVERLAP)
return "Unknown";
if (status == pbc_status_WPS_PBC_STATUS_TIMEOUT)
return "Timed-out";
if (status)
return "Active";
r... | static const char *pbc_status_str(enum pbc_status status) {
switch (status) {
case WPS_PBC_STATUS_DISABLE:
return "Disabled";
case WPS_PBC_STATUS_ACTIVE:
return "Active";
case WPS_PBC_STATUS_TIMEOUT:
return "Timed-out";
case WPS_PBC_STATUS_OVERLAP:
return "Overlap";
default:
return "Unkn... | pbc_status_str | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int peap_prfplus(int version, const u8 *key, size_t key_len, const char *label,
const u8 *seed, size_t seed_len, u8 *buf, size_t buf_len) {
u8 *v9;
long v10;
unsigned char counter;
size_t pos;
size_t label_len;
size_t plen;
const unsigned char *addr[5];
size_t len[5];
u8 extra[2];
u... | int peap_prfplus(int version, const u8 *key, size_t key_len, const char *label,
const u8 *seed, size_t seed_len, u8 *buf, size_t buf_len) {
unsigned char counter = 0;
size_t pos, plen;
u8 hash[SHA1_MAC_LEN];
size_t label_len = os_strlen(label);
u8 extra[2];
const unsigned char *addr[5];
s... | peap_prfplus | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int phy_info_band(phy_info_arg *phy_info, nlattr *nl_band) {
unsigned int v3;
long v4;
int rem_band;
int ret;
hostapd_hw_modes *mode;
nlattr *nl_iftype;
nlattr *tb_band[12];
unsigned long v10;
v10 = __readfsqword(0x28u);
if (phy_info->last_mode == nl_band->nla_type) {
mode = &phy_info->modes[*p... | static int phy_info_band(struct phy_info_arg *phy_info,
struct nlattr *nl_band) {
struct nlattr *tb_band[NL80211_BAND_ATTR_MAX + 1];
struct hostapd_hw_modes *mode;
int ret;
if (phy_info->last_mode != nl_band->nla_type) {
mode = os_realloc_array(phy_info->modes, *phy_info->num_modes... | phy_info_band | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int phy_info_edmg_capa(hostapd_hw_modes *mode, nlattr *bw_config,
nlattr *channels) {
if (!bw_config || !channels)
return 0;
mode->edmg.bw_config = (unsigned char)nla_get_u8(bw_config);
mode->edmg.channels = nla_get_u8(channels);
if (mode->edmg.channels && mode->edmg.bw_config)
re... | static int phy_info_edmg_capa(struct hostapd_hw_modes *mode,
struct nlattr *bw_config,
struct nlattr *channels) {
if (!bw_config || !channels)
return NL_OK;
mode->edmg.bw_config = nla_get_u8(bw_config);
mode->edmg.channels = nla_get_u8(channels);
... | phy_info_edmg_capa | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void phy_info_freq(hostapd_hw_modes *mode, hostapd_channel_data *chan,
nlattr **tb_freq) {
int flag;
int v4;
unsigned short u16;
unsigned short v6;
unsigned char u8;
unsigned short v8;
u8 channel;
int rem_wmm;
int count;
nl80211_dfs_state state;
int ac;
nlattr *nl_wmm;
nlatt... | static void phy_info_freq(struct hostapd_hw_modes *mode,
struct hostapd_channel_data *chan,
struct nlattr *tb_freq[]) {
u8 channel;
os_memset(chan, 0, sizeof(*chan));
chan->freq = nla_get_u32(tb_freq[NL80211_FREQUENCY_ATTR_FREQ]);
chan->flag = 0;
chan->allo... | phy_info_freq | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int phy_info_freqs(phy_info_arg *phy_info, hostapd_hw_modes *mode, nlattr *tb) {
unsigned int v4;
long v5;
unsigned int v6;
long v7;
int rem_freq;
int new_channels;
int idx;
nlattr *nl_freq;
hostapd_channel_data *channel;
nlattr *tb_freq[26];
unsigned long v15;
v15 = __readfsqword(0x28u);
new... | static int phy_info_freqs(struct phy_info_arg *phy_info,
struct hostapd_hw_modes *mode, struct nlattr *tb) {
static struct nla_policy freq_policy[NL80211_FREQUENCY_ATTR_MAX + 1] = {
[NL80211_FREQUENCY_ATTR_FREQ] = {.type = NLA_U32},
[NL80211_FREQUENCY_ATTR_DISABLED] = {.type = NL... | phy_info_freqs | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int phy_info_handler(nl_msg *msg, void *arg) {
long v2;
unsigned int v3;
long v4;
int rem_band;
int res;
nlattr *nl_band;
genlmsghdr *gnlh;
phy_info_arg *phy_info;
nlattr *tb_msg[302];
unsigned long v12;
v12 = __readfsqword(0x28u);
v2 = nlmsg_hdr(msg);
gnlh = (genlmsghdr *)nlmsg_data(v2);
p... | static int phy_info_handler(struct nl_msg *msg, void *arg) {
struct nlattr *tb_msg[NL80211_ATTR_MAX + 1];
struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg));
struct phy_info_arg *phy_info = arg;
struct nlattr *nl_band;
int rem_band;
nla_parse(tb_msg, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0),
... | phy_info_handler | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void phy_info_ht_capa(hostapd_hw_modes *mode, nlattr *capa,
nlattr *ampdu_factor, nlattr *ampdu_density,
nlattr *mcs_set) {
long v5;
u8 *mcs;
if (capa)
mode->ht_capab = nla_get_u16(capa);
if (ampdu_factor)
mode->a_mpdu_params |= nla_get_u8(ampdu_factor) & 3;
... | static void phy_info_ht_capa(struct hostapd_hw_modes *mode, struct nlattr *capa,
struct nlattr *ampdu_factor,
struct nlattr *ampdu_density,
struct nlattr *mcs_set) {
if (capa)
mode->ht_capab = nla_get_u16(capa);
if (ampdu_fa... | phy_info_ht_capa | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int phy_info_iftype(hostapd_hw_modes *mode, nlattr *nl_iftype) {
unsigned int v2;
long v3;
ieee80211_op_mode i;
nlattr *tb[7];
nlattr *tb_flags[13];
unsigned long v8;
v8 = __readfsqword(0x28u);
v2 = nla_len(nl_iftype);
v3 = nla_data(nl_iftype);
nla_parse(tb, 6, v3, v2, 0);
if (!tb[1])
return ... | static int phy_info_iftype(struct hostapd_hw_modes *mode,
struct nlattr *nl_iftype) {
struct nlattr *tb[NL80211_BAND_IFTYPE_ATTR_MAX + 1];
struct nlattr *tb_flags[NL80211_IFTYPE_MAX + 1];
unsigned int i;
nla_parse(tb, NL80211_BAND_IFTYPE_ATTR_MAX, nla_data(nl_iftype),
nla... | phy_info_iftype | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void phy_info_iftype_copy(he_capabilities *he_capab, ieee80211_op_mode opmode,
nlattr **tb, nlattr **tb_flags) {
const void *v4;
const void *v5;
const void *v6;
const void *v7;
nl80211_iftype iftype;
size_t len;
size_t lena;
size_t lenb;
size_t lenc;
if (opmode == ieee8021... | static void phy_info_iftype_copy(struct he_capabilities *he_capab,
enum ieee80211_op_mode opmode,
struct nlattr **tb, struct nlattr **tb_flags) {
enum nl80211_iftype iftype;
size_t len;
switch (opmode) {
case IEEE80211_MODE_INFRA:
iftype = N... | phy_info_iftype_copy | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int phy_info_rates(hostapd_hw_modes *mode, nlattr *tb) {
unsigned int v3;
long v4;
unsigned int v5;
long v6;
int u32;
int rem_rate;
int idx;
nlattr *nl_rate;
nlattr *tb_rate[3];
unsigned long v12;
v12 = __readfsqword(0x28u);
if (!tb)
return 0;
nl_rate = (nlattr *)nla_data(tb);
for (rem_... | static int phy_info_rates(struct hostapd_hw_modes *mode, struct nlattr *tb) {
static struct nla_policy rate_policy[NL80211_BITRATE_ATTR_MAX + 1] = {
[NL80211_BITRATE_ATTR_RATE] = {.type = NLA_U32},
[NL80211_BITRATE_ATTR_2GHZ_SHORTPREAMBLE] = {.type = NLA_FLAG},
};
struct nlattr *tb_rate[NL80211_BITRAT... | phy_info_rates | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void phy_info_vht_capa(hostapd_hw_modes *mode, nlattr *capa, nlattr *mcs_set) {
if (capa)
mode->vht_capab = nla_get_u32(capa);
if (mcs_set) {
if ((int)nla_len(mcs_set) > 7)
*(_QWORD *)mode->vht_mcs_set = *(_QWORD *)nla_data(mcs_set);
}
} | static void phy_info_vht_capa(struct hostapd_hw_modes *mode,
struct nlattr *capa, struct nlattr *mcs_set) {
if (capa)
mode->vht_capab = nla_get_u32(capa);
if (mcs_set && nla_len(mcs_set) >= 8) {
u8 *mcs;
mcs = nla_data(mcs_set);
os_memcpy(mode->vht_mcs_set, mcs, 8);
... | phy_info_vht_capa | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int pmf_in_use(hostapd_data *hapd, const u8 *addr) {
sta_info *sta;
sta = ap_get_sta(hapd, addr);
return sta && (sta->flags & 0x400) != 0;
} | static int pmf_in_use(struct hostapd_data *hapd, const u8 *addr) {
struct sta_info *sta;
sta = ap_get_sta(hapd, addr);
return sta && (sta->flags & WLAN_STA_MFP);
} | pmf_in_use | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
rsn_pmksa_cache_entry *
pmksa_cache_add_okc(rsn_pmksa_cache *pmksa,
const rsn_pmksa_cache_entry *old_entry, const u8 *aa,
const u8 *pmkid) {
long v5;
vlan_description *vlan_desc;
vlan_description *v7;
long v8;
long v9;
long v10;
long v11;
long v12;
long v13;
l... | struct rsn_pmksa_cache_entry *
pmksa_cache_add_okc(struct rsn_pmksa_cache *pmksa,
const struct rsn_pmksa_cache_entry *old_entry, const u8 *aa,
const u8 *pmkid) {
struct rsn_pmksa_cache_entry *entry;
entry = os_zalloc(sizeof(*entry));
if (entry == NULL)
return NULL;
o... | pmksa_cache_add_okc | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
rsn_pmksa_cache_entry *
pmksa_cache_auth_add(rsn_pmksa_cache *pmksa, const u8 *pmk, size_t pmk_len,
const u8 *pmkid, const u8 *kck, size_t kck_len,
const u8 *aa, const u8 *spa, int session_timeout,
eapol_state_machine *eapol, int akmp) {
rsn_pmksa_cache_e... | struct rsn_pmksa_cache_entry *pmksa_cache_auth_add(
struct rsn_pmksa_cache *pmksa, const u8 *pmk, size_t pmk_len,
const u8 *pmkid, const u8 *kck, size_t kck_len, const u8 *aa, const u8 *spa,
int session_timeout, struct eapol_state_machine *eapol, int akmp) {
struct rsn_pmksa_cache_entry *entry;
entry =... | pmksa_cache_auth_add | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int pmksa_cache_auth_add_entry(rsn_pmksa_cache *pmksa,
rsn_pmksa_cache_entry *entry) {
rsn_pmksa_cache_entry *pos;
if (!entry)
return -1;
pos = pmksa_cache_auth_get(pmksa, entry->spa, 0);
if (pos)
pmksa_cache_free_entry(pmksa, pos);
if (pmksa->pmksa_count >= 1024) {
... | int pmksa_cache_auth_add_entry(struct rsn_pmksa_cache *pmksa,
struct rsn_pmksa_cache_entry *entry) {
struct rsn_pmksa_cache_entry *pos;
if (entry == NULL)
return -1;
pos = pmksa_cache_auth_get(pmksa, entry->spa, NULL);
if (pos)
pmksa_cache_free_entry(pmksa, pos);
if (... | pmksa_cache_auth_add_entry | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
rsn_pmksa_cache_entry *
pmksa_cache_auth_create_entry(const u8 *pmk, size_t pmk_len, const u8 *pmkid,
const u8 *kck, size_t kck_len, const u8 *aa,
const u8 *spa, int session_timeout,
eapol_state_machine *eapol, int akmp) {
long ... | struct rsn_pmksa_cache_entry *
pmksa_cache_auth_create_entry(const u8 *pmk, size_t pmk_len, const u8 *pmkid,
const u8 *kck, size_t kck_len, const u8 *aa,
const u8 *spa, int session_timeout,
struct eapol_state_machine *eapol, int a... | pmksa_cache_auth_create_entry | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void pmksa_cache_auth_deinit(rsn_pmksa_cache *pmksa) {
int i;
rsn_pmksa_cache_entry *entry;
rsn_pmksa_cache_entry *prev;
if (pmksa) {
entry = pmksa->pmksa;
while (entry) {
prev = entry;
entry = entry->next;
pmksa_cache_free_entry(prev);
}
eloop_cancel_timeout((eloop_timeout_ha... | void pmksa_cache_auth_deinit(struct rsn_pmksa_cache *pmksa) {
struct rsn_pmksa_cache_entry *entry, *prev;
int i;
if (pmksa == NULL)
return;
entry = pmksa->pmksa;
while (entry) {
prev = entry;
entry = entry->next;
_pmksa_cache_free_entry(prev);
}
eloop_cancel_timeout(pmksa_cache_expire, p... | pmksa_cache_auth_deinit | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void pmksa_cache_auth_flush(rsn_pmksa_cache *pmksa) {
while (pmksa->pmksa) {
wpa_printf(
2, "RSN: Flush PMKSA cache entry for %02x:%02x:%02x:%02x:%02x:%02x",
pmksa->pmksa->spa[0], pmksa->pmksa->spa[1], pmksa->pmksa->spa[2],
pmksa->pmksa->spa[3], pmksa->pmksa->spa[4], pmksa->pmksa->spa[5]);... | void pmksa_cache_auth_flush(struct rsn_pmksa_cache *pmksa) {
while (pmksa->pmksa) {
wpa_printf(MSG_DEBUG, "RSN: Flush PMKSA cache entry for " MACSTR,
MAC2STR(pmksa->pmksa->spa));
pmksa_cache_free_entry(pmksa, pmksa->pmksa);
}
} | pmksa_cache_auth_flush | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
rsn_pmksa_cache_entry *pmksa_cache_auth_get(rsn_pmksa_cache *pmksa,
const u8 *spa, const u8 *pmkid) {
rsn_pmksa_cache_entry *entry;
rsn_pmksa_cache_entry *entrya;
if (pmkid) {
for (entry = pmksa->pmkid[*pmkid & 0x7F]; entry; entry = entry->hnext) {
if ((!spa ... | struct rsn_pmksa_cache_entry *
pmksa_cache_auth_get(struct rsn_pmksa_cache *pmksa, const u8 *spa,
const u8 *pmkid) {
struct rsn_pmksa_cache_entry *entry;
if (pmkid) {
for (entry = pmksa->pmkid[PMKID_HASH(pmkid)]; entry; entry = entry->hnext) {
if ((spa == NULL || os_memcmp(entry->spa... | pmksa_cache_auth_get | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
rsn_pmksa_cache *pmksa_cache_auth_init(void (*free_cb)(rsn_pmksa_cache_entry *,
void *),
void *ctx) {
rsn_pmksa_cache *pmksa;
pmksa = (rsn_pmksa_cache *)os_zalloc(0x420u);
if (pmksa) {
pmksa->free_cb = free_cb;
... | struct rsn_pmksa_cache *pmksa_cache_auth_init(
void (*free_cb)(struct rsn_pmksa_cache_entry *entry, void *ctx),
void *ctx) {
struct rsn_pmksa_cache *pmksa;
pmksa = os_zalloc(sizeof(*pmksa));
if (pmksa) {
pmksa->free_cb = free_cb;
pmksa->ctx = ctx;
}
return pmksa;
} | pmksa_cache_auth_init | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int pmksa_cache_auth_list(rsn_pmksa_cache *pmksa, char *buf, size_t len) {
int ret;
int reta;
int retb;
char *pos;
char *posa;
rsn_pmksa_cache_entry *entry;
os_reltime now;
unsigned long v12;
v12 = __readfsqword(0x28u);
os_get_reltime(&now);
ret = snprintf(
buf, len,
"Index / SPA / PM... | int pmksa_cache_auth_list(struct rsn_pmksa_cache *pmksa, char *buf,
size_t len) {
int i, ret;
char *pos = buf;
struct rsn_pmksa_cache_entry *entry;
struct os_reltime now;
os_get_reltime(&now);
ret = os_snprintf(
pos, buf + len - pos,
"Index / SPA / PMKID / expiration (... | pmksa_cache_auth_list | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int pmksa_cache_auth_radius_das_disconnect(rsn_pmksa_cache *pmksa,
radius_das_attrs *attr) {
int found;
rsn_pmksa_cache_entry *entry;
rsn_pmksa_cache_entry *prev;
found = 0;
if (attr->acct_session_id)
return -1;
entry = pmksa->pmksa;
while (entry) {
if (... | int pmksa_cache_auth_radius_das_disconnect(struct rsn_pmksa_cache *pmksa,
struct radius_das_attrs *attr) {
int found = 0;
struct rsn_pmksa_cache_entry *entry, *prev;
if (attr->acct_session_id)
return -1;
entry = pmksa->pmksa;
while (entry) {
if (das_attr_ma... | pmksa_cache_auth_radius_das_disconnect | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void pmksa_cache_expire(void *eloop_ctx, void *timeout_ctx) {
os_reltime now;
unsigned long v3;
v3 = __readfsqword(0x28u);
os_get_reltime(&now);
while (*((_QWORD *)eloop_ctx + 128) &&
*(_QWORD *)(*((_QWORD *)eloop_ctx + 128) + 104LL) <= now.sec) {
wpa_printf(
2, "RSN: expired PMKSA cache... | static void pmksa_cache_expire(void *eloop_ctx, void *timeout_ctx) {
struct rsn_pmksa_cache *pmksa = eloop_ctx;
struct os_reltime now;
os_get_reltime(&now);
while (pmksa->pmksa && pmksa->pmksa->expiration <= now.sec) {
wpa_printf(MSG_DEBUG, "RSN: expired PMKSA cache entry for " MACSTR,
MAC2S... | pmksa_cache_expire | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void pmksa_cache_from_eapol_data(rsn_pmksa_cache_entry *entry,
eapol_state_machine *eapol) {
vlan_description *v2;
long v3;
long v4;
long v5;
long v6;
long v7;
long v8;
long v9;
long v10;
vlan_description *vlan_desc;
if (eapol) {
if (eapol->identity) {
e... | static void pmksa_cache_from_eapol_data(struct rsn_pmksa_cache_entry *entry,
struct eapol_state_machine *eapol) {
struct vlan_description *vlan_desc;
if (eapol == NULL)
return;
if (eapol->identity) {
entry->identity = os_malloc(eapol->identity_len);
if (entry-... | pmksa_cache_from_eapol_data | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
rsn_pmksa_cache_entry *pmksa_cache_get_okc(rsn_pmksa_cache *pmksa, const u8 *aa,
const u8 *spa, const u8 *pmkid) {
rsn_pmksa_cache_entry *entry;
u8 new_pmkid[24];
unsigned long v9;
v9 = __readfsqword(0x28u);
for (entry = pmksa->pmksa; entry; entry = entry->next) {
... | struct rsn_pmksa_cache_entry *pmksa_cache_get_okc(struct rsn_pmksa_cache *pmksa,
const u8 *aa, const u8 *spa,
const u8 *pmkid) {
struct rsn_pmksa_cache_entry *entry;
u8 new_pmkid[PMKID_LEN];
for (entry = pmksa->pm... | pmksa_cache_get_okc | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void pmksa_cache_link_entry(rsn_pmksa_cache *pmksa,
rsn_pmksa_cache_entry *entry) {
int hash;
rsn_pmksa_cache_entry *pos;
rsn_pmksa_cache_entry *prev;
pos = pmksa->pmksa;
prev = 0;
while (pos && pos->expiration <= entry->expiration) {
prev = pos;
pos = pos->next;
}
i... | static void pmksa_cache_link_entry(struct rsn_pmksa_cache *pmksa,
struct rsn_pmksa_cache_entry *entry) {
struct rsn_pmksa_cache_entry *pos, *prev;
int hash;
pos = pmksa->pmksa;
prev = NULL;
while (pos) {
if (pos->expiration > entry->expiration)
break;
prev = p... | pmksa_cache_link_entry | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void pmksa_cache_set_expiration(rsn_pmksa_cache *pmksa) {
int sec;
os_reltime now;
unsigned long v3;
v3 = __readfsqword(0x28u);
eloop_cancel_timeout((eloop_timeout_handler)pmksa_cache_expire, pmksa, 0);
if (pmksa->pmksa) {
os_get_reltime(&now);
sec = pmksa->pmksa->expiration - LODWORD(now.sec);
... | static void pmksa_cache_set_expiration(struct rsn_pmksa_cache *pmksa) {
int sec;
struct os_reltime now;
eloop_cancel_timeout(pmksa_cache_expire, pmksa, NULL);
if (pmksa->pmksa == NULL)
return;
os_get_reltime(&now);
sec = pmksa->pmksa->expiration - now.sec;
if (sec < 0)
sec = 0;
eloop_register_t... | pmksa_cache_set_expiration | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void pmksa_cache_to_eapol_data(hostapd_data *hapd, rsn_pmksa_cache_entry *entry,
eapol_state_machine *eapol) {
if (entry && eapol) {
if (entry->identity) {
free(eapol->identity);
eapol->identity = (u8 *)malloc(entry->identity_len);
if (eapol->identity) {
ea... | void pmksa_cache_to_eapol_data(struct hostapd_data *hapd,
struct rsn_pmksa_cache_entry *entry,
struct eapol_state_machine *eapol) {
if (entry == NULL || eapol == NULL)
return;
if (entry->identity) {
os_free(eapol->identity);
eapol->identity ... | pmksa_cache_to_eapol_data | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const char *port_state_txt(PortState ps) {
if (ps == Authorized)
return "Authorized";
if (ps == Unauthorized)
return "Unauthorized";
return "Unknown";
} | static inline const char *port_state_txt(PortState ps) {
switch (ps) {
case Unauthorized:
return "Unauthorized";
case Authorized:
return "Authorized";
default:
return "Unknown";
}
} | port_state_txt | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const char *port_type_txt(PortTypes pt) {
if (pt == ForceAuthorized)
return "ForceAuthorized";
if ((unsigned int)pt > ForceAuthorized)
return "Unknown";
if (pt == ForceUnauthorized)
return "ForceUnauthorized";
if (pt == Auto)
return "Auto";
else
return "Unknown";
} | static inline const char *port_type_txt(PortTypes pt) {
switch (pt) {
case ForceUnauthorized:
return "ForceUnauthorized";
case ForceAuthorized:
return "ForceAuthorized";
case Auto:
return "Auto";
default:
return "Unknown";
}
} | port_type_txt | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void prf_prime(const u8 *k, const char *seed1, const u8 *seed2,
size_t seed2_len, const u8 *seed3, size_t seed3_len, u8 *res,
size_t res_len) {
size_t v8;
u8 iter;
size_t hlen;
const u8 *addr[5];
size_t len[6];
u8 hash[40];
unsigned long v19;
v19 = __readfsqword(0x28u);
... | static void prf_prime(const u8 *k, const char *seed1, const u8 *seed2,
size_t seed2_len, const u8 *seed3, size_t seed3_len,
u8 *res, size_t res_len) {
const u8 *addr[5];
size_t len[5];
u8 hash[SHA256_MAC_LEN];
u8 iter;
addr[0] = hash;
len[0] = 0;
addr[1] = (con... | prf_prime | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int print_band(unsigned int num, fst_iface *iface, const u8 *addr, char *buf,
size_t buflen) {
mb_band_id v5;
const char *v6;
int v7;
const char *name_3;
int v9;
int v10;
size_t v11;
const u8 *v12;
int v13;
int v14;
const char *group_id;
int v16;
u8 priority_0;
int v18;
u32 ... | static int print_band(unsigned num, struct fst_iface *iface, const u8 *addr,
char *buf, size_t buflen) {
const struct wpabuf *wpabuf;
enum hostapd_hw_mode hw_mode;
u8 channel;
int ret = 0;
fst_iface_get_channel_info(iface, &hw_mode, &channel);
ret += os_snprintf(buf + ret, buflen - r... | print_band | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
unsigned int probe_resp_offload_support(int supp_protocols) {
unsigned int prot;
prot = (supp_protocols & 1) != 0;
if ((supp_protocols & 2) != 0)
prot |= 2u;
if ((supp_protocols & 4) != 0)
prot |= 4u;
if ((supp_protocols & 8) != 0)
prot |= 8u;
return prot;
} | static unsigned int probe_resp_offload_support(int supp_protocols) {
unsigned int prot = 0;
if (supp_protocols & NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS)
prot |= WPA_DRIVER_PROBE_RESP_OFFLOAD_WPS;
if (supp_protocols & NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS2)
prot |= WPA_DRIVER_PROBE_RESP_OFFLOAD_WPS2;
i... | probe_resp_offload_support | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int process_beacon_event(nl_msg *msg, void *arg) {
long v2;
unsigned int v3;
long v4;
wpa_driver_nl80211_data *drv;
genlmsghdr *gnlh;
wpa_event_data event;
nlattr *tb[302];
unsigned long v10;
v10 = __readfsqword(0x28u);
v2 = nlmsg_hdr(msg);
gnlh = (genlmsghdr *)nlmsg_data(v2);
v3 = genlmsg_attr... | static int process_beacon_event(struct nl_msg *msg, void *arg) {
struct nl80211_wiphy_data *w = arg;
struct wpa_driver_nl80211_data *drv;
struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg));
struct nlattr *tb[NL80211_ATTR_MAX + 1];
union wpa_event_data event;
nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrda... | process_beacon_event | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int process_bss_event(nl_msg *msg, void *arg) {
long v2;
unsigned int v3;
long v4;
const char *v5;
int cmd;
genlmsghdr *gnlh;
nlattr *tb[302];
unsigned long v10;
v10 = __readfsqword(0x28u);
v2 = nlmsg_hdr(msg);
gnlh = (genlmsghdr *)nlmsg_data(v2);
v3 = genlmsg_attrlen(gnlh, 0);
v4 = genlmsg_a... | int process_bss_event(struct nl_msg *msg, void *arg) {
struct i802_bss *bss = arg;
struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg));
struct nlattr *tb[NL80211_ATTR_MAX + 1];
nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0),
genlmsg_attrlen(gnlh, 0), NULL);
wpa_printf(MSG_DEBUG, "nl8... | process_bss_event | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int process_global_event(nl_msg *msg, void *arg) {
long v2;
unsigned int v3;
long v4;
const char *v6;
int ifidx;
int wiphy_idx;
int wiphy_idx_rx;
int wdev_id_set;
int wiphy_idx_set;
wpa_driver_nl80211_data *drv;
wpa_driver_nl80211_data *tmp;
i802_bss *bss;
u64 wdev_id;
genlmsghdr *gnlh;
nl... | int process_global_event(struct nl_msg *msg, void *arg) {
struct nl80211_global *global = arg;
struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg));
struct nlattr *tb[NL80211_ATTR_MAX + 1];
struct wpa_driver_nl80211_data *drv, *tmp;
int ifidx = -1, wiphy_idx = -1, wiphy_idx_rx = -1;
struct i802_bss *bss;
... | process_global_event | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int protocol_feature_handler(nl_msg *msg, void *arg) {
long v2;
unsigned int v3;
long v4;
genlmsghdr *gnlh;
nlattr *tb_msg[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);
... | static int protocol_feature_handler(struct nl_msg *msg, void *arg) {
u32 *feat = arg;
struct nlattr *tb_msg[NL80211_ATTR_MAX + 1];
struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg));
nla_parse(tb_msg, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0),
genlmsg_attrlen(gnlh, 0), NULL);
if (tb_msg[NL80... | protocol_feature_handler | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int prune_associations(hostapd_iface *iface, void *ctx) {
size_t j;
hostapd_data *ohapd;
sta_info *osta;
for (j = 0; j < iface->num_bss; ++j) {
ohapd = iface->bss[j];
if (ohapd != *(hostapd_data **)ctx &&
(!ohapd->iface->fst || !*(_QWORD *)(**(_QWORD **)ctx + 80LL) ||
!fst_are_ifaces_a... | static int prune_associations(struct hostapd_iface *iface, void *ctx) {
struct prune_data *data = ctx;
struct sta_info *osta;
struct hostapd_data *ohapd;
size_t j;
for (j = 0; j < iface->num_bss; j++) {
ohapd = iface->bss[j];
if (ohapd == data->hapd)
continue;
#ifdef CONFIG_TESTING_OPTIONS
... | prune_associations | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void qca_vendor_test(wpa_driver_nl80211_data *drv) { ; } | static void qca_vendor_test(struct wpa_driver_nl80211_data *drv) {
#ifdef CONFIG_TESTING_OPTIONS
struct nl_msg *msg;
struct nlattr *params;
int ret;
if (!(msg = nl80211_drv_msg(drv, 0, NL80211_CMD_VENDOR)) ||
nla_put_u32(msg, NL80211_ATTR_VENDOR_ID, OUI_QCA) ||
nla_put_u32(msg, NL80211_ATTR_VENDOR_... | qca_vendor_test | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int radius_change_server(radius_client_data *radius,
hostapd_radius_server *nserv,
hostapd_radius_server *oserv, int sock, int sock6,
int auth) {
int port;
const char *v7;
const char *v8;
long v9;
int *v11;
char *v12;
socklen_t v13... | static int radius_change_server(struct radius_client_data *radius,
struct hostapd_radius_server *nserv,
struct hostapd_radius_server *oserv, int sock,
int sock6, int auth) {
struct sockaddr_in serv, claddr;
#ifdef CONFIG_I... | radius_change_server | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void radius_client_acct_failover(radius_client_data *radius) {
int port;
const char *v2;
hostapd_radius_server *next;
radius_msg_list *entry;
hostapd_radius_servers *conf;
hostapd_radius_server *old;
char abuf[56];
unsigned long v8;
v8 = __readfsqword(0x28u);
conf = radius->conf;
old = conf->acct... | static void radius_client_acct_failover(struct radius_client_data *radius) {
struct hostapd_radius_servers *conf = radius->conf;
struct hostapd_radius_server *next, *old;
struct radius_msg_list *entry;
char abuf[50];
old = conf->acct_server;
hostapd_logger(radius->ctx, NULL, HOSTAPD_MODULE_RADIUS, HOSTAPD_... | radius_client_acct_failover | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void radius_client_auth_failover(radius_client_data *radius) {
int port;
const char *v2;
hostapd_radius_server *next;
radius_msg_list *entry;
hostapd_radius_servers *conf;
hostapd_radius_server *old;
char abuf[56];
unsigned long v8;
v8 = __readfsqword(0x28u);
conf = radius->conf;
old = conf->auth... | static void radius_client_auth_failover(struct radius_client_data *radius) {
struct hostapd_radius_servers *conf = radius->conf;
struct hostapd_radius_server *next, *old;
struct radius_msg_list *entry;
char abuf[50];
old = conf->auth_server;
hostapd_logger(radius->ctx, NULL, HOSTAPD_MODULE_RADIUS, HOSTAPD_... | radius_client_auth_failover | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void radius_client_deinit(radius_client_data *radius) {
if (radius) {
radius_close_auth_sockets(radius);
radius_close_acct_sockets(radius);
eloop_cancel_timeout((eloop_timeout_handler)radius_retry_primary_timer,
radius, 0);
radius_client_flush(radius, 0);
free(radius->auth... | void radius_client_deinit(struct radius_client_data *radius) {
if (!radius)
return;
radius_close_auth_sockets(radius);
radius_close_acct_sockets(radius);
eloop_cancel_timeout(radius_retry_primary_timer, radius, NULL);
radius_client_flush(radius, 0);
os_free(radius->auth_handlers);
os_free(radius->a... | radius_client_deinit | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int radius_client_disable_pmtu_discovery(int s) {
int *v1;
char *v2;
int action;
int r;
unsigned long v6;
v6 = __readfsqword(0x28u);
r = -1;
action = 0;
r = setsockopt(s, 0, 10, &action, 4u);
if (r == -1) {
v1 = __errno_location();
v2 = strerror(*v1);
wpa_printf(5, "RADIUS: Failed to se... | static int radius_client_disable_pmtu_discovery(int s) {
int r = -1;
#if defined(IP_MTU_DISCOVER) && defined(IP_PMTUDISC_DONT)
int action = IP_PMTUDISC_DONT;
r = setsockopt(s, IPPROTO_IP, IP_MTU_DISCOVER, &action, sizeof(action));
if (r == -1)
wpa_printf(MSG_ERROR, "RADIUS: Failed to set IP_MTU_DISCOVER: %... | radius_client_disable_pmtu_discovery | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int radius_client_dump_acct_server(char *buf, size_t buflen,
hostapd_radius_server *serv,
radius_client_data *cli) {
u32 malformed_responses;
u32 responses;
u32 retransmissions;
u32 requests;
int round_trip_time;
const char *v9;
int por... | static int radius_client_dump_acct_server(char *buf, size_t buflen,
struct hostapd_radius_server *serv,
struct radius_client_data *cli) {
int pending = 0;
struct radius_msg_list *msg;
char abuf[50];
if (cli) {
for (msg = cl... | radius_client_dump_acct_server | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int radius_client_dump_auth_server(char *buf, size_t buflen,
hostapd_radius_server *serv,
radius_client_data *cli) {
u32 packets_dropped;
u32 access_accepts;
u32 retransmissions;
u32 requests;
int round_trip_time;
const char *v9;
int po... | static int radius_client_dump_auth_server(char *buf, size_t buflen,
struct hostapd_radius_server *serv,
struct radius_client_data *cli) {
int pending = 0;
struct radius_msg_list *msg;
char abuf[50];
if (cli) {
for (msg = cl... | radius_client_dump_auth_server | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void radius_client_flush(radius_client_data *radius, int only_auth) {
radius_msg_list *entry;
radius_msg_list *prev;
radius_msg_list *tmp;
if (radius) {
prev = 0;
entry = radius->msgs;
while (entry) {
if (only_auth && entry->msg_type) {
prev = entry;
entry = entry->next;
... | void radius_client_flush(struct radius_client_data *radius, int only_auth) {
struct radius_msg_list *entry, *prev, *tmp;
if (!radius)
return;
prev = NULL;
entry = radius->msgs;
while (entry) {
if (!only_auth || entry->msg_type == RADIUS_AUTH) {
if (prev)
prev->next = entry->next;
... | radius_client_flush | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void radius_client_flush_auth(radius_client_data *radius, const u8 *addr) {
radius_msg_list *entry;
radius_msg_list *prev;
radius_msg_list *tmp;
prev = 0;
entry = radius->msgs;
while (entry) {
if (entry->msg_type || memcmp(entry, addr, 6u)) {
prev = entry;
entry = entry->next;
} else {
... | void radius_client_flush_auth(struct radius_client_data *radius,
const u8 *addr) {
struct radius_msg_list *entry, *prev, *tmp;
prev = NULL;
entry = radius->msgs;
while (entry) {
if (entry->msg_type == RADIUS_AUTH &&
os_memcmp(entry->addr, addr, ETH_ALEN) == 0) {
... | radius_client_flush_auth | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
u8 radius_client_get_id(radius_client_data *radius) {
u8 next_radius_identifier;
u8 id;
radius_msg_list *entry;
radius_msg_list *prev;
radius_msg_list *_remove;
next_radius_identifier = radius->next_radius_identifier;
radius->next_radius_identifier = next_radius_identifier + 1;
id = next_radius_identif... | u8 radius_client_get_id(struct radius_client_data *radius) {
struct radius_msg_list *entry, *prev, *_remove;
u8 id = radius->next_radius_identifier++;
entry = radius->msgs;
prev = NULL;
while (entry) {
if (radius_msg_get_hdr(entry->msg)->identifier == id) {
hostapd_logger(radius->ctx, entry->addr, ... | radius_client_get_id | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int radius_client_get_mib(radius_client_data *radius, char *buf,
size_t buflen) {
radius_client_data *v4;
radius_client_data *v5;
int i;
int ia;
int count;
hostapd_radius_servers *conf;
hostapd_radius_server *serv;
hostapd_radius_server *serva;
count = 0;
if (!radius)
... | int radius_client_get_mib(struct radius_client_data *radius, char *buf,
size_t buflen) {
struct hostapd_radius_servers *conf;
int i;
struct hostapd_radius_server *serv;
int count = 0;
if (!radius)
return 0;
conf = radius->conf;
if (conf->auth_servers) {
for (i = 0; i <... | radius_client_get_mib | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int radius_client_handle_send_error(radius_client_data *radius, int s,
RadiusType msg_type) {
int *v3;
char *v4;
int _errno;
_errno = *__errno_location();
v3 = __errno_location();
v4 = strerror(*v3);
wpa_printf(3, "send[RADIUS,s=%d]: %s", s, v4);
if (_errno != 107 &&... | static int radius_client_handle_send_error(struct radius_client_data *radius,
int s, RadiusType msg_type) {
#ifndef CONFIG_NATIVE_WINDOWS
int _errno = errno;
wpa_printf(MSG_INFO, "send[RADIUS,s=%d]: %s", s, strerror(errno));
if (_errno == ENOTCONN || _errno == EDESTADDRR... | radius_client_handle_send_error | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
radius_client_data *radius_client_init(void *ctx,
hostapd_radius_servers *conf) {
radius_client_data *radius;
radius = (radius_client_data *)os_zalloc(0x70u);
if (!radius)
return 0;
radius->ctx = ctx;
radius->conf = conf;
radius->acct_sock = -1;
radius->auth_soc... | struct radius_client_data *
radius_client_init(void *ctx, struct hostapd_radius_servers *conf) {
struct radius_client_data *radius;
radius = os_zalloc(sizeof(struct radius_client_data));
if (radius == NULL)
return NULL;
radius->ctx = ctx;
radius->conf = conf;
radius->auth_serv_sock = radius->acct_serv... | radius_client_init | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int radius_client_init_acct(radius_client_data *radius) {
int *v1;
char *v2;
int *v3;
char *v4;
int ok;
hostapd_radius_servers *conf;
conf = radius->conf;
ok = 0;
radius_close_acct_sockets(radius);
radius->acct_serv_sock = socket(2, 2, 0);
if (radius->acct_serv_sock >= 0) {
radius_client_disa... | static int radius_client_init_acct(struct radius_client_data *radius) {
struct hostapd_radius_servers *conf = radius->conf;
int ok = 0;
radius_close_acct_sockets(radius);
radius->acct_serv_sock = socket(PF_INET, SOCK_DGRAM, 0);
if (radius->acct_serv_sock < 0)
wpa_printf(MSG_INFO, "RADIUS: socket[PF_INET... | radius_client_init_acct | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int radius_client_init_auth(radius_client_data *radius) {
int *v1;
char *v2;
int *v3;
char *v4;
int ok;
hostapd_radius_servers *conf;
conf = radius->conf;
ok = 0;
radius_close_auth_sockets(radius);
radius->auth_serv_sock = socket(2, 2, 0);
if (radius->auth_serv_sock >= 0) {
radius_client_disa... | static int radius_client_init_auth(struct radius_client_data *radius) {
struct hostapd_radius_servers *conf = radius->conf;
int ok = 0;
radius_close_auth_sockets(radius);
radius->auth_serv_sock = socket(PF_INET, SOCK_DGRAM, 0);
if (radius->auth_serv_sock < 0)
wpa_printf(MSG_INFO, "RADIUS: socket[PF_INET... | radius_client_init_auth | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void radius_client_list_add(radius_client_data *radius, radius_msg *msg,
RadiusType msg_type, const u8 *shared_secret,
size_t shared_secret_len, const u8 *addr) {
radius_msg_list *entry;
radius_msg_list *prev;
if (eloop_terminated()) {
radius_msg_free(m... | static void radius_client_list_add(struct radius_client_data *radius,
struct radius_msg *msg, RadiusType msg_type,
const u8 *shared_secret,
size_t shared_secret_len, const u8 *addr) {
struct radius_msg_list *entry... | radius_client_list_add | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void radius_client_msg_free(radius_msg_list *req) {
radius_msg_free(req->msg);
free(req);
} | static void radius_client_msg_free(struct radius_msg_list *req) {
radius_msg_free(req->msg);
os_free(req);
} | radius_client_msg_free | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void radius_client_receive(int sock, void *eloop_ctx, void *sock_ctx) {
int *v3;
char *v4;
int code;
const char *v6;
int invalid_authenticator;
RadiusType msg_type;
int len;
int roundtrip;
RadiusRxResult res;
radius_rx_handler *handlers;
size_t num_handlers;
size_t i;
radius_msg_list *req;
r... | static void radius_client_receive(int sock, void *eloop_ctx, void *sock_ctx) {
struct radius_client_data *radius = eloop_ctx;
struct hostapd_radius_servers *conf = radius->conf;
RadiusType msg_type = (uintptr_t)sock_ctx;
int len, roundtrip;
unsigned char buf[RADIUS_MAX_MSG_LEN];
struct msghdr msghdr = {0};
... | radius_client_receive | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void radius_client_reconfig(radius_client_data *radius,
hostapd_radius_servers *conf) {
if (radius)
radius->conf = conf;
} | void radius_client_reconfig(struct radius_client_data *radius,
struct hostapd_radius_servers *conf) {
if (radius)
radius->conf = conf;
} | radius_client_reconfig | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int radius_client_register(radius_client_data *radius, RadiusType msg_type,
RadiusRxResult (*handler)(radius_msg *, radius_msg *,
const u8 *, size_t,
void *),
v... | int radius_client_register(
struct radius_client_data *radius, RadiusType msg_type,
RadiusRxResult (*handler)(struct radius_msg *msg, struct radius_msg *req,
const u8 *shared_secret, size_t shared_secret_len,
void *data),
void *data) {
struct rad... | radius_client_register | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int radius_client_retransmit(radius_client_data *radius, radius_msg_list *entry,
os_time_t now) {
u8 id;
radius_hdr *v5;
size_t v6;
const void *v7;
int s;
int num_servers;
u32 delay_time;
u8 *acct_delay_time;
size_t acct_delay_time_len;
hostapd_radius_servers *conf;
si... | static int radius_client_retransmit(struct radius_client_data *radius,
struct radius_msg_list *entry,
os_time_t now) {
struct hostapd_radius_servers *conf = radius->conf;
int s;
struct wpabuf *buf;
size_t prev_num_msgs;
u8 *acct_delay_tim... | radius_client_retransmit | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int radius_client_send(radius_client_data *radius, radius_msg *msg,
RadiusType msg_type, const u8 *addr) {
size_t v5;
const void *v6;
int s;
const u8 *shared_secret;
size_t shared_secret_len;
hostapd_radius_servers *conf;
const wpabuf *buf;
conf = radius->conf;
if (msg_type == ... | int radius_client_send(struct radius_client_data *radius,
struct radius_msg *msg, RadiusType msg_type,
const u8 *addr) {
struct hostapd_radius_servers *conf = radius->conf;
const u8 *shared_secret;
size_t shared_secret_len;
char *name;
int s, res;
struct wpabuf ... | radius_client_send | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void radius_client_set_interim_error_cb(radius_client_data *radius,
void (*cb)(const u8 *, void *),
void *ctx) {
radius->interim_error_cb = cb;
radius->interim_error_cb_ctx = ctx;
} | void radius_client_set_interim_error_cb(struct radius_client_data *radius,
void (*cb)(const u8 *addr, void *ctx),
void *ctx) {
radius->interim_error_cb = cb;
radius->interim_error_cb_ctx = ctx;
} | radius_client_set_interim_error_cb | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void radius_client_timer(void *eloop_ctx, void *timeout_ctx) {
int v2;
int auth_failover;
int acct_failover;
os_time_t first;
radius_msg_list *entry;
radius_msg_list *entrya;
radius_msg_list *prev;
size_t prev_num_msgs;
radius_msg_list *tmp;
os_reltime now;
unsigned long v12;
v12 = __readfsqwor... | static void radius_client_timer(void *eloop_ctx, void *timeout_ctx) {
struct radius_client_data *radius = eloop_ctx;
struct os_reltime now;
os_time_t first;
struct radius_msg_list *entry, *prev, *tmp;
int auth_failover = 0, acct_failover = 0;
size_t prev_num_msgs;
int s;
entry = radius->msgs;
if (!en... | radius_client_timer | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void radius_client_update_acct_msgs(radius_client_data *radius,
const u8 *shared_secret,
size_t shared_secret_len) {
radius_msg_list *entry;
if (radius) {
for (entry = radius->msgs; entry; entry = entry->next) {
if (entry->msg_type =... | static void radius_client_update_acct_msgs(struct radius_client_data *radius,
const u8 *shared_secret,
size_t shared_secret_len) {
struct radius_msg_list *entry;
if (!radius)
return;
for (entry = radius->msgs; entry; entry... | radius_client_update_acct_msgs | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void radius_client_update_timeout(radius_client_data *radius) {
os_time_t first;
radius_msg_list *entry;
os_reltime now;
unsigned long v4;
v4 = __readfsqword(0x28u);
eloop_cancel_timeout((eloop_timeout_handler)radius_client_timer, radius, 0);
if (radius->msgs) {
first = 0;
for (entry = radius->ms... | static void radius_client_update_timeout(struct radius_client_data *radius) {
struct os_reltime now;
os_time_t first;
struct radius_msg_list *entry;
eloop_cancel_timeout(radius_client_timer, radius, NULL);
if (radius->msgs == NULL) {
return;
}
first = 0;
for (entry = radius->msgs; entry; entry = ... | radius_client_update_timeout | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void radius_close_acct_sockets(radius_client_data *radius) {
radius->acct_sock = -1;
if (radius->acct_serv_sock >= 0) {
eloop_unregister_read_sock(radius->acct_serv_sock);
close(radius->acct_serv_sock);
radius->acct_serv_sock = -1;
}
if (radius->acct_serv_sock6 >= 0) {
eloop_unregister_read_sock... | static void radius_close_acct_sockets(struct radius_client_data *radius) {
radius->acct_sock = -1;
if (radius->acct_serv_sock >= 0) {
eloop_unregister_read_sock(radius->acct_serv_sock);
close(radius->acct_serv_sock);
radius->acct_serv_sock = -1;
}
#ifdef CONFIG_IPV6
if (radius->acct_serv_sock6 >= 0... | radius_close_acct_sockets | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void radius_close_auth_sockets(radius_client_data *radius) {
radius->auth_sock = -1;
if (radius->auth_serv_sock >= 0) {
eloop_unregister_read_sock(radius->auth_serv_sock);
close(radius->auth_serv_sock);
radius->auth_serv_sock = -1;
}
if (radius->auth_serv_sock6 >= 0) {
eloop_unregister_read_sock... | static void radius_close_auth_sockets(struct radius_client_data *radius) {
radius->auth_sock = -1;
if (radius->auth_serv_sock >= 0) {
eloop_unregister_read_sock(radius->auth_serv_sock);
close(radius->auth_serv_sock);
radius->auth_serv_sock = -1;
}
#ifdef CONFIG_IPV6
if (radius->auth_serv_sock6 >= 0... | radius_close_auth_sockets | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
const char *radius_code_string(u8 code) {
const char *result;
if (code > 0x2Du) {
if (code == 255)
return "Reserved";
return "?Unknown?";
}
if (!code)
return "?Unknown?";
switch (code) {
case 1u:
result = "Access-Request";
break;
case 2u:
result = "Access-Accept";
break;... | static const char *radius_code_string(u8 code) {
switch (code) {
case RADIUS_CODE_ACCESS_REQUEST:
return "Access-Request";
case RADIUS_CODE_ACCESS_ACCEPT:
return "Access-Accept";
case RADIUS_CODE_ACCESS_REJECT:
return "Access-Reject";
case RADIUS_CODE_ACCOUNTING_REQUEST:
return "Accounting-Req... | radius_code_string | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int radius_copy_class(radius_class_data *dst, const radius_class_data *src) {
radius_attr_data *v3;
size_t i;
if (!src->attr)
return 0;
dst->attr = (radius_attr_data *)os_calloc_4(src->count, 0x10u);
if (!dst->attr)
return -1;
dst->count = 0;
for (i = 0; i < src->count; ++i) {
v3 = &dst->attr... | int radius_copy_class(struct radius_class_data *dst,
const struct radius_class_data *src) {
size_t i;
if (src->attr == NULL)
return 0;
dst->attr = os_calloc(src->count, sizeof(struct radius_attr_data));
if (dst->attr == NULL)
return -1;
dst->count = 0;
for (i = 0; i < src->... | radius_copy_class | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
radius_msg *radius_das_coa(radius_das_data *das, radius_msg *msg,
const char *abuf, int from_port) {
u8 v4;
u8 attr;
u32 error;
u8 *buf;
size_t len;
radius_hdr *hdr;
radius_msg *reply;
radius_das_attrs attrs;
u8 sta_addr[6];
u8 allowed[12];
char tmp[104];
unsigned long... | static struct radius_msg *radius_das_coa(struct radius_das_data *das,
struct radius_msg *msg,
const char *abuf, int from_port) {
struct radius_hdr *hdr;
struct radius_msg *reply;
u8 allowed[] = {RADIUS_ATTR_USER_NAME,
... | radius_das_coa | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void radius_das_deinit(radius_das_data *das) {
if (das) {
if (das->sock >= 0) {
eloop_unregister_read_sock(das->sock);
close(das->sock);
}
free(das->shared_secret);
free(das);
}
} | void radius_das_deinit(struct radius_das_data *das) {
if (das == NULL)
return;
if (das->sock >= 0) {
eloop_unregister_read_sock(das->sock);
close(das->sock);
}
os_free(das->shared_secret);
os_free(das);
} | radius_das_deinit | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
radius_msg *radius_das_disconnect(radius_das_data *das, radius_msg *msg,
const char *abuf, int from_port) {
u8 v4;
u8 attr;
u32 error;
u8 *buf;
size_t len;
radius_hdr *hdr;
radius_msg *reply;
radius_das_attrs attrs;
u8 sta_addr[6];
u8 allowed[11];
char tmp[104];
... | static struct radius_msg *radius_das_disconnect(struct radius_das_data *das,
struct radius_msg *msg,
const char *abuf,
int from_port) {
struct radius_hdr *hdr;
struct radiu... | radius_das_disconnect | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
radius_das_data *radius_das_init(radius_das_conf *conf) {
radius_das_data *das;
if (!conf->port || !conf->shared_secret || !conf->client_addr)
return 0;
das = (radius_das_data *)os_zalloc(0x50u);
if (!das)
return 0;
das->time_window = conf->time_window;
das->require_event_timestamp = conf->require_... | struct radius_das_data *radius_das_init(struct radius_das_conf *conf) {
struct radius_das_data *das;
if (conf->port == 0 || conf->shared_secret == NULL ||
conf->client_addr == NULL)
return NULL;
das = os_zalloc(sizeof(*das));
if (das == NULL)
return NULL;
das->time_window = conf->time_window;... | radius_das_init | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int radius_das_open_socket(int port) {
int *v1;
char *v2;
int *v4;
char *v5;
int s;
sockaddr_in addr;
unsigned long v8;
v8 = __readfsqword(0x28u);
s = socket(2, 2, 0);
if (s >= 0) {
memset(&addr, 0, sizeof(addr));
addr.sin_family = 2;
addr.sin_port = htons(port);
if (bind(s, (const ... | static int radius_das_open_socket(int port) {
int s;
struct sockaddr_in addr;
s = socket(PF_INET, SOCK_DGRAM, 0);
if (s < 0) {
wpa_printf(MSG_INFO, "RADIUS DAS: socket: %s", strerror(errno));
return -1;
}
os_memset(&addr, 0, sizeof(addr));
addr.sin_family = AF_INET;
addr.sin_port = htons(port)... | radius_das_open_socket | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void radius_das_receive(int sock, void *eloop_ctx, void *sock_ctx) {
int *v3;
char *v4;
char *v5;
int code;
socklen_t v7;
size_t v8;
const void *v9;
int *v10;
char *v11;
socklen_t fromlen;
u32 val;
int from_port;
int len;
int res;
u32 timestamp;
radius_msg *reply;
radius_das_data *das;... | static void radius_das_receive(int sock, void *eloop_ctx, void *sock_ctx) {
struct radius_das_data *das = eloop_ctx;
u8 buf[1500];
union {
struct sockaddr_storage ss;
struct sockaddr_in sin;
#ifdef CONFIG_IPV6
struct sockaddr_in6 sin6;
#endif
} from;
char abuf[50];
int from_port = 0;
socklen_t... | radius_das_receive | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
void radius_free_class(radius_class_data *c) {
size_t i;
if (c) {
for (i = 0; i < c->count; ++i)
free(c->attr[i].data);
free(c->attr);
c->attr = 0;
c->count = 0;
}
} | void radius_free_class(struct radius_class_data *c) {
size_t i;
if (c == NULL)
return;
for (i = 0; i < c->count; i++)
os_free(c->attr[i].data);
os_free(c->attr);
c->attr = NULL;
c->count = 0;
} | radius_free_class | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
int radius_gen_session_id(u8 *id, size_t len) { return os_get_random(id, len); } | int radius_gen_session_id(u8 *id, size_t len) { return os_get_random(id, len); } | radius_gen_session_id | hostapd-2.10 | net-wireless | O0/net-wireless/hostapd-2.10/hostapd | ida | O0 |
radius_attr_hdr *radius_get_attr_hdr(radius_msg *msg, int idx) {
return (radius_attr_hdr *)&wpabuf_mhead_u8_1(msg->buf)[msg->attr_pos[idx]];
} | static struct radius_attr_hdr *radius_get_attr_hdr(struct radius_msg *msg,
int idx) {
return (struct radius_attr_hdr *)(wpabuf_mhead_u8(msg->buf) +
msg->attr_pos[idx]);
} | radius_get_attr_hdr | 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.