Home
last modified time | relevance | path

Searched refs:u (Results 1 – 25 of 86) sorted by relevance

1234

/hostap-latest/src/crypto/
Dcrypto_internal-cipher.c39 } u; member
57 if (key_len > sizeof(ctx->u.rc4.key)) { in crypto_cipher_init()
61 ctx->u.rc4.keylen = key_len; in crypto_cipher_init()
62 os_memcpy(ctx->u.rc4.key, key, key_len); in crypto_cipher_init()
65 ctx->u.aes.ctx_enc = aes_encrypt_init(key, key_len); in crypto_cipher_init()
66 if (ctx->u.aes.ctx_enc == NULL) { in crypto_cipher_init()
70 ctx->u.aes.ctx_dec = aes_decrypt_init(key, key_len); in crypto_cipher_init()
71 if (ctx->u.aes.ctx_dec == NULL) { in crypto_cipher_init()
72 aes_encrypt_deinit(ctx->u.aes.ctx_enc); in crypto_cipher_init()
76 os_memcpy(ctx->u.aes.cbc, iv, AES_BLOCK_SIZE); in crypto_cipher_init()
[all …]
Dcrypto_internal.c33 } u; member
55 MD5Init(&ctx->u.md5); in crypto_hash_init()
58 SHA1Init(&ctx->u.sha1); in crypto_hash_init()
62 sha256_init(&ctx->u.sha256); in crypto_hash_init()
67 sha384_init(&ctx->u.sha384); in crypto_hash_init()
72 sha512_init(&ctx->u.sha512); in crypto_hash_init()
77 MD5Init(&ctx->u.md5); in crypto_hash_init()
78 MD5Update(&ctx->u.md5, key, key_len); in crypto_hash_init()
79 MD5Final(tk, &ctx->u.md5); in crypto_hash_init()
91 MD5Init(&ctx->u.md5); in crypto_hash_init()
[all …]
Dcrypto_libtomcrypt.c150 } u; member
167 if (md5_init(&ctx->u.md) != CRYPT_OK) in crypto_hash_init()
171 if (sha1_init(&ctx->u.md) != CRYPT_OK) in crypto_hash_init()
175 if (hmac_init(&ctx->u.hmac, find_hash("md5"), key, key_len) != in crypto_hash_init()
180 if (hmac_init(&ctx->u.hmac, find_hash("sha1"), key, key_len) != in crypto_hash_init()
202 ctx->error = md5_process(&ctx->u.md, data, len) != CRYPT_OK; in crypto_hash_update()
205 ctx->error = sha1_process(&ctx->u.md, data, len) != CRYPT_OK; in crypto_hash_update()
209 ctx->error = hmac_process(&ctx->u.hmac, data, len) != CRYPT_OK; in crypto_hash_update()
241 if (md5_done(&ctx->u.md, mac) != CRYPT_OK) in crypto_hash_finish()
251 if (sha1_done(&ctx->u.md, mac) != CRYPT_OK) in crypto_hash_finish()
[all …]
/hostap-latest/src/ap/
Dwnm_ap.c169 mgmt->u.action.category = WLAN_ACTION_WNM; in ieee802_11_send_wnmsleep_resp()
170 mgmt->u.action.u.wnm_sleep_resp.action = WNM_SLEEP_MODE_RESP; in ieee802_11_send_wnmsleep_resp()
171 mgmt->u.action.u.wnm_sleep_resp.dialogtoken = dialog_token; in ieee802_11_send_wnmsleep_resp()
172 pos = (u8 *)mgmt->u.action.u.wnm_sleep_resp.variable; in ieee802_11_send_wnmsleep_resp()
177 mgmt->u.action.u.wnm_sleep_resp.keydata_len = 0; in ieee802_11_send_wnmsleep_resp()
203 &mgmt->u.action.u.wnm_sleep_resp.keydata_len, in ieee802_11_send_wnmsleep_resp()
219 len = 1 + sizeof(mgmt->u.action.u.wnm_sleep_resp) + gtk_elem_len + in ieee802_11_send_wnmsleep_resp()
226 mgmt->da, &mgmt->u.action.category, len); in ieee802_11_send_wnmsleep_resp()
405 mgmt->u.action.category = WLAN_ACTION_WNM; in ieee802_11_send_bss_trans_mgmt_request()
406 mgmt->u.action.u.bss_tm_req.action = WNM_BSS_TRANS_MGMT_REQ; in ieee802_11_send_bss_trans_mgmt_request()
[all …]
Dwmm.c188 m->u.action.u.wmm_action.variable; in wmm_send_action()
200 m->u.action.category = WLAN_ACTION_WMM; in wmm_send_action()
201 m->u.action.u.wmm_action.action_code = action_code; in wmm_send_action()
202 m->u.action.u.wmm_action.dialog_token = dialogue_token; in wmm_send_action()
203 m->u.action.u.wmm_action.status_code = status_code; in wmm_send_action()
302 mgmt->u.action.u.wmm_action.dialog_token, in wmm_addts_req()
310 mgmt->u.action.u.wmm_action.dialog_token, res); in wmm_addts_req()
363 action_code = mgmt->u.action.u.wmm_action.action_code; in hostapd_wmm_action()
Drrm.c103 token = mgmt->u.action.u.rrm.dialog_token; in hostapd_handle_radio_msmt_report()
104 pos = mgmt->u.action.u.rrm.variable; in hostapd_handle_radio_msmt_report()
296 token = mgmt->u.action.u.rrm.dialog_token; in hostapd_handle_nei_report_req()
297 pos = mgmt->u.action.u.rrm.variable; in hostapd_handle_nei_report_req()
358 pos = mgmt->u.action.u.rrm.variable; in hostapd_handle_link_mesr_report()
397 mgmt->u.action.u.rrm.action, MAC2STR(mgmt->sa)); in hostapd_handle_radio_measurement()
399 switch (mgmt->u.action.u.rrm.action) { in hostapd_handle_radio_measurement()
411 mgmt->u.action.u.rrm.action); in hostapd_handle_radio_measurement()
724 mgmt->u.action.u.rrm.dialog_token, ok); in hostapd_rrm_beacon_req_tx_status()
Dieee802_11_shared.c132 mgmt->u.action.category = WLAN_ACTION_SA_QUERY; in ieee802_11_send_sa_query_req()
133 mgmt->u.action.u.sa_query_req.action = WLAN_SA_QUERY_REQUEST; in ieee802_11_send_sa_query_req()
134 os_memcpy(mgmt->u.action.u.sa_query_req.trans_id, trans_id, in ieee802_11_send_sa_query_req()
136 end = mgmt->u.action.u.sa_query_req.variable; in ieee802_11_send_sa_query_req()
230 resp->u.action.category = WLAN_ACTION_SA_QUERY; in ieee802_11_send_sa_query_resp()
231 resp->u.action.u.sa_query_req.action = WLAN_SA_QUERY_RESPONSE; in ieee802_11_send_sa_query_resp()
232 os_memcpy(resp->u.action.u.sa_query_req.trans_id, trans_id, in ieee802_11_send_sa_query_resp()
234 end = resp->u.action.u.sa_query_req.variable; in ieee802_11_send_sa_query_resp()
257 const u8 action_type = mgmt->u.action.u.sa_query_resp.action; in ieee802_11_sa_query_action()
258 const u8 *trans_id = mgmt->u.action.u.sa_query_resp.trans_id; in ieee802_11_sa_query_action()
[all …]
Dvlan_ioctl.c93 if_request.u.VID == vid) { in vlan_add()
97 os_strncmp(if_request.u.device2, if_name, in vlan_add()
98 sizeof(if_request.u.device2)) == 0) { in vlan_add()
111 if_request.u.VID = vid; in vlan_add()
143 if_request.u.name_type = name_type; in vlan_set_name_type()
Dieee802_11.c426 rlen = IEEE80211_HDRLEN + sizeof(reply->u.auth) + ies_len; in send_auth_reply()
442 reply->u.auth.auth_alg = host_to_le16(auth_alg); in send_auth_reply()
443 reply->u.auth.auth_transaction = host_to_le16(auth_transaction); in send_auth_reply()
444 reply->u.auth.status_code = host_to_le16(resp); in send_auth_reply()
447 os_memcpy(reply->u.auth.variable, ies, ies_len); in send_auth_reply()
451 os_memcpy(reply->u.auth.variable + ies_len, in send_auth_reply()
1324 pos = mgmt->u.auth.variable; in handle_auth_sae()
1382 pos = mgmt->u.auth.variable; in handle_auth_sae()
1457 pos = mgmt->u.auth.variable; in handle_auth_sae()
1475 resp = sae_parse_commit(sta->sae, mgmt->u.auth.variable, in handle_auth_sae()
[all …]
Dfils_hlp.c130 addr.sin_addr.s_addr = hapd->conf->dhcp_server.u.v4.s_addr; in fils_dhcp_request()
183 if (dhcp->relay_ip != hapd->conf->own_ip_addr.u.v4.s_addr) { in fils_dhcp_handler()
267 iph->ip_src.s_addr = hapd->conf->dhcp_server.u.v4.s_addr; in fils_dhcp_handler()
388 hapd->conf->dhcp_server.u.v4.s_addr == 0) { in fils_process_hlp_dhcp()
395 hapd->conf->own_ip_addr.u.v4.s_addr == 0) { in fils_process_hlp_dhcp()
416 hapd->conf->own_ip_addr.u.v4.s_addr; in fils_process_hlp_dhcp()
440 dhcp_msg->relay_ip = hapd->conf->own_ip_addr.u.v4.s_addr; in fils_process_hlp_dhcp()
443 addr.sin_addr.s_addr = hapd->conf->dhcp_server.u.v4.s_addr; in fils_process_hlp_dhcp()
Ddrv_callbacks.c1662 action = (u8 *) &mgmt->u.action.u; in hostapd_action_rx()
1665 mgmt->u.action.category, *action, in hostapd_action_rx()
1674 if (mgmt->u.action.category == WLAN_ACTION_FT) { in hostapd_action_rx()
1675 wpa_ft_action_rx(sta->wpa_sm, (u8 *) &mgmt->u.action, plen); in hostapd_action_rx()
1679 if (mgmt->u.action.category == WLAN_ACTION_SA_QUERY) { in hostapd_action_rx()
1684 if (mgmt->u.action.category == WLAN_ACTION_WNM) { in hostapd_action_rx()
1690 if (mgmt->u.action.category == WLAN_ACTION_FST && hapd->iface->fst) { in hostapd_action_rx()
1697 mgmt->u.action.category == WLAN_ACTION_PUBLIC && in hostapd_action_rx()
1698 mgmt->u.action.u.vs_public_action.action == in hostapd_action_rx()
1700 WPA_GET_BE24(mgmt->u.action.u.vs_public_action.oui) == in hostapd_action_rx()
[all …]
/hostap-latest/src/drivers/
Ddriver_wext.c50 iwr.u.param.flags = idx & IW_AUTH_INDEX; in wpa_driver_wext_set_auth_param()
51 iwr.u.param.value = value; in wpa_driver_wext_set_auth_param()
85 os_memcpy(bssid, iwr.u.ap_addr.sa_data, ETH_ALEN); in wpa_driver_wext_get_bssid()
105 iwr.u.ap_addr.sa_family = ARPHRD_ETHER; in wpa_driver_wext_set_bssid()
107 os_memcpy(iwr.u.ap_addr.sa_data, bssid, ETH_ALEN); in wpa_driver_wext_set_bssid()
109 os_memset(iwr.u.ap_addr.sa_data, 0, ETH_ALEN); in wpa_driver_wext_set_bssid()
134 iwr.u.essid.pointer = (caddr_t) ssid; in wpa_driver_wext_get_ssid()
135 iwr.u.essid.length = SSID_MAX_LEN; in wpa_driver_wext_get_ssid()
142 ret = iwr.u.essid.length; in wpa_driver_wext_get_ssid()
178 iwr.u.essid.flags = (ssid_len != 0); in wpa_driver_wext_set_ssid()
[all …]
Ddriver_hostap.c344 param.u.set_flags_sta.flags_or = flags_or; in hostap_sta_set_flags()
345 param.u.set_flags_sta.flags_and = flags_and; in hostap_sta_set_flags()
386 iwr.u.data.pointer = (caddr_t) param; in hostapd_ioctl()
387 iwr.u.data.length = len; in hostapd_ioctl()
427 os_strlcpy((char *) param->u.crypt.alg, "NONE", in wpa_driver_hostap_set_key()
431 os_strlcpy((char *) param->u.crypt.alg, "WEP", in wpa_driver_hostap_set_key()
435 os_strlcpy((char *) param->u.crypt.alg, "TKIP", in wpa_driver_hostap_set_key()
439 os_strlcpy((char *) param->u.crypt.alg, "CCMP", in wpa_driver_hostap_set_key()
446 param->u.crypt.flags = set_tx ? HOSTAP_CRYPT_FLAG_SET_TX_KEY : 0; in wpa_driver_hostap_set_key()
447 param->u.crypt.idx = key_idx; in wpa_driver_hostap_set_key()
[all …]
Ddriver_atheros.c189 iwr.u.mode = op; in get80211param()
194 *data = iwr.u.mode; in get80211param()
217 os_memcpy(iwr.u.name, data, len); in set80211priv()
224 iwr.u.data.pointer = data; in set80211priv()
225 iwr.u.data.length = len; in set80211priv()
246 iwr.u.mode = op; in set80211param()
247 os_memcpy(iwr.u.name + sizeof(__u32), &arg, sizeof(arg)); in set80211param()
824 iwr.u.data.pointer = (void *) &req; in atheros_set_qos_map()
825 iwr.u.data.length = sizeof(struct ieee80211req_athdbg); in atheros_set_qos_map()
912 if (len < IEEE80211_HDRLEN + sizeof(mgmt->u.assoc_req)) in atheros_raw_receive()
[all …]
Ddriver_hostap.h142 ((size_t) (&((struct prism2_hostapd_param *) 0)->u.rid.data))
144 ((size_t) (&((struct prism2_hostapd_param *) 0)->u.generic_elem.data))
195 } u; member
/hostap-latest/src/utils/
Dip_addr.c21 os_strlcpy(buf, inet_ntoa(addr->u.v4), buflen); in hostapd_ip_txt()
27 if (inet_ntop(AF_INET6, &addr->u.v6, buf, buflen) == NULL) in hostapd_ip_txt()
39 if (inet_aton(txt, &addr->u.v4)) { in hostapd_parse_ip_addr()
45 if (inet_pton(AF_INET6, txt, &addr->u.v6) > 0) { in hostapd_parse_ip_addr()
62 if (a->af == AF_INET && a->u.v4.s_addr == b->u.v4.s_addr) in hostapd_ip_equal()
67 os_memcmp(&a->u.v6, &b->u.v6, sizeof(a->u.v6)) == 0) in hostapd_ip_equal()
/hostap-latest/wlantest/
Drx_mgmt.c413 offset = mgmt->u.beacon.variable - data; in rx_mgmt_beacon()
421 bss->capab_info = le_to_host16(mgmt->u.beacon.capab_info); in rx_mgmt_beacon()
422 if (ieee802_11_parse_elems(mgmt->u.beacon.variable, len - offset, in rx_mgmt_beacon()
574 mme = get_ie(mgmt->u.beacon.variable, len - offset, WLAN_EID_MMIE); in rx_mgmt_beacon()
642 offset = mgmt->u.probe_resp.variable - data; in rx_mgmt_probe_resp()
650 bss->capab_info = le_to_host16(mgmt->u.probe_resp.capab_info); in rx_mgmt_probe_resp()
651 if (ieee802_11_parse_elems(mgmt->u.probe_resp.variable, len - offset, in rx_mgmt_probe_resp()
674 len < IEEE80211_HDRLEN + sizeof(mgmt->u.auth)) in process_fils_auth()
677 trans = le_to_host16(mgmt->u.auth.auth_transaction); in process_fils_auth()
679 if (ieee802_11_parse_elems(mgmt->u.auth.variable, in process_fils_auth()
[all …]
Dctrl.c504 mgmt.u.auth.auth_alg = host_to_le16(WLAN_AUTH_OPEN); in ctrl_inject_auth()
505 mgmt.u.auth.auth_transaction = host_to_le16(1); in ctrl_inject_auth()
506 mgmt.u.auth.status_code = host_to_le16(WLAN_STATUS_SUCCESS); in ctrl_inject_auth()
544 mgmt->u.assoc_req.capab_info = host_to_le16(sta->assocreq_capab_info); in ctrl_inject_assocreq()
545 mgmt->u.assoc_req.listen_interval = in ctrl_inject_assocreq()
547 os_memcpy(mgmt->u.assoc_req.variable, sta->assocreq_ies, in ctrl_inject_assocreq()
590 mgmt->u.reassoc_req.capab_info = in ctrl_inject_reassocreq()
592 mgmt->u.reassoc_req.listen_interval = in ctrl_inject_reassocreq()
594 os_memcpy(mgmt->u.reassoc_req.current_ap, bss->bssid, ETH_ALEN); in ctrl_inject_reassocreq()
595 os_memcpy(mgmt->u.reassoc_req.variable, sta->assocreq_ies, in ctrl_inject_reassocreq()
[all …]
/hostap-latest/src/wps/
Dhttp_client.c190 char *u, *addr, *port, *path; in http_client_url_parse() local
192 u = os_strdup(url); in http_client_url_parse()
193 if (u == NULL) in http_client_url_parse()
198 addr = u + 7; in http_client_url_parse()
216 os_free(u); in http_client_url_parse()
232 return u; in http_client_url_parse()
245 char *u, *path; in http_client_url() local
250 u = http_client_url_parse(url, &dst, &path); in http_client_url()
251 if (u == NULL) in http_client_url()
257 os_free(u); in http_client_url()
[all …]
/hostap-latest/src/tls/
Dlibtommath.c242 register mp_digit u, *tmpa, *tmpb, *tmpc; in s_mp_add() local
257 u = 0; in s_mp_add()
260 *tmpc = *tmpa++ + *tmpb++ + u; in s_mp_add()
263 u = *tmpc >> ((mp_digit)DIGIT_BIT); in s_mp_add()
275 *tmpc = x->dp[i] + u; in s_mp_add()
278 u = *tmpc >> ((mp_digit)DIGIT_BIT); in s_mp_add()
286 *tmpc++ = u; in s_mp_add()
318 register mp_digit u, *tmpa, *tmpb, *tmpc; in s_mp_sub() local
327 u = 0; in s_mp_sub()
330 *tmpc = *tmpa++ - *tmpb++ - u; in s_mp_sub()
[all …]
Dpkcs5.c404 unsigned int u, v, S_len, P_len, i; in pkcs12_key_gen() local
409 u = SHA1_MAC_LEN; in pkcs12_key_gen()
457 if (out_len <= u) { in pkcs12_key_gen()
463 os_memcpy(out, hash, u); in pkcs12_key_gen()
464 out += u; in pkcs12_key_gen()
465 out_len -= u; in pkcs12_key_gen()
470 B[i] = hash[i % u]; in pkcs12_key_gen()
/hostap-latest/src/eap_server/
Deap_sim_db.c57 } u; member
496 if (hexstr2bin(start, entry->u.sim.kc[num_chal], in eap_sim_db_sim_resp_auth()
505 if (hexstr2bin(start, entry->u.sim.sres[num_chal], in eap_sim_db_sim_resp_auth()
510 if (hexstr2bin(start, entry->u.sim.rand[num_chal], in eap_sim_db_sim_resp_auth()
520 entry->u.sim.num_chal = num_chal; in eap_sim_db_sim_resp_auth()
568 if (hexstr2bin(start, entry->u.aka.rand, EAP_AKA_RAND_LEN)) in eap_sim_db_aka_resp_auth()
576 if (hexstr2bin(start, entry->u.aka.autn, EAP_AKA_AUTN_LEN)) in eap_sim_db_aka_resp_auth()
584 if (hexstr2bin(start, entry->u.aka.ik, EAP_AKA_IK_LEN)) in eap_sim_db_aka_resp_auth()
592 if (hexstr2bin(start, entry->u.aka.ck, EAP_AKA_CK_LEN)) in eap_sim_db_aka_resp_auth()
604 entry->u.aka.res_len = (end - start) / 2; in eap_sim_db_aka_resp_auth()
[all …]
/hostap-latest/wpa_supplicant/
Dwnm_sta.c168 mgmt->u.action.category = WLAN_ACTION_WNM; in ieee802_11_send_wnmsleep_req()
169 mgmt->u.action.u.wnm_sleep_req.action = WNM_SLEEP_MODE_REQ; in ieee802_11_send_wnmsleep_req()
170 mgmt->u.action.u.wnm_sleep_req.dialogtoken = 1; in ieee802_11_send_wnmsleep_req()
171 os_memcpy(mgmt->u.action.u.wnm_sleep_req.variable, wnmsleep_ie, in ieee802_11_send_wnmsleep_req()
175 os_memcpy(mgmt->u.action.u.wnm_sleep_req.variable + in ieee802_11_send_wnmsleep_req()
182 os_memcpy(mgmt->u.action.u.wnm_sleep_req.variable + in ieee802_11_send_wnmsleep_req()
187 len = 1 + sizeof(mgmt->u.action.u.wnm_sleep_req) + wnmsleep_ie_len + in ieee802_11_send_wnmsleep_req()
192 &mgmt->u.action.category, len, 0); in ieee802_11_send_wnmsleep_req()
1649 IEEE80211_HDRLEN + sizeof(frame->u.action.u.bss_tm_resp) || in wnm_btm_resp_tx_status()
1650 frame->u.action.category != WLAN_ACTION_WNM || in wnm_btm_resp_tx_status()
[all …]
/hostap-latest/src/pasn/
Dpasn_initiator.c1030 if (!mgmt || len < offsetof(struct ieee80211_mgmt, u.auth.variable)) in is_pasn_auth_frame()
1052 if (mgmt->u.auth.auth_alg != host_to_le16(WLAN_AUTH_PASN)) in is_pasn_auth_frame()
1078 if (mgmt->u.auth.auth_transaction != in wpa_pasn_auth_rx()
1082 le_to_host16(mgmt->u.auth.auth_transaction), in wpa_pasn_auth_rx()
1087 status = le_to_host16(mgmt->u.auth.status_code); in wpa_pasn_auth_rx()
1096 if (ieee802_11_parse_elems(mgmt->u.auth.variable, in wpa_pasn_auth_rx()
1098 u.auth.variable), in wpa_pasn_auth_rx()
1259 mic_offset = elems.mic - (const u8 *) &mgmt->u.auth; in wpa_pasn_auth_rx()
1260 copy_len = len - offsetof(struct ieee80211_mgmt, u.auth); in wpa_pasn_auth_rx()
1263 copy = os_memdup(&mgmt->u.auth, copy_len); in wpa_pasn_auth_rx()
[all …]
/hostap-latest/src/fst/
Dfst_session.c1074 switch (mgmt->u.action.u.fst_action.action) { in fst_session_handle_action()
1199 mgmt->u.action.category != WLAN_ACTION_FST) { in fst_session_on_action_rx()
1205 if (mgmt->u.action.u.fst_action.action <= FST_ACTION_MAX_SUPPORTED) { in fst_session_on_action_rx()
1208 fst_action_names[mgmt->u.action.u.fst_action.action]); in fst_session_on_action_rx()
1212 mgmt->u.action.u.fst_action.action); in fst_session_on_action_rx()
1216 if (mgmt->u.action.u.fst_action.action == FST_ACTION_SETUP_REQUEST) { in fst_session_on_action_rx()
1227 fst_action_names[mgmt->u.action.u.fst_action.action]); in fst_session_on_action_rx()

1234