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
gas_dialog_info *gas_serv_dialog_find(hostapd_data *hapd, const u8 *addr, u8 dialog_token) { int i; sta_info *sta; sta = ap_get_sta(hapd, addr); if (sta) { for (i = 0; sta->gas_dialog && i <= 7; ++i) { if (dialog_token == sta->gas_dialog[i].dialog_token && ...
struct gas_dialog_info *gas_serv_dialog_find(struct hostapd_data *hapd, const u8 *addr, u8 dialog_token) { struct sta_info *sta; int i; sta = ap_get_sta(hapd, addr); if (!sta) { wpa_printf(MSG_DEBUG, "ANQP: could not find STA " MACSTR, MAC2STR(addr)); return...
gas_serv_dialog_find
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void gas_serv_free_dialogs(hostapd_data *hapd, const u8 *sta_addr) { int i; sta_info *sta; sta = ap_get_sta(hapd, sta_addr); if (sta && sta->gas_dialog) { for (i = 0; i <= 7; ++i) { if (sta->gas_dialog[i].valid) return; } free(sta->gas_dialog); sta->gas_dialog = 0; } }
static void gas_serv_free_dialogs(struct hostapd_data *hapd, const u8 *sta_addr) { struct sta_info *sta; int i; sta = ap_get_sta(hapd, sta_addr); if (sta == NULL || sta->gas_dialog == NULL) return; for (i = 0; i < GAS_DIALOG_MAX; i++) { if (sta->gas_dialog[i].valid)...
gas_serv_free_dialogs
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int gas_serv_init(hostapd_data *hapd) { hapd->public_action_cb2 = (void (*)(void *, const u8 *, size_t, int))gas_serv_rx_public_action; hapd->public_action_cb2_ctx = hapd; return 0; }
int gas_serv_init(struct hostapd_data *hapd) { hapd->public_action_cb2 = gas_serv_rx_public_action; hapd->public_action_cb2_ctx = hapd; return 0; }
gas_serv_init
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void gas_serv_req_dpp_processing(hostapd_data *hapd, const u8 *sa, u8 dialog_token, int prot, wpabuf *buf) { size_t v5; u16 v6; size_t v7; const u8 *v8; u16 comeback_delay; wpabuf *tx_buf; gas_dialog_info *di_0; if (wpabuf_len_75(buf) > hapd->conf->gas_frag_limit || ...
void gas_serv_req_dpp_processing(struct hostapd_data *hapd, const u8 *sa, u8 dialog_token, int prot, struct wpabuf *buf) { struct wpabuf *tx_buf; if (wpabuf_len(buf) > hapd->conf->gas_frag_limit || hapd->conf->gas_comeback_delay) { struct ...
gas_serv_req_dpp_processing
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void gas_serv_req_local_processing(hostapd_data *hapd, const u8 *sa, u8 dialog_token, anqp_query_info *qi, int prot, int std_addr3) { size_t v6; const u8 *v7; u16 comeback_delay; wpabuf *tx_buf; wpabuf *buf; gas_dialog_info *di_0; buf ...
static void gas_serv_req_local_processing(struct hostapd_data *hapd, const u8 *sa, u8 dialog_token, struct anqp_query_info *qi, int prot, int std_addr3) { struct wpabuf *buf, *tx_buf; buf =...
gas_serv_req_local_processing
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void gas_serv_rx_gas_comeback_req(hostapd_data *hapd, const u8 *sa, const u8 *data, size_t len, int prot, int std_addr3) { const u8 *v6; int v7; size_t v8; const u8 *v9; u8 dialog_token; int more; wpabuf *tx_buf; size_t frag_len; gas_...
static void gas_serv_rx_gas_comeback_req(struct hostapd_data *hapd, const u8 *sa, const u8 *data, size_t len, int prot, int std_addr3) { struct gas_dialog_info *dialog; struct wpabuf *buf, *tx_buf; u8 dialog_token; size_t frag_len...
gas_serv_rx_gas_comeback_req
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void gas_serv_rx_gas_initial_req(hostapd_data *hapd, const u8 *sa, const u8 *data, size_t len, int prot, int std_addr3) { const u8 *v6; unsigned char *v7; size_t v8; const u8 *v9; u8 dialog_token; u16 slen; u16 slena; u16 info_id; u16 e...
static void gas_serv_rx_gas_initial_req(struct hostapd_data *hapd, const u8 *sa, const u8 *data, size_t len, int prot, int std_addr3) { const u8 *pos = data; const u8 *end = data + len; const u8 *next; u8 dialog_token; u16 slen; ...
gas_serv_rx_gas_initial_req
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void gas_serv_rx_public_action(void *ctx, const u8 *buf, size_t len, int freq) { int v4; size_t lenb; int std_addr3; _BOOL4 prot; const u8 *sa; if (len > 0x19 && (buf[24] == 4 || buf[24] == 9)) { prot = buf[24] == 9; sa = buf + 10; if (*(_DWORD *)(*((_QWORD *)ctx + 2) + 1680LL) == 1) { st...
static void gas_serv_rx_public_action(void *ctx, const u8 *buf, size_t len, int freq) { struct hostapd_data *hapd = ctx; const struct ieee80211_mgmt *mgmt; const u8 *sa, *data; int prot, std_addr3; mgmt = (const struct ieee80211_mgmt *)buf; if (len < IEEE80211_HDRLEN +...
gas_serv_rx_public_action
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void gas_serv_write_dpp_adv_proto(wpabuf *buf) { wpabuf_put_u8_43(buf, 0x6Cu); wpabuf_put_u8_43(buf, 8u); wpabuf_put_u8_43(buf, 0x7Fu); wpabuf_put_u8_43(buf, 0xDDu); wpabuf_put_u8_43(buf, 5u); wpabuf_put_be24_4(buf, 0x506F9Au); wpabuf_put_u8_43(buf, 0x1Au); wpabuf_put_u8_43(buf, 1u); }
static void gas_serv_write_dpp_adv_proto(struct wpabuf *buf) { wpabuf_put_u8(buf, WLAN_EID_ADV_PROTO); wpabuf_put_u8(buf, 8); wpabuf_put_u8(buf, 0x7f); wpabuf_put_u8(buf, WLAN_EID_VENDOR_SPECIFIC); wpabuf_put_u8(buf, 5); wpabuf_put_be24(buf, OUI_WFA); wpabuf_put_u8(buf, DPP_OUI_TYPE); wpabuf_put_u8(buf,...
gas_serv_write_dpp_adv_proto
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int gen_uuid(const char *txt_addr) { u8 addr[6]; u8 uuid[16]; char buf[104]; unsigned long v5; v5 = __readfsqword(0x28u); if (hwaddr_aton(txt_addr, addr) < 0) return -1; uuid_gen_mac_addr(addr, uuid); if (uuid_bin2str(uuid, buf, 0x64u) < 0) return -1; puts(buf); return 0; }
static int gen_uuid(const char *txt_addr) { u8 addr[ETH_ALEN]; u8 uuid[UUID_LEN]; char buf[100]; if (hwaddr_aton(txt_addr, addr) < 0) return -1; uuid_gen_mac_addr(addr, uuid); if (uuid_bin2str(uuid, buf, sizeof(buf)) < 0) return -1; printf("%s\n", buf); return 0; }
gen_uuid
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int get_6ghz_sec_channel(int channel) { if ((((channel - 1) / 4) & 1) != 0) return -1; else return 1; }
int get_6ghz_sec_channel(int channel) { if (((channel - 1) / 4) % 2) return -1; return 1; }
get_6ghz_sec_channel
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
unsigned int get_akm_suites_info(nlattr *tb) { unsigned int v2; int i; unsigned int key_mgmt; int num; u32 *akms; key_mgmt = 0; if (!tb) return 0; num = (unsigned long)(int)nla_len(tb) >> 2; akms = (u32 *)nla_data(tb); for (i = 0; i < num; ++i) { v2 = akms[i]; if (v2 == 1349491202) { ...
static unsigned int get_akm_suites_info(struct nlattr *tb) { int i, num; unsigned int key_mgmt = 0; u32 *akms; if (!tb) return 0; num = nla_len(tb) / sizeof(u32); akms = nla_data(tb); for (i = 0; i < num; i++) { switch (akms[i]) { case RSN_AUTH_KEY_MGMT_UNSPEC_802_1X: key_mgmt |= WPA_D...
get_akm_suites_info
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
anqp_element *get_anqp_elem(hostapd_data *hapd, u16 infoid) { anqp_element *elem; for (elem = (anqp_element *)hapd->conf->anqp_elem.next; elem != (anqp_element *)&hapd->conf->anqp_elem; elem = (anqp_element *)elem->list.next) { if (infoid == elem->infoid) return elem; } return 0; }
static struct anqp_element *get_anqp_elem(struct hostapd_data *hapd, u16 infoid) { struct anqp_element *elem; dl_list_for_each(elem, &hapd->conf->anqp_elem, struct anqp_element, list) { if (elem->infoid == infoid) return elem; } return NULL; }
get_anqp_elem
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
i802_bss *get_bss_ifindex(wpa_driver_nl80211_data *drv, int ifindex) { i802_bss *bss; for (bss = drv->first_bss; bss; bss = bss->next) { if (ifindex == bss->ifindex) return bss; } return 0; }
struct i802_bss *get_bss_ifindex(struct wpa_driver_nl80211_data *drv, int ifindex) { struct i802_bss *bss; for (bss = drv->first_bss; bss; bss = bss->next) { if (bss->ifindex == ifindex) return bss; } return NULL; }
get_bss_ifindex
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int get_bss_load_update_timeout(hostapd_data *hapd, unsigned int *sec, unsigned int *usec) { unsigned int update_period; unsigned int beacon_int; update_period = hapd->conf->bss_load_update_period; beacon_int = hapd->iconf->beacon_int; if (update_period && hapd->iconf->beacon_...
static int get_bss_load_update_timeout(struct hostapd_data *hapd, unsigned int *sec, unsigned int *usec) { unsigned int update_period = hapd->conf->bss_load_update_period; unsigned int beacon_int = hapd->iconf->beacon_int; unsigned int update_timeout; if (!update_period |...
get_bss_load_update_timeout
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int get_channel_info(nl_msg *msg, void *arg) { long v2; unsigned int v3; long v4; int u32; u8 seg1_idx; nl80211_channel_type ct; genlmsghdr *gnlh; wpa_channel_info *chan_info; nlattr *tb[302]; unsigned long v12; v12 = __readfsqword(0x28u); memset(tb, 0, sizeof(tb)); v2 = nlmsg_hdr(msg); gnl...
static int get_channel_info(struct nl_msg *msg, void *arg) { struct nlattr *tb[NL80211_ATTR_MAX + 1] = {0}; struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg)); struct wpa_channel_info *chan_info = arg; nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0), genlmsg_attrlen(gnlh, 0), NULL); ...
get_channel_info
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int get_channel_width(nl_msg *msg, void *arg) { long v2; unsigned int v3; long v4; int u32; genlmsghdr *gnlh; nlattr *tb[302]; unsigned long v9; v9 = __readfsqword(0x28u); v2 = nlmsg_hdr(msg); gnlh = (genlmsghdr *)nlmsg_data(v2); v3 = genlmsg_attrlen(gnlh, 0); v4 = genlmsg_attrdata(gnlh, 0); ...
static int get_channel_width(struct nl_msg *msg, void *arg) { struct nlattr *tb[NL80211_ATTR_MAX + 1]; struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg)); struct wpa_signal_info *sig_change = arg; nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0), genlmsg_attrlen(gnlh, 0), NULL); sig_c...
get_channel_width
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
colocation_mode get_colocation_mode(hostapd_data *hapd) { u8 i; bool is_6ghz; bool is_colocated_6ghz; hostapd_iface *iface; is_6ghz = is_6ghz_op_class(hapd->iconf->op_class); if (!hapd->iface || !hapd->iface->interfaces) return colocation_mode_NO_COLOCATED_6GHZ; if (is_6ghz && hapd->iface->interfaces...
static enum colocation_mode get_colocation_mode(struct hostapd_data *hapd) { u8 i; bool is_6ghz = is_6ghz_op_class(hapd->iconf->op_class); if (!hapd->iface || !hapd->iface->interfaces) return NO_COLOCATED_6GHZ; if (is_6ghz && hapd->iface->interfaces->count == 1) return STANDALONE_6GHZ; for (i = 0; ...
get_colocation_mode
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
nl_sock *get_connect_handle(i802_bss *bss) { if ((bss->drv->capa.flags2 & 1) != 0 || (*((_BYTE *)bss + 66) & 1) != 0) return bss->nl_connect; else return 0; }
struct nl_sock *get_connect_handle(struct i802_bss *bss) { if ((bss->drv->capa.flags2 & WPA_DRIVER_FLAGS2_CONTROL_PORT_RX) || bss->use_nl_connect) return bss->nl_connect; return NULL; }
get_connect_handle
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int get_dn_field_index(const tls_dn_field_order_cnt *dn_cnt, int nid) { int result; switch (nid) { case 13: result = dn_cnt->cn; break; case 14: result = dn_cnt->c; break; case 15: result = dn_cnt->l; break; case 16: result = dn_cnt->st; break; case 17: result = dn_cnt...
static int get_dn_field_index(const struct tls_dn_field_order_cnt *dn_cnt, int nid) { switch (nid) { case NID_commonName: return dn_cnt->cn; case NID_countryName: return dn_cnt->c; case NID_localityName: return dn_cnt->l; case NID_stateOrProvinceName: return dn_cn...
get_dn_field_index
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
EAP_PWD_group *get_eap_pwd_group(u16 num) { EAP_PWD_group *grp; if (dragonfly_suitable_group(num, 1)) { grp = (EAP_PWD_group *)os_zalloc(0x18u); if (grp) { grp->group = crypto_ec_init(num); if (grp->group) { grp->group_num = num; wpa_printf(3, "EAP-pwd: provisioned group %d", nu...
EAP_PWD_group *get_eap_pwd_group(u16 num) { EAP_PWD_group *grp; if (!dragonfly_suitable_group(num, 1)) { wpa_printf(MSG_INFO, "EAP-pwd: unsuitable group %u", num); return NULL; } grp = os_zalloc(sizeof(EAP_PWD_group)); if (!grp) return NULL; grp->group = crypto_ec_init(num); if (!grp->group) ...
get_eap_pwd_group
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
fst_group *get_fst_group_by_id(const char *id) { size_t v1; fst_group *g; const char *group_id; for (g = (fst_group *)&fst_global_groups_list.next[-3]; &g->global_groups_lentry != &fst_global_groups_list; g = (fst_group *)&g->global_groups_lentry.next[-3]) { group_id = fst_group_get_id_3(g); ...
static struct fst_group *get_fst_group_by_id(const char *id) { struct fst_group *g; foreach_fst_group(g) { const char *group_id = fst_group_get_id(g); if (os_strncmp(group_id, id, os_strlen(group_id)) == 0) return g; } return NULL; }
get_fst_group_by_id
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int get_group_fill_session(fst_group **g, fst_session *s) { fst_get_peer_ctx *ctx; const u8 *old_addr; const u8 *new_addr; unsigned long v6; v6 = __readfsqword(0x28u); memset(s, 0, sizeof(fst_session)); for (*g = (fst_group *)&fst_global_groups_list.next[-3]; &(*g)->global_groups_lentry != &fst_gl...
static int get_group_fill_session(struct fst_group **g, struct fst_session *s) { const u8 *old_addr, *new_addr; struct fst_get_peer_ctx *ctx; os_memset(s, 0, sizeof(*s)); foreach_fst_group(*g) { s->data.new_iface = fst_group_first_iface(*g); if (s->data.new_iface) break; } if (!s->data.new_if...
get_group_fill_session
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
hostapd_data *get_hapd_bssid(hostapd_iface *iface, const u8 *bssid) { size_t i; if (!bssid) return 0; if (*bssid == 0xFF && bssid[1] == 0xFF && bssid[2] == 0xFF && bssid[3] == 0xFF && bssid[4] == 0xFF && bssid[5] == 0xFF) { return (hostapd_data *)-1LL; } for (i = 0; i < iface->num_bss; ++i) { ...
static struct hostapd_data *get_hapd_bssid(struct hostapd_iface *iface, const u8 *bssid) { size_t i; if (bssid == NULL) return NULL; if (bssid[0] == 0xff && bssid[1] == 0xff && bssid[2] == 0xff && bssid[3] == 0xff && bssid[4] == 0xff && bssid[5] == 0xff) r...
get_hapd_bssid
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
const u8 *get_hdr_bssid(const ieee80211_hdr *hdr, size_t len) { int v3; int v4; if (len <= 0xF) return 0; v3 = ((int)hdr->frame_control >> 2) & 3; if (v3 == 2) { if (len <= 0x17) return 0; v4 = hdr->frame_control & 0x300; if (v4 != 768) { if ((hdr->frame_control & 0x300u) > 0x300)...
const u8 *get_hdr_bssid(const struct ieee80211_hdr *hdr, size_t len) { u16 fc, type, stype; if (len < 16) return NULL; fc = le_to_host16(hdr->frame_control); type = WLAN_FC_GET_TYPE(fc); stype = WLAN_FC_GET_STYPE(fc); switch (type) { case WLAN_FC_TYPE_DATA: if (len < 24) return NULL; ...
get_hdr_bssid
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int get_hex_config(u8 *buf, size_t max_len, int line, const char *field, const char *val) { size_t hlen; size_t len; u8 tmp[15]; unsigned long v12; v12 = __readfsqword(0x28u); hlen = strlen(val); len = hlen >> 1; memset(tmp, 0, sizeof(tmp)); if ((hlen & 1) != 0 || len > 0xF || hexs...
static int get_hex_config(u8 *buf, size_t max_len, int line, const char *field, const char *val) { size_t hlen = os_strlen(val), len = hlen / 2; u8 tmp[EXT_CAPA_MAX_LEN]; os_memset(tmp, 0, EXT_CAPA_MAX_LEN); if (hlen & 1 || len > EXT_CAPA_MAX_LEN || hexstr2bin(val, tmp, len)) { wp...
get_hex_config
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
const u8 *get_ie(const u8 *ies, size_t len, u8 eid) { const element *elem; if (!ies) return 0; for (elem = (const element *)ies; &ies[len] - (const u8 *)elem > 1 && &ies[len] - (const u8 *)elem >= elem->datalen + 2; elem = (const element *)((char *)elem + elem->datalen + 2)) { if (ei...
const u8 *get_ie(const u8 *ies, size_t len, u8 eid) { const struct element *elem; if (!ies) return NULL; for_each_element_id(elem, eid, ies, len) return &elem->id; return NULL; }
get_ie
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
const u8 *get_ie_ext(const u8 *ies, size_t len, u8 ext) { const element *elem; if (!ies) return 0; for (elem = (const element *)ies; &ies[len] - (const u8 *)elem > 1 && &ies[len] - (const u8 *)elem >= elem->datalen + 2; elem = (const element *)((char *)elem + elem->datalen + 2)) { if...
const u8 *get_ie_ext(const u8 *ies, size_t len, u8 ext) { const struct element *elem; if (!ies) return NULL; for_each_element_extid(elem, ext, ies, len) return &elem->id; return NULL; }
get_ie_ext
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void get_iface_akm_suites_info(wiphy_info_data *info, nlattr *nl_akms) { unsigned int v2; long v3; nl80211_iftype v4; const char *v5; int i; unsigned int key_mgmt; nlattr *nl_iftype; nlattr *tb[3]; unsigned long v10; v10 = __readfsqword(0x28u); if (nl_akms) { v2 = nla_len(nl_akms); v3 = n...
static void get_iface_akm_suites_info(struct wiphy_info_data *info, struct nlattr *nl_akms) { struct nlattr *tb[NL80211_IFTYPE_AKM_ATTR_MAX + 1]; struct nlattr *nl_iftype; unsigned int key_mgmt; int i; if (!nl_akms) return; nla_parse(tb, NL80211_IFTYPE_AKM_ATTR_MA...
get_iface_akm_suites_info
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int get_key_handler(nl_msg *msg, void *arg) { long v2; unsigned int v3; long v4; int v5; size_t v6; const void *v7; genlmsghdr *gnlh; nlattr *tb[302]; unsigned long v11; v11 = __readfsqword(0x28u); v2 = nlmsg_hdr(msg); gnlh = (genlmsghdr *)nlmsg_data(v2); v3 = genlmsg_attrlen(gnlh, 0); v4 =...
static int get_key_handler(struct nl_msg *msg, void *arg) { struct nlattr *tb[NL80211_ATTR_MAX + 1]; struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg)); nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0), genlmsg_attrlen(gnlh, 0), NULL); if (tb[NL80211_ATTR_KEY_SEQ]) memcpy(arg, nla_d...
get_key_handler
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
const u8 *get_last_char(const u8 *val, size_t len, char c) { while (len) { if (val[len - 1] == c) return &val[len - 1]; --len; } return 0; }
static const u8 *get_last_char(const u8 *val, size_t len, char c) { while (len > 0) { const u8 *pos = &val[len - 1]; if (*pos == (u8)c) return pos; len--; } return NULL; }
get_last_char
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int get_link_noise(nl_msg *msg, void *arg) { long v2; unsigned int v3; long v4; genlmsghdr *gnlh; nlattr *sinfo[13]; nlattr *tb[302]; unsigned long v9; v9 = __readfsqword(0x28u); v2 = nlmsg_hdr(msg); gnlh = (genlmsghdr *)nlmsg_data(v2); v3 = genlmsg_attrlen(gnlh, 0); v4 = genlmsg_attrdata(gnlh,...
static int get_link_noise(struct nl_msg *msg, void *arg) { struct nlattr *tb[NL80211_ATTR_MAX + 1]; struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg)); struct nlattr *sinfo[NL80211_SURVEY_INFO_MAX + 1]; static struct nla_policy survey_policy[NL80211_SURVEY_INFO_MAX + 1] = { [NL80211_SURVEY_INFO_FREQUENC...
get_link_noise
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int get_link_signal(nl_msg *msg, void *arg) { long v2; unsigned int v3; long v4; genlmsghdr *gnlh; nlattr *rinfo[18]; nlattr *sinfo[44]; nlattr *tb[302]; unsigned long v10; v10 = __readfsqword(0x28u); v2 = nlmsg_hdr(msg); gnlh = (genlmsghdr *)nlmsg_data(v2); v3 = genlmsg_attrlen(gnlh, 0); v4 ...
static int get_link_signal(struct nl_msg *msg, void *arg) { struct nlattr *tb[NL80211_ATTR_MAX + 1]; struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg)); struct nlattr *sinfo[NL80211_STA_INFO_MAX + 1]; static struct nla_policy policy[NL80211_STA_INFO_MAX + 1] = { [NL80211_STA_INFO_SIGNAL] = {.type = NLA_...
get_link_signal
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int get_netif_info(const char *net_if, unsigned int *ip_addr, char **ip_addr_text, in_addr *netmask, u8 *mac) { int *v5; char *v6; int *v7; char *v8; int *v9; char *v10; int *v11; int *v12; char *v13; int *v14; int sock; ifreq req; unsigned long v21; v21 = __readfsqword(0...
int get_netif_info(const char *net_if, unsigned *ip_addr, char **ip_addr_text, struct in_addr *netmask, u8 mac[ETH_ALEN]) { struct ifreq req; int sock = -1; struct sockaddr_in *addr; struct in_addr in_addr; *ip_addr_text = os_zalloc(16); if (*ip_addr_text == NULL) goto fail; sock ...
get_netif_info
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
u32 get_nl80211_protocol_features(wpa_driver_nl80211_data *drv) { const char *v1; u32 feat; nl_msg *msg; unsigned long v5; v5 = __readfsqword(0x28u); feat = 0; msg = (nl_msg *)nlmsg_alloc(drv, v1); if (!msg) return 0; if (nl80211_cmd(drv, msg, 0, 0x5Fu)) { if (send_and_recv_msgs(drv, msg, ...
static u32 get_nl80211_protocol_features(struct wpa_driver_nl80211_data *drv) { u32 feat = 0; struct nl_msg *msg; msg = nlmsg_alloc(); if (!msg) return 0; if (!nl80211_cmd(drv, msg, 0, NL80211_CMD_GET_PROTOCOL_FEATURES)) { nlmsg_free(msg); return 0; } if (send_and_recv_msgs(drv, msg, protoc...
get_nl80211_protocol_features
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
nl80211_auth_type get_nl_auth_type(int wpa_auth_alg) { if ((wpa_auth_alg & 1) != 0) return nl80211_auth_type_NL80211_AUTHTYPE_OPEN_SYSTEM; if ((wpa_auth_alg & 2) != 0) return nl80211_auth_type_NL80211_AUTHTYPE_SHARED_KEY; if ((wpa_auth_alg & 4) != 0) return nl80211_auth_type_NL80211_AUTHTYPE_NETWORK_E...
static enum nl80211_auth_type get_nl_auth_type(int wpa_auth_alg) { if (wpa_auth_alg & WPA_AUTH_ALG_OPEN) return NL80211_AUTHTYPE_OPEN_SYSTEM; if (wpa_auth_alg & WPA_AUTH_ALG_SHARED) return NL80211_AUTHTYPE_SHARED_KEY; if (wpa_auth_alg & WPA_AUTH_ALG_LEAP) return NL80211_AUTHTYPE_NETWORK_EAP; if (wpa...
get_nl_auth_type
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int get_noise_for_scan_results(nl_msg *msg, void *arg) { long v2; unsigned int v4; long v5; unsigned int v6; genlmsghdr *gnlh; nlattr *sinfo[13]; nlattr *tb[302]; unsigned long v10; v10 = __readfsqword(0x28u); v2 = nlmsg_hdr(msg); gnlh = (genlmsghdr *)nlmsg_data(v2); if (*((_DWORD *)arg + 63) >...
static int get_noise_for_scan_results(struct nl_msg *msg, void *arg) { struct nlattr *tb[NL80211_ATTR_MAX + 1]; struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg)); struct nlattr *sinfo[NL80211_SURVEY_INFO_MAX + 1]; static struct nla_policy survey_policy[NL80211_SURVEY_INFO_MAX + 1] = { [NL80211_SURVEY_I...
get_noise_for_scan_results
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
const oper_class_map *get_oper_class(const char *country, u8 op_class) { u8 op_classa; const oper_class_map *op; op_classa = op_class; if (country) op_classa = country_to_global_op_class(country, op_class); for (op = global_op_class; op->op_class && op_classa != op->op_class; ++op) ; if (op->op_cla...
const struct oper_class_map *get_oper_class(const char *country, u8 op_class) { const struct oper_class_map *op; if (country) op_class = country_to_global_op_class(country, op_class); op = &global_op_class[0]; while (op->op_class && op->op_class != op_class) op++; if (!op->op_class) return NULL...
get_oper_class
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
const u8 *get_own_uuid(hostapd_iface *iface) { const u8 *uuid[2]; uuid[1] = (const u8 *)__readfsqword(0x28u); if (!iface->interfaces || !iface->interfaces->for_each_interface) return 0; uuid[0] = 0; iface->interfaces->for_each_interface( iface->interfaces, (int (*)(hostapd_iface *, void *))get_uuid...
static const u8 *get_own_uuid(struct hostapd_iface *iface) { const u8 *uuid; if (iface->interfaces == NULL || iface->interfaces->for_each_interface == NULL) return NULL; uuid = NULL; iface->interfaces->for_each_interface(iface->interfaces, get_uuid_cb, &uuid); return uuid; }
get_own_uuid
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int get_peer_mbies(const char *params, char *buf, size_t buflen) { size_t v3; const u8 *v4; char *endp; fst_group *g; fst_iface *iface; const wpabuf *mbies; u8 peer_addr[6]; char ifname[40]; unsigned long v13; v13 = __readfsqword(0x28u); iface = 0; if (fst_read_next_text_param(params, ifname, 0...
static int get_peer_mbies(const char *params, char *buf, size_t buflen) { char *endp; char ifname[FST_MAX_INTERFACE_SIZE]; u8 peer_addr[ETH_ALEN]; struct fst_group *g; struct fst_iface *iface = NULL; const struct wpabuf *mbies; if (fst_read_next_text_param(params, ifname, sizeof(ifname), &endp) || ...
get_peer_mbies
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void get_pri_sec_chan(wpa_scan_res *bss, int *pri_chan, int *sec_chan) { int sec; ieee80211_ht_operation *oper; ieee802_11_elems elems; unsigned long v7; v7 = __readfsqword(0x28u); *sec_chan = 0; *pri_chan = *sec_chan; ieee802_11_parse_elems((const u8 *)&bss[1], bss->ie_len, &elems, 0); if (elems.ht_...
void get_pri_sec_chan(struct wpa_scan_res *bss, int *pri_chan, int *sec_chan) { struct ieee80211_ht_operation *oper; struct ieee802_11_elems elems; *pri_chan = *sec_chan = 0; ieee802_11_parse_elems((u8 *)(bss + 1), bss->ie_len, &elems, 0); if (elems.ht_operation) { oper = (struct ieee80211_ht_operation ...
get_pri_sec_chan
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int get_sta_handler(nl_msg *msg, void *arg) { long v2; unsigned int v3; long v4; long v6; long v7; long v8; genlmsghdr *gnlh; nlattr *rate[18]; nlattr *stats[44]; nlattr *tb[302]; unsigned long v13; v13 = __readfsqword(0x28u); v2 = nlmsg_hdr(msg); gnlh = (genlmsghdr *)nlmsg_data(v2); v3 =...
static int get_sta_handler(struct nl_msg *msg, void *arg) { struct nlattr *tb[NL80211_ATTR_MAX + 1]; struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg)); struct hostap_sta_driver_data *data = arg; struct nlattr *stats[NL80211_STA_INFO_MAX + 1]; static struct nla_policy stats_policy[NL80211_STA_INFO_MAX + 1] ...
get_sta_handler
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void get_sta_tid_stats(hostap_sta_driver_data *data, nlattr *attr) { int rem; nlattr *tidattr; nlattr *tid_stats[7]; nlattr *txq_stats[12]; unsigned long v6; v6 = __readfsqword(0x28u); tidattr = (nlattr *)nla_data(attr); for (rem = nla_len(attr); (unsigned int)nla_ok(tidattr, (unsigned int)rem); ...
static void get_sta_tid_stats(struct hostap_sta_driver_data *data, struct nlattr *attr) { struct nlattr *tid_stats[NL80211_TID_STATS_MAX + 1], *tidattr; struct nlattr *txq_stats[NL80211_TXQ_STATS_MAX + 1]; static struct nla_policy txq_stats_policy[NL80211_TXQ_STATS_MAX + 1] = { ...
get_sta_tid_stats
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int get_sta_tx_parameters(wpa_state_machine *sm, int ap_max_chanwidth, int ap_seg1_idx, int *bandwidth, int *seg1_idx) { if (sm->wpa_auth->cb->get_sta_tx_params) return sm->wpa_auth->cb->get_sta_tx_params(sm->wpa_auth->cb_ctx, sm->addr, ap_m...
int get_sta_tx_parameters(struct wpa_state_machine *sm, int ap_max_chanwidth, int ap_seg1_idx, int *bandwidth, int *seg1_idx) { struct wpa_authenticator *wpa_auth = sm->wpa_auth; if (!wpa_auth->cb->get_sta_tx_params) return -1; return wpa_auth->cb->get_sta_tx_params(wpa_auth->cb_ctx...
get_sta_tx_parameters
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int get_tx_parameters(sta_info *sta, int ap_max_chanwidth, int ap_seg1_idx, int *bandwidth, int *seg1_idx) { int v5; int v6; int v7; int v8; _BOOL4 ht_40mhz; int vht_80p80; int requested_bw; ieee80211_vht_capabilities *capab; ieee80211_vht_operation *oper; ht_40mhz = 0; vht_...
int get_tx_parameters(struct sta_info *sta, int ap_max_chanwidth, int ap_seg1_idx, int *bandwidth, int *seg1_idx) { int ht_40mhz = 0; int vht_80p80 = 0; int requested_bw; if (sta->ht_capabilities) ht_40mhz = !!(sta->ht_capabilities->ht_capabilities_info & HT_CAP_INFO...
get_tx_parameters
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int get_uuid_cb(hostapd_iface *iface, void *ctx) { size_t j; hostapd_data *hapd; if (!iface) return 0; for (j = 0; j < iface->num_bss; ++j) { hapd = iface->bss[j]; if (hapd->wps && !hapd->conf->wps_independent && !is_nil_uuid(hapd->wps->uuid)) { *(_QWORD *)ctx = hapd->wps->uuid; ...
static int get_uuid_cb(struct hostapd_iface *iface, void *ctx) { const u8 **uuid = ctx; size_t j; if (iface == NULL) return 0; for (j = 0; j < iface->num_bss; j++) { struct hostapd_data *hapd = iface->bss[j]; if (hapd->wps && !hapd->conf->wps_independent && !is_nil_uuid(hapd->wps->uuid)) { ...
get_uuid_cb
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int get_value_from_field(const X509 *cert, char *field_str, tls_dn_field_order_cnt *dn_cnt) { int nid; char *context; char *name; char *value; unsigned long v9; v9 = __readfsqword(0x28u); context = 0; if (!strcmp(field_str, "*")) return 1; name = str_token(field_str, "=",...
static int get_value_from_field(const X509 *cert, char *field_str, struct tls_dn_field_order_cnt *dn_cnt) { int nid; char *context = NULL, *name, *value; if (os_strcmp(field_str, "*") == 0) return 1; name = str_token(field_str, "=", &context); if (!name) return 0; ...
get_value_from_field
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
const u8 *get_vendor_ie(const u8 *ies, size_t len, u32 vendor_type) { const element *elem; for (elem = (const element *)ies; &ies[len] - (const u8 *)elem > 1 && &ies[len] - (const u8 *)elem >= elem->datalen + 2; elem = (const element *)((char *)elem + elem->datalen + 2)) { if (elem->id == ...
const u8 *get_vendor_ie(const u8 *ies, size_t len, u32 vendor_type) { const struct element *elem; for_each_element_id(elem, WLAN_EID_VENDOR_SPECIFIC, ies, len) { if (elem->datalen >= 4 && vendor_type == WPA_GET_BE32(elem->data)) return &elem->id; } return NULL; }
get_vendor_ie
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int get_wowlan_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(...
static int get_wowlan_handler(struct nl_msg *msg, void *arg) { struct nlattr *tb[NL80211_ATTR_MAX + 1]; struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg)); int *wowlan_enabled = arg; nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0), genlmsg_attrlen(gnlh, 0), NULL); *wowlan_enabled = !...
get_wowlan_handler
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
wpabuf *get_x509_cert(X509 *cert) { int cert_len; u8 *tmp; wpabuf *buf; unsigned long v5; v5 = __readfsqword(0x28u); cert_len = i2d_X509(cert, 0); if (cert_len <= 0) return 0; buf = wpabuf_alloc(cert_len); if (!buf) return 0; tmp = (u8 *)wpabuf_put(buf, cert_len); i2d_X509(cert, &tmp); ...
static struct wpabuf *get_x509_cert(X509 *cert) { struct wpabuf *buf; u8 *tmp; int cert_len = i2d_X509(cert, NULL); if (cert_len <= 0) return NULL; buf = wpabuf_alloc(cert_len); if (buf == NULL) return NULL; tmp = wpabuf_put(buf, cert_len); i2d_X509(cert, &tmp); return buf; }
get_x509_cert
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
u8 global_op_class_from_country_array(u8 op_class, size_t array_size, const country_op_class *country_array) { size_t i; for (i = 0; i < array_size; ++i) { if (op_class == country_array[i].country_op_class) return country_array[i].global_op_class; } return 0; }
static u8 global_op_class_from_country_array( u8 op_class, size_t array_size, const struct country_op_class *country_array) { size_t i; for (i = 0; i < array_size; i++) { if (country_array[i].country_op_class == op_class) return country_array[i].global_op_class; } return 0; }
global_op_class_from_country_array
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int handle_action(hostapd_data *hapd, const ieee80211_mgmt *mgmt, size_t len, unsigned int freq) { int result; u16 seq_ctrl; sta_info *sta; ieee80211_mgmt *resp; if (len <= 0x1A) { hostapd_logger(hapd, mgmt->sa, 1u, 1, "handle_action - too short payload (len=%lu)", le...
static int handle_action(struct hostapd_data *hapd, const struct ieee80211_mgmt *mgmt, size_t len, unsigned int freq) { struct sta_info *sta; u8 *action __maybe_unused; if (len < IEEE80211_HDRLEN + 2 + 1) { hostapd_logger( hapd, mgmt->sa, HOSTAPD_MODU...
handle_action
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void handle_action_cb(hostapd_data *hapd, const ieee80211_mgmt *mgmt, size_t len, int ok) { if (!is_multicast_ether_addr_6(mgmt->da)) { if (len > 0x1D && mgmt->u.beacon.timestamp[0] == 4 && mgmt->u.beacon.timestamp[1] == 9 && WPA_GET_BE24_7(&mgmt->u.beacon.timestamp[2]) == 52...
static void handle_action_cb(struct hostapd_data *hapd, const struct ieee80211_mgmt *mgmt, size_t len, int ok) { struct sta_info *sta; const struct rrm_measurement_report_element *report; if (is_multicast_ether_addr(mgmt->da)) return; #ifdef CONFIG_DP...
handle_action_cb
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void handle_assoc(hostapd_data *hapd, const ieee80211_mgmt *mgmt, size_t len, int reassoc, int rssi) { size_t v5; const char *v6; const char *v7; u32 v8; int aid; int v10; char v11; u32 flags; u32 v13; const char *v14; int capab_info; u16 reply_res; u16 fc; u16 seq_ctrl; ...
static void handle_assoc(struct hostapd_data *hapd, const struct ieee80211_mgmt *mgmt, size_t len, int reassoc, int rssi) { u16 capab_info, listen_interval, seq_ctrl, fc; int resp = WLAN_STATUS_SUCCESS; u16 reply_res = WLAN_STATUS_UNSPECIFIED_FAILURE; const u8 *...
handle_assoc
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void handle_assoc_cb(hostapd_data *hapd, const ieee80211_mgmt *mgmt, size_t len, int reassoc, int ok) { u32 flags; u32 v6; size_t v7; const u8 *v8; u16 status; _BOOL4 new_assoc; sta_info *sta; os_reltime now; os_reltime age; char ifname_wds[24]; unsigned long v18; v18 = __r...
static void handle_assoc_cb(struct hostapd_data *hapd, const struct ieee80211_mgmt *mgmt, size_t len, int reassoc, int ok) { u16 status; struct sta_info *sta; int new_assoc = 1; sta = ap_get_sta(hapd, mgmt->da); if (!sta) { wpa_printf(MSG_INFO, "han...
handle_assoc_cb
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void handle_auth(hostapd_data *hapd, const ieee80211_mgmt *mgmt, size_t len, int rssi, int from_queue) { const char *v5; const char *v6; const char *v7; int ieee80211ac; int secondary_channel; unsigned int freq; u8 *v11; u8 *v12; u8 *v13; u32 flags; u16 v15; u8 op_class; u8 ch...
static void handle_auth(struct hostapd_data *hapd, const struct ieee80211_mgmt *mgmt, size_t len, int rssi, int from_queue) { u16 auth_alg, auth_transaction, status_code; u16 resp = WLAN_STATUS_SUCCESS; struct sta_info *sta = NULL; int res, reply_res; u16 fc; ...
handle_auth
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void handle_auth_cb(hostapd_data *hapd, const ieee80211_mgmt *mgmt, size_t len, int ok) { bool success_status; ieee80211_mgmt_$1A5EAEE4254064C9532380220564CC4F_$E5600CD80BBC10BE76C4DF662C356128 auth_alg; sta_info *sta; sta = ap_get_sta(hapd, mgmt->da); if (!sta) { wpa_printf(2, ...
static void handle_auth_cb(struct hostapd_data *hapd, const struct ieee80211_mgmt *mgmt, size_t len, int ok) { u16 auth_alg, auth_transaction, status_code; struct sta_info *sta; bool success_status; sta = ap_get_sta(hapd, mgmt->da); if (!sta) { wpa_pr...
handle_auth_cb
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void handle_auth_ft_finish(void *ctx, const u8 *dst, const u8 *bssid, u16 auth_transaction, u16 status, const u8 *ies, size_t ies_len) { int reply_res; sta_info *sta; reply_res = send_auth_reply((hostapd_data *)ctx, 0, dst, bssid, 2u, auth_transaction, ...
static void handle_auth_ft_finish(void *ctx, const u8 *dst, const u8 *bssid, u16 auth_transaction, u16 status, const u8 *ies, size_t ies_len) { struct hostapd_data *hapd = ctx; struct sta_info *sta; int reply_res; reply_res = send_auth_r...
handle_auth_ft_finish
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void handle_auth_sae(hostapd_data *hapd, sta_info *sta, const ieee80211_mgmt *mgmt, size_t len, u16 auth_transaction, u16 status_code) { const char *v6; u16 v7; u16 v8; sae_temporary_data *tmp; u16 v10; _BOOL4 v11; const char *v12; const char *v13; size_t v14;...
static void handle_auth_sae(struct hostapd_data *hapd, struct sta_info *sta, const struct ieee80211_mgmt *mgmt, size_t len, u16 auth_transaction, u16 status_code) { int resp = WLAN_STATUS_SUCCESS; struct wpabuf *data = NULL; int *groups = hapd->conf->sae_gro...
handle_auth_sae
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void handle_beacon(hostapd_data *hapd, const ieee80211_mgmt *mgmt, size_t len, hostapd_frame_info *fi) { ieee802_11_elems elems; unsigned long v6; v6 = __readfsqword(0x28u); if (len > 0x23) { ieee802_11_parse_elems(&mgmt->u.action.u.ft_action_req.target_ap_addr[4], ...
static void handle_beacon(struct hostapd_data *hapd, const struct ieee80211_mgmt *mgmt, size_t len, struct hostapd_frame_info *fi) { struct ieee802_11_elems elems; if (len < IEEE80211_HDRLEN + sizeof(mgmt->u.beacon)) { wpa_printf(MSG_INFO, "handle_beacon - to...
handle_beacon
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void handle_deauth(hostapd_data *hapd, const ieee80211_mgmt *mgmt, size_t len) { sta_info *sta; if (len > 0x19) { wpa_msg( hapd->msg_ctx, 2, "deauthentication: STA=%02x:%02x:%02x:%02x:%02x:%02x reason_code=%d", mgmt->sa[0], mgmt->sa[1], mgmt->sa[2], mgmt->sa[3], mgmt->sa[4], mgm...
static void handle_deauth(struct hostapd_data *hapd, const struct ieee80211_mgmt *mgmt, size_t len) { struct sta_info *sta; if (len < IEEE80211_HDRLEN + sizeof(mgmt->u.deauth)) { wpa_msg(hapd->msg_ctx, MSG_DEBUG, "handle_deauth - too short " "payload (len=%lu)"...
handle_deauth
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void handle_deauth_cb(hostapd_data *hapd, const ieee80211_mgmt *mgmt, size_t len, int ok) { sta_info *sta; if (!is_multicast_ether_addr_6(mgmt->da)) { sta = ap_get_sta(hapd, mgmt->da); if (sta) { if (ok) wpa_printf(2, "STA %02x:%02x:%02x:%02x:%02x:%02x acknowledged deaut...
static void handle_deauth_cb(struct hostapd_data *hapd, const struct ieee80211_mgmt *mgmt, size_t len, int ok) { struct sta_info *sta; if (is_multicast_ether_addr(mgmt->da)) return; sta = ap_get_sta(hapd, mgmt->da); if (!sta) { wpa_printf(MSG_DEB...
handle_deauth_cb
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void handle_disassoc(hostapd_data *hapd, const ieee80211_mgmt *mgmt, size_t len) { sta_info *sta; if (len > 0x19) { wpa_printf( 2, "disassocation: STA=%02x:%02x:%02x:%02x:%02x:%02x reason_code=%d", mgmt->sa[0], mgmt->sa[1], mgmt->sa[2], mgmt->sa[3], mgmt->sa[4], mgm...
static void handle_disassoc(struct hostapd_data *hapd, const struct ieee80211_mgmt *mgmt, size_t len) { struct sta_info *sta; if (len < IEEE80211_HDRLEN + sizeof(mgmt->u.disassoc)) { wpa_printf(MSG_INFO, "handle_disassoc - too short payload (len=%lu)", (unsigned long)...
handle_disassoc
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void handle_disassoc_cb(hostapd_data *hapd, const ieee80211_mgmt *mgmt, size_t len, int ok) { sta_info *sta; if (!is_multicast_ether_addr_6(mgmt->da)) { sta = ap_get_sta(hapd, mgmt->da); if (sta) { if (ok) wpa_printf(2, "STA %02x:%02x:%02x:%02x:%02x:%02x acknowledged d...
static void handle_disassoc_cb(struct hostapd_data *hapd, const struct ieee80211_mgmt *mgmt, size_t len, int ok) { struct sta_info *sta; if (is_multicast_ether_addr(mgmt->da)) return; sta = ap_get_sta(hapd, mgmt->da); if (!sta) { wpa_printf(M...
handle_disassoc_cb
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void handle_dump_state(int sig, void *signal_ctx) { ; }
static void handle_dump_state(int sig, void *signal_ctx) {}
handle_dump_state
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void handle_eap(hostapd_data *hapd, sta_info *sta, u8 *buf, size_t len) { int v4; const char *v5; int v6; u16 eap_len; if (len > 3) { eap_len = _bswap_16_0(*((_WORD *)buf + 1)); v4 = buf[1]; v5 = eap_code_str(*buf); wpa_printf(2, "EAP: code=%d (%s) identifier=%d length=%d", *buf, v5, v4, ...
static void handle_eap(struct hostapd_data *hapd, struct sta_info *sta, u8 *buf, size_t len) { struct eap_hdr *eap; u16 eap_len; if (len < sizeof(*eap)) { wpa_printf(MSG_INFO, " too short EAP packet"); return; } eap = (struct eap_hdr *)buf; eap_len = be_to_host16(eap->len...
handle_eap
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void handle_eap_initiate(hostapd_data *hapd, sta_info *sta, eap_hdr *eap, size_t len) { int code; __uint16_t v5; eap_eapol_interface *eap_if; eapol_state_machine *sm; sm = sta->eapol_sm; if (sm) { if (len > 4) { code = eap[1].code; v5 = _bswap_16_0(eap->length); ...
static void handle_eap_initiate(struct hostapd_data *hapd, struct sta_info *sta, struct eap_hdr *eap, size_t len) { #ifdef CONFIG_ERP u8 type, *data; struct eapol_state_machine *sm = sta->eapol_sm; if (!sm) return; if (len < sizeof(*eap) + 1) { wpa_printf(MSG_INFO, "%s:...
handle_eap_initiate
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void handle_eap_response(hostapd_data *hapd, sta_info *sta, eap_hdr *eap, size_t len) { const char *name; __uint16_t v5; eap_eapol_interface *eap_if; u8 type; eapol_state_machine *sm; eap_hdr *data; sm = sta->eapol_sm; if (sm) { data = eap + 1; if (len > 4) { type...
static void handle_eap_response(struct hostapd_data *hapd, struct sta_info *sta, struct eap_hdr *eap, size_t len) { u8 type, *data; struct eapol_state_machine *sm = sta->eapol_sm; if (!sm) return; data = (u8 *)(eap + 1); if (len < sizeof(*eap) + 1) { wpa_printf(MSG_I...
handle_eap_response
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void handle_eapol(int sock, void *eloop_ctx, void *sock_ctx) { int *v3; char *v4; socklen_t fromlen; int len; wpa_driver_nl80211_data *drv; sockaddr_ll lladdr; unsigned char buf[3000]; unsigned long v10; v10 = __readfsqword(0x28u); drv = (wpa_driver_nl80211_data *)eloop_ctx; fromlen = 20; len =...
static void handle_eapol(int sock, void *eloop_ctx, void *sock_ctx) { struct wpa_driver_nl80211_data *drv = eloop_ctx; struct sockaddr_ll lladdr; unsigned char buf[3000]; int len; socklen_t fromlen = sizeof(lladdr); len = recvfrom(sock, buf, sizeof(buf), 0, (struct sockaddr *)&lladdr, &fromlen); if...
handle_eapol
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void handle_monitor_read(int sock, void *eloop_ctx, void *sock_ctx) { int *v3; char *v4; int len; int datarate; int ssi_signal; int injected; int failed; int rxflags; int ret; ieee80211_radiotap_iterator iter; unsigned char buf[3000]; unsigned long v14; v14 = __readfsqword(0x28u); datarate ...
static void handle_monitor_read(int sock, void *eloop_ctx, void *sock_ctx) { struct wpa_driver_nl80211_data *drv = eloop_ctx; int len; unsigned char buf[3000]; struct ieee80211_radiotap_iterator iter; int ret; int datarate = 0, ssi_signal = 0; int injected = 0, failed = 0, rxflags = 0; len = recv(sock,...
handle_monitor_read
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void handle_ndisc(void *ctx, const u8 *src_addr, const u8 *buf, size_t len) { int v4; long v5; int res; icmpv6_ndmsg *msg; sta_info *sta; in6_addr saddr; char addrtxt[56]; unsigned long v11; v11 = __readfsqword(0x28u); if (len <= 0x3D) return; msg = (icmpv6_ndmsg *)(buf + 14); v4 = buf[54];...
static void handle_ndisc(void *ctx, const u8 *src_addr, const u8 *buf, size_t len) { struct hostapd_data *hapd = ctx; struct icmpv6_ndmsg *msg; struct in6_addr saddr; struct sta_info *sta; int res; char addrtxt[INET6_ADDRSTRLEN + 1]; if (len < ETH_HLEN + sizeof(struct ip6_hdr) + ...
handle_ndisc
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void handle_probe_req(hostapd_data *hapd, const ieee80211_mgmt *mgmt, size_t len, int ssi_signal) { const char *v4; int v5; int v6; int v7; int v8; const char *v9; _BOOL4 v10; unsigned int cs_c_off_proberesp; size_t v12; unsigned int cs_c_off_ecsa_proberesp; size_t v14; u16...
void handle_probe_req(struct hostapd_data *hapd, const struct ieee80211_mgmt *mgmt, size_t len, int ssi_signal) { u8 *resp; struct ieee802_11_elems elems; const u8 *ie; size_t ie_len; size_t i, resp_len; int noack; enum ssid_match_result res; int ret; u16 cs...
handle_probe_req
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void handle_reload(int sig, void *signal_ctx) { wpa_printf(2, "Signal %d received - reloading configuration", sig); hostapd_for_each_interface( (hapd_interfaces *)signal_ctx, (int (*)(hostapd_iface *, void *))handle_reload_iface, 0); }
static void handle_reload(int sig, void *signal_ctx) { struct hapd_interfaces *interfaces = signal_ctx; wpa_printf(MSG_DEBUG, "Signal %d received - reloading configuration", sig); hostapd_for_each_interface(interfaces, handle_reload_iface, NULL); }
handle_reload
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int handle_reload_iface(hostapd_iface *iface, void *ctx) { if (hostapd_reload_config(iface) < 0) wpa_printf(4, "Failed to read new configuration file - continuing with old."); return 0; }
static int handle_reload_iface(struct hostapd_iface *iface, void *ctx) { if (hostapd_reload_config(iface) < 0) { wpa_printf(MSG_WARNING, "Failed to read new configuration " "file - continuing with old."); } return 0; }
handle_reload_iface
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void handle_term(int sig, void *signal_ctx) { wpa_printf(2, "Signal %d received - terminating", sig); eloop_terminate(); }
static void handle_term(int sig, void *signal_ctx) { wpa_printf(MSG_DEBUG, "Signal %d received - terminating", sig); eloop_terminate(); }
handle_term
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void hapd_new_ap_event(hostapd_data *hapd, const u8 *attr, size_t attr_len) { size_t blen; char *buf; blen = 2 * attr_len + 1; buf = (char *)malloc(blen); if (buf) { wpa_snprintf_hex(buf, blen, attr, attr_len); wpa_msg(hapd->msg_ctx, 3, "WPS-NEW-AP-SETTINGS %s", buf); free(buf); } }
static void hapd_new_ap_event(struct hostapd_data *hapd, const u8 *attr, size_t attr_len) { size_t blen = attr_len * 2 + 1; char *buf = os_malloc(blen); if (buf) { wpa_snprintf_hex(buf, blen, attr, attr_len); wpa_msg(hapd->msg_ctx, MSG_INFO, WPS_EVENT_NEW_AP_SETTINGS "%s", bu...
hapd_new_ap_event
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int hapd_wps_cred_cb(hostapd_data *hapd, void *ctx) { size_t v3; const u8 *v4; wps_context *wps; int *v6; char *v7; int multi_bss; int wpa; int pmf_changed; int sae; size_t i; size_t ia; size_t ib; size_t ic; char *prefix; char *prefixa; wpabuf *attr; size_t len; char *tmp_fname; F...
static int hapd_wps_cred_cb(struct hostapd_data *hapd, void *ctx) { const struct wps_credential *cred = ctx; FILE *oconf, *nconf; size_t len, i; char *tmp_fname; char buf[1024]; int multi_bss; int wpa; int pmf_changed = 0; if (hapd->wps == NULL) return 0; wpa_hexdump_key(MSG_DEBUG, "WPS: Recei...
hapd_wps_cred_cb
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int hapd_wps_reconfig_in_memory(hostapd_data *hapd, const wps_credential *cred) { int v2; int wpa_key_mgmt; hostapd_bss_config *bss; bss = hapd->conf; wpa_printf(2, "WPS: Updating in-memory configuration"); bss->wps_state = 2; if (cred->ssid_len <= 0x20) { memcpy(&bss-...
static int hapd_wps_reconfig_in_memory(struct hostapd_data *hapd, const struct wps_credential *cred) { struct hostapd_bss_config *bss = hapd->conf; wpa_printf(MSG_DEBUG, "WPS: Updating in-memory configuration"); bss->wps_state = 2; if (cred->ssid_len <= SSID_MAX_LEN) { ...
hapd_wps_reconfig_in_memory
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int have_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_reason == drv->if_indices[i].reason || ifidx_reason == -1)) return 1; } return 0; }
static int have_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 && (drv->if_indices[i].reason == ifidx_reason || ifidx_reason == IFIDX_ANY)) return 1; ...
have_ifidx
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int hkdf_expand(size_t hash_len, const u8 *prk, size_t prk_len, const char *info, u8 *okm, size_t okm_len) { size_t info_len; info_len = strlen(info); switch (hash_len) { case ' ': return hmac_sha256_kdf(prk, prk_len, 0, (const u8 *)info, info_len, okm, okm_len); ...
static int hkdf_expand(size_t hash_len, const u8 *prk, size_t prk_len, const char *info, u8 *okm, size_t okm_len) { size_t info_len = os_strlen(info); if (hash_len == 32) return hmac_sha256_kdf(prk, prk_len, NULL, (const u8 *)info, info_len, okm, okm_len); #ifd...
hkdf_expand
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int hkdf_extract(size_t hash_len, const u8 *salt, size_t salt_len, size_t num_elem, const u8 **addr, const size_t *len, u8 *prk) { switch (hash_len) { case ' ': return hmac_sha256_vector(salt, salt_len, num_elem, addr, len, prk); case '0': return hmac_sha384_vector(salt, salt_len, num_ele...
static int hkdf_extract(size_t hash_len, const u8 *salt, size_t salt_len, size_t num_elem, const u8 *addr[], const size_t len[], u8 *prk) { if (hash_len == 32) return hmac_sha256_vector(salt, salt_len, num_elem, addr, len, prk); #ifdef CONFIG_SHA384 if (hash_len =...
hkdf_extract
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int hmac_sha256_kdf(const u8 *secret, size_t secret_len, const char *label, const u8 *seed, size_t seed_len, u8 *out, size_t outlen) { u8 iter; size_t pos; size_t clen; const unsigned char *addr[4]; size_t len[4]; u8 T[40]; unsigned long v17; v17 = __readfsqword(0x28u); iter = 1; ...
int hmac_sha256_kdf(const u8 *secret, size_t secret_len, const char *label, const u8 *seed, size_t seed_len, u8 *out, size_t outlen) { u8 T[SHA256_MAC_LEN]; u8 iter = 1; const unsigned char *addr[4]; size_t len[4]; size_t pos, clen; addr[0] = T; len[0] = SHA256_MAC_LEN; if (label) {...
hmac_sha256_kdf
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int hmac_sha256_vector(const u8 *key, size_t key_len, size_t num_elem, const u8 **addr, const size_t *len, u8 *mac) { const EVP_MD *v6; v6 = (const EVP_MD *)EVP_sha256(key, key_len); return openssl_hmac_vector(v6, key, key_len, num_elem, addr, len, mac, 0x20u); }
int hmac_sha256_vector(const u8 *key, size_t key_len, size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac) { return openssl_hmac_vector(EVP_sha256(), key, key_len, num_elem, addr, len, mac, 32); }
hmac_sha256_vector
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int hmac_sha384_kdf(const u8 *secret, size_t secret_len, const char *label, const u8 *seed, size_t seed_len, u8 *out, size_t outlen) { u8 iter; size_t pos; size_t clen; const unsigned char *addr[4]; size_t len[4]; u8 T[56]; unsigned long v17; v17 = __readfsqword(0x28u); iter = 1; ...
int hmac_sha384_kdf(const u8 *secret, size_t secret_len, const char *label, const u8 *seed, size_t seed_len, u8 *out, size_t outlen) { u8 T[SHA384_MAC_LEN]; u8 iter = 1; const unsigned char *addr[4]; size_t len[4]; size_t pos, clen; addr[0] = T; len[0] = SHA384_MAC_LEN; if (label) {...
hmac_sha384_kdf
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int hmac_sha512_kdf(const u8 *secret, size_t secret_len, const char *label, const u8 *seed, size_t seed_len, u8 *out, size_t outlen) { u8 iter; size_t pos; size_t clen; const unsigned char *addr[4]; size_t len[4]; u8 T[72]; unsigned long v17; v17 = __readfsqword(0x28u); iter = 1; ...
int hmac_sha512_kdf(const u8 *secret, size_t secret_len, const char *label, const u8 *seed, size_t seed_len, u8 *out, size_t outlen) { u8 T[SHA512_MAC_LEN]; u8 iter = 1; const unsigned char *addr[4]; size_t len[4]; size_t pos, clen; addr[0] = T; len[0] = SHA512_MAC_LEN; if (label) {...
hmac_sha512_kdf
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void hostap_driver_deinit(void *priv) { netlink_deinit(*((netlink_data **)priv + 5)); hostap_set_iface_flags(priv, 0); hostap_ioctl_prism2param(priv, 34, 0); hostap_ioctl_prism2param(priv, 35, 0); if (*((int *)priv + 8) >= 0) close(*((_DWORD *)priv + 8)); if (*((int *)priv + 7) >= 0) close(*((_DWORD...
static void hostap_driver_deinit(void *priv) { struct hostap_driver_data *drv = priv; netlink_deinit(drv->netlink); (void)hostap_set_iface_flags(drv, 0); (void)hostap_ioctl_prism2param(drv, PRISM2_PARAM_HOSTAPD, 0); (void)hostap_ioctl_prism2param(drv, PRISM2_PARAM_HOSTAPD_STA, 0); if (drv->ioctl_sock >= 0...
hostap_driver_deinit
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int hostap_flush(void *priv) { prism2_hostapd_param param; unsigned long v3; v3 = __readfsqword(0x28u); memset(&param, 0, sizeof(param)); param.cmd = 1; return hostapd_ioctl(priv, &param, 48); }
static int hostap_flush(void *priv) { struct hostap_driver_data *drv = priv; struct prism2_hostapd_param param; memset(&param, 0, sizeof(param)); param.cmd = PRISM2_HOSTAPD_FLUSH; return hostapd_ioctl(drv, &param, sizeof(param)); }
hostap_flush
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
hostapd_hw_modes *hostap_get_hw_feature_data(void *priv, u16 *num_modes, u16 *flags, u8 *dfs) { int i; int rlen; hostapd_hw_modes *mode; short chan2freq[20]; unsigned long v11; v11 = __readfsqword(0x28u); chan2freq[0] = 2412; chan2freq[1] = 2417; chan2freq...
static struct hostapd_hw_modes * hostap_get_hw_feature_data(void *priv, u16 *num_modes, u16 *flags, u8 *dfs) { struct hostapd_hw_modes *mode; int i, clen, rlen; const short chan2freq[14] = {2412, 2417, 2422, 2427, 2432, 2437, 2442, 2447, 2452, 2457, 2462, 2467, 2472, 2484}; mode ...
hostap_get_hw_feature_data
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int hostap_get_inact_sec(void *priv, const u8 *addr) { prism2_hostapd_param param; unsigned long v4; v4 = __readfsqword(0x28u); memset(&param, 0, sizeof(param)); param.cmd = 4; *(_DWORD *)param.sta_addr = *(_DWORD *)addr; *(_WORD *)&param.sta_addr[4] = *((_WORD *)addr + 2); if (hostapd_ioctl(priv, &par...
static int hostap_get_inact_sec(void *priv, const u8 *addr) { struct hostap_driver_data *drv = priv; struct prism2_hostapd_param param; memset(&param, 0, sizeof(param)); param.cmd = PRISM2_HOSTAPD_GET_INFO_STA; memcpy(param.sta_addr, addr, ETH_ALEN); if (hostapd_ioctl(drv, &param, sizeof(param))) { ret...
hostap_get_inact_sec
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int hostap_get_seqnum(const char *ifname, void *priv, const u8 *addr, int idx, u8 *seq) { u8 idxa; int ret; prism2_hostapd_param *buf; idxa = idx; ret = 0; buf = (prism2_hostapd_param *)os_zalloc(0x50u); if (!buf) return -1; buf->cmd = 7; if (addr) memcpy(buf->sta_addr, ...
static int hostap_get_seqnum(const char *ifname, void *priv, const u8 *addr, int idx, u8 *seq) { struct hostap_driver_data *drv = priv; struct prism2_hostapd_param *param; u8 *buf; size_t blen; int ret = 0; blen = sizeof(*param) + 32; buf = os_zalloc(blen); if (buf == NULL)...
hostap_get_seqnum
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int hostap_get_we_version(hostap_driver_data *drv) { int *v2; char *v3; iw_range *range; iwreq iwr; unsigned long v6; v6 = __readfsqword(0x28u); drv->we_version = 0; range = (iw_range *)os_zalloc(0x42Cu); if (!range) return -1; memset(&iwr, 0, sizeof(iwr)); os_strlcpy(iwr.ifr_ifrn.ifrn_name, ...
static int hostap_get_we_version(struct hostap_driver_data *drv) { struct iw_range *range; struct iwreq iwr; int minlen; size_t buflen; drv->we_version = 0; buflen = sizeof(struct iw_range) + 500; range = os_zalloc(buflen); if (range == NULL) return -1; memset(&iwr, 0, sizeof(iwr)); os_strlcp...
hostap_get_we_version
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void *hostap_init(hostapd_data *hapd, wpa_init_params *params) { int *v3; char *v4; hostap_driver_data *drv; drv = (hostap_driver_data *)os_zalloc(0x58u); if (drv) { drv->hapd = hapd; drv->sock = -1; drv->ioctl_sock = drv->sock; memcpy(drv->iface, params->ifname, sizeof(drv->iface)); drv-...
static void *hostap_init(struct hostapd_data *hapd, struct wpa_init_params *params) { struct hostap_driver_data *drv; drv = os_zalloc(sizeof(struct hostap_driver_data)); if (drv == NULL) { printf("Could not allocate memory for hostapd driver data\n"); return NULL; } drv->hap...
hostap_init
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int hostap_init_sockets(hostap_driver_data *drv, u8 *own_addr) { uint16_t v2; int *v3; char *v4; int *v6; char *v7; int *v8; char *v9; sockaddr_ll addr; ifreq ifr; unsigned long v12; v12 = __readfsqword(0x28u); v2 = htons(3u); drv->sock = socket(17, 3, v2); if (drv->sock >= 0) { if (elo...
static int hostap_init_sockets(struct hostap_driver_data *drv, u8 *own_addr) { struct ifreq ifr; struct sockaddr_ll addr; drv->sock = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL)); if (drv->sock < 0) { wpa_printf(MSG_ERROR, "socket[PF_PACKET,SOCK_RAW]: %s", strerror(errno)); return -1; } if (eloop...
hostap_init_sockets
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int hostap_ioctl_prism2param(void *priv, int param, int value) { int *v3; char *v4; iwreq iwr; unsigned long v8; v8 = __readfsqword(0x28u); memset(&iwr, 0, sizeof(iwr)); os_strlcpy(iwr.ifr_ifrn.ifrn_name, (const char *)priv + 8, 0x10u); iwr.u.essid.pointer = (void *)__PAIR64__(value, param); if (ioct...
static int hostap_ioctl_prism2param(void *priv, int param, int value) { struct hostap_driver_data *drv = priv; struct iwreq iwr; int *i; memset(&iwr, 0, sizeof(iwr)); os_strlcpy(iwr.ifr_name, drv->iface, IFNAMSIZ); i = (int *)iwr.u.name; *i++ = param; *i++ = value; if (ioctl(drv->ioctl_sock, PRISM2_...
hostap_ioctl_prism2param
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int hostap_read_sta_data(void *priv, hostap_sta_driver_data *data, const u8 *addr) { FILE *f; char *pos; unsigned long val; char line[128]; char buf[1032]; unsigned long v10; v10 = __readfsqword(0x28u); memset(data, 0, sizeof(hostap_sta_driver_data)); snprintf(buf, 0x400u, "/...
static int hostap_read_sta_data(void *priv, struct hostap_sta_driver_data *data, const u8 *addr) { struct hostap_driver_data *drv = priv; char buf[1024], line[128], *pos; FILE *f; unsigned long val; memset(data, 0, sizeof(*data)); snprintf(buf, sizeof(buf), "/proc/net/hostap...
hostap_read_sta_data
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int hostap_send_eapol(void *priv, const u8 *addr, const u8 *data, size_t data_len, int encrypt, const u8 *own_addr, u32 flags) { int *v8; char *v9; int *v10; int res; size_t len; ieee80211_hdr *hdr; len = data_len + 32; hdr = (ieee80211_hdr *)os_zalloc(data_l...
static int hostap_send_eapol(void *priv, const u8 *addr, const u8 *data, size_t data_len, int encrypt, const u8 *own_addr, u32 flags) { struct hostap_driver_data *drv = priv; struct ieee80211_hdr *hdr; size_t len; u8 *pos; int res; len = sizeof(*hdr...
hostap_send_eapol
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int hostap_send_mlme(void *priv, const u8 *msg, size_t len, int noack, unsigned int freq, const u16 *csa_offs, size_t csa_offs_len, int no_encrypt, unsigned int wait) { int result; *(_WORD *)msg |= 2u; result = send(*((_DWORD *)priv + 7), msg, len, 0); *(_WORD *)msg &=...
static int hostap_send_mlme(void *priv, const u8 *msg, size_t len, int noack, unsigned int freq, const u16 *csa_offs, size_t csa_offs_len, int no_encrypt, unsigned int wait) { struct hostap_driver_data *drv = priv; struct ieee80211_...
hostap_send_mlme
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int hostap_set_ap_wps_ie(void *priv, const wpabuf *beacon, const wpabuf *proberesp, const wpabuf *assocresp) { size_t v4; const void *v5; free(*((void **)priv + 9)); *((_QWORD *)priv + 9) = 0; *((_QWORD *)priv + 10) = 0; if (proberesp) { v4 = wpabuf_len_19(proberesp); v5 = ...
static int hostap_set_ap_wps_ie(void *priv, const struct wpabuf *beacon, const struct wpabuf *proberesp, const struct wpabuf *assocresp) { struct hostap_driver_data *drv = priv; os_free(drv->wps_ie); drv->wps_ie = NULL; drv->wps_ie_len = 0; if (...
hostap_set_ap_wps_ie
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int hostap_set_freq(void *priv, hostapd_freq_params *freq) { int *v2; char *v3; iwreq iwr; unsigned long v6; v6 = __readfsqword(0x28u); memset(&iwr, 0, sizeof(iwr)); os_strlcpy(iwr.ifr_ifrn.ifrn_name, (const char *)priv + 8, 0x10u); iwr.u.nwid.value = freq->channel; iwr.u.freq.e = 0; if (ioctl(*((_...
static int hostap_set_freq(void *priv, struct hostapd_freq_params *freq) { struct hostap_driver_data *drv = priv; struct iwreq iwr; os_memset(&iwr, 0, sizeof(iwr)); os_strlcpy(iwr.ifr_name, drv->iface, IFNAMSIZ); iwr.u.freq.m = freq->channel; iwr.u.freq.e = 0; if (ioctl(drv->ioctl_sock, SIOCSIWFREQ, &iw...
hostap_set_freq
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int hostap_set_generic_elem(void *priv, const u8 *elem, size_t elem_len) { free(*((void **)priv + 7)); *((_QWORD *)priv + 7) = 0; *((_QWORD *)priv + 8) = 0; if (elem) { *((_QWORD *)priv + 7) = os_memdup(elem, elem_len); if (!*((_QWORD *)priv + 7)) return -1; *((_QWORD *)priv + 8) = elem_len; ...
static int hostap_set_generic_elem(void *priv, const u8 *elem, size_t elem_len) { struct hostap_driver_data *drv = priv; os_free(drv->generic_ie); drv->generic_ie = NULL; drv->generic_ie_len = 0; if (elem) { drv->generic_ie = os_memdup(elem, elem_len); if (drv->gene...
hostap_set_generic_elem
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0