/hostap-latest/wpa_supplicant/ |
D | p2p_supplicant_sd.c | 183 static void wpas_sd_add_empty(struct wpabuf *resp, u8 srv_proto, in wpas_sd_add_empty() argument 188 if (wpabuf_tailroom(resp) < 5) in wpas_sd_add_empty() 192 len_pos = wpabuf_put(resp, 2); in wpas_sd_add_empty() 193 wpabuf_put_u8(resp, srv_proto); in wpas_sd_add_empty() 194 wpabuf_put_u8(resp, srv_trans_id); in wpas_sd_add_empty() 196 wpabuf_put_u8(resp, status); in wpas_sd_add_empty() 198 WPA_PUT_LE16(len_pos, (u8 *) wpabuf_put(resp, 0) - len_pos - 2); in wpas_sd_add_empty() 202 static void wpas_sd_add_proto_not_avail(struct wpabuf *resp, u8 srv_proto, in wpas_sd_add_proto_not_avail() argument 205 wpas_sd_add_empty(resp, srv_proto, srv_trans_id, in wpas_sd_add_proto_not_avail() 210 static void wpas_sd_add_bad_request(struct wpabuf *resp, u8 srv_proto, in wpas_sd_add_bad_request() argument [all …]
|
D | wpa_cli_zephyr.c | 44 static int _wpa_ctrl_command(struct wpa_ctrl *ctrl, const char *cmd, int print, char *resp) in _wpa_ctrl_command() argument 71 if (resp && len > 0) { in _wpa_ctrl_command() 72 os_memcpy(resp, buf, len); in _wpa_ctrl_command() 73 if (len > 1 && resp[len - 1] == '\n') { in _wpa_ctrl_command() 75 resp[len - 1] = '\0'; in _wpa_ctrl_command() 77 resp[len] = '\0'; in _wpa_ctrl_command() 79 if (strncmp(resp, "FAIL", 4) == 0) in _wpa_ctrl_command() 92 static int wpa_ctrl_command_resp(struct wpa_ctrl *ctrl, const char *cmd, char *resp) in wpa_ctrl_command_resp() argument 94 return _wpa_ctrl_command(ctrl, cmd, 0, resp); in wpa_ctrl_command_resp() 97 int zephyr_wpa_cli_cmd_resp(const char *cmd, char *resp) in zephyr_wpa_cli_cmd_resp() argument [all …]
|
/hostap-latest/src/common/ |
D | gas_server.c | 31 void (*status_cb)(void *ctx, struct wpabuf *resp, int ok); 40 struct wpabuf *resp; member 52 void (*tx)(void *ctx, int freq, const u8 *da, struct wpabuf *resp, 69 (unsigned long) (response->resp ? in gas_server_response_timeout() 70 wpabuf_len(response->resp) : 0)); in gas_server_response_timeout() 72 response->resp, 0); in gas_server_response_timeout() 73 response->resp = NULL; in gas_server_response_timeout() 85 wpabuf_free(response->resp); in gas_server_free_response() 99 struct wpabuf *resp; in gas_server_send_resp() local 121 resp = gas_build_initial_resp(response->dialog_token, in gas_server_send_resp() [all …]
|
/hostap-latest/tests/hwsim/ |
D | test_rrm.py | 828 resp = [] 836 resp.append(ev) 846 return token, resp 873 token, resp = run_req_beacon(hapd, addr, req) 876 if resp: 877 ev = resp.pop(0) 917 token, resp = run_req_beacon(hapd, addr, req) 921 if resp: 922 ev = resp.pop(0) 964 token, resp = run_req_beacon(hapd, addr, req + "a40101") [all …]
|
D | test_gas.py | 91 resp = dev.request("GAS_RESPONSE_GET " + bssid + " " + token) 92 if "FAIL" in resp: 97 if len(resp) != int(resp_len) * 2: 99 logger.debug("GAS response: " + resp) 101 if resp[2:6] != res1_2: 103 if resp[10:16] != res5_3: 554 resp = action_response(query) 558 resp['payload'] = anqp_initial_resp(gas['dialog_token'], 0) + data 559 send_gas_resp(hapd, resp) 576 resp = action_response(query) [all …]
|
D | test_eap_proto.py | 999 resp = rx_msg(dev[0]) 1002 msg = resp[0:4] + "0007" + resp[8:12] + "0007" + "300200" 1006 msg = resp[0:4] + "0008" + resp[8:12] + "0008" + "30010000" 1010 sess, = struct.unpack('B', binascii.unhexlify(resp[20:22])) 1012 msg = resp[0:4] + "0008" + resp[8:12] + "0008" + "3002" + sess + "00" 1016 msg = resp[0:22] + "05" + resp[24:] 1020 msg = resp[0:4] + "0008" + resp[8:12] + "0008" + resp[16:24] 1026 resp = rx_msg(dev[0]) 1029 msg = resp[0:4] + "0009" + resp[8:12] + "0009" + resp[16:26] 1037 resp = rx_msg(dev[0]) [all …]
|
/hostap-latest/src/eap_peer/ |
D | eap_eke.c | 199 struct wpabuf *resp; in eap_eke_build_fail() local 204 resp = eap_eke_build_msg(data, id, 4, EAP_EKE_FAILURE); in eap_eke_build_fail() 205 if (resp) in eap_eke_build_fail() 206 wpabuf_put_be32(resp, failure_code); in eap_eke_build_fail() 216 return resp; in eap_eke_build_fail() 226 struct wpabuf *resp; in eap_eke_process_id() local 321 resp = eap_eke_build_msg(data, id, in eap_eke_process_id() 324 if (resp == NULL) { in eap_eke_process_id() 329 wpabuf_put_u8(resp, 1); /* NumProposals */ in eap_eke_process_id() 330 wpabuf_put_u8(resp, 0); /* Reserved */ in eap_eke_process_id() [all …]
|
D | eap_sake.c | 148 struct wpabuf *resp; in eap_sake_process_identity() local 168 resp = eap_sake_build_msg(data, id, 2 + data->peerid_len, in eap_sake_process_identity() 170 if (resp == NULL) in eap_sake_process_identity() 174 eap_sake_add_attr(resp, EAP_SAKE_AT_PEERID, in eap_sake_process_identity() 179 return resp; in eap_sake_process_identity() 191 struct wpabuf *resp; in eap_sake_process_challenge() local 251 resp = eap_sake_build_msg(data, id, rlen, EAP_SAKE_SUBTYPE_CHALLENGE); in eap_sake_process_challenge() 252 if (resp == NULL) in eap_sake_process_challenge() 256 eap_sake_add_attr(resp, EAP_SAKE_AT_RAND_P, in eap_sake_process_challenge() 261 eap_sake_add_attr(resp, EAP_SAKE_AT_PEERID, in eap_sake_process_challenge() [all …]
|
D | eap_gpsk.c | 280 struct wpabuf *resp; in eap_gpsk_process_gpsk_1() local 301 resp = eap_gpsk_send_gpsk_2(data, identifier, in eap_gpsk_process_gpsk_1() 303 if (resp == NULL) in eap_gpsk_process_gpsk_1() 308 return resp; in eap_gpsk_process_gpsk_1() 317 struct wpabuf *resp; in eap_gpsk_send_gpsk_2() local 329 resp = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_GPSK, len, in eap_gpsk_send_gpsk_2() 331 if (resp == NULL) in eap_gpsk_send_gpsk_2() 334 wpabuf_put_u8(resp, EAP_GPSK_OPCODE_GPSK_2); in eap_gpsk_send_gpsk_2() 335 start = wpabuf_put(resp, 0); in eap_gpsk_send_gpsk_2() 339 wpabuf_put_be16(resp, data->id_peer_len); in eap_gpsk_send_gpsk_2() [all …]
|
D | eap_teap.c | 408 struct wpabuf **resp) in eap_teap_phase2_request() argument 440 *resp = eap_sm_buildIdentity(sm, hdr->identifier, 1); in eap_teap_phase2_request() 454 hdr, resp)) in eap_teap_phase2_request() 471 *resp = data->phase2_method->process(sm, data->phase2_priv, &iret, in eap_teap_phase2_request() 475 if (!(*resp) || in eap_teap_phase2_request() 488 if (!(*resp) && config && in eap_teap_phase2_request() 494 } else if (!(*resp)) in eap_teap_phase2_request() 562 struct wpabuf *resp = NULL; in eap_teap_process_eap_payload_tlv() local 585 if (eap_teap_phase2_request(sm, data, ret, hdr, &resp)) { in eap_teap_process_eap_payload_tlv() 591 resp = eap_teap_tlv_eap_payload(resp); in eap_teap_process_eap_payload_tlv() [all …]
|
D | eap_pax.c | 96 struct wpabuf *resp; in eap_pax_alloc_resp() local 99 resp = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_PAX, in eap_pax_alloc_resp() 101 if (resp == NULL) in eap_pax_alloc_resp() 104 pax = wpabuf_put(resp, sizeof(*pax)); in eap_pax_alloc_resp() 111 return resp; in eap_pax_alloc_resp() 120 struct wpabuf *resp; in eap_pax_process_std_1() local 191 resp = eap_pax_alloc_resp(req, id, EAP_PAX_OP_STD_2, plen); in eap_pax_process_std_1() 192 if (resp == NULL) in eap_pax_process_std_1() 195 wpabuf_put_be16(resp, EAP_PAX_RAND_LEN); in eap_pax_process_std_1() 196 wpabuf_put_data(resp, data->rand.r.y, EAP_PAX_RAND_LEN); in eap_pax_process_std_1() [all …]
|
D | eap_tnc.c | 91 struct wpabuf *resp; in eap_tnc_build_msg() local 113 resp = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_TNC, plen, in eap_tnc_build_msg() 115 if (resp == NULL) in eap_tnc_build_msg() 118 wpabuf_put_u8(resp, flags); /* Flags */ in eap_tnc_build_msg() 120 wpabuf_put_be32(resp, wpabuf_len(data->out_buf)); in eap_tnc_build_msg() 122 wpabuf_put_data(resp, wpabuf_head_u8(data->out_buf) + data->out_used, in eap_tnc_build_msg() 144 return resp; in eap_tnc_build_msg() 206 struct wpabuf *resp; in eap_tnc_process() local 354 resp = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_TNC, 1, in eap_tnc_process() 356 if (resp == NULL) in eap_tnc_process() [all …]
|
D | eap_leap.c | 64 struct wpabuf *resp; in eap_leap_process_request() local 109 resp = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_LEAP, in eap_leap_process_request() 112 if (resp == NULL) in eap_leap_process_request() 114 wpabuf_put_u8(resp, LEAP_VERSION); in eap_leap_process_request() 115 wpabuf_put_u8(resp, 0); /* unused */ in eap_leap_process_request() 116 wpabuf_put_u8(resp, LEAP_RESPONSE_LEN); in eap_leap_process_request() 117 rpos = wpabuf_put(resp, LEAP_RESPONSE_LEN); in eap_leap_process_request() 123 wpabuf_free(resp); in eap_leap_process_request() 129 wpabuf_put_data(resp, identity, identity_len); in eap_leap_process_request() 133 return resp; in eap_leap_process_request() [all …]
|
D | eap_gtc.c | 49 struct wpabuf *resp; in eap_gtc_process() local 72 resp = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_GTC, in eap_gtc_process() 74 return resp; in eap_gtc_process() 104 resp = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_GTC, plen, in eap_gtc_process() 106 if (resp == NULL) in eap_gtc_process() 109 wpabuf_put_data(resp, "RESPONSE=", 9); in eap_gtc_process() 110 wpabuf_put_data(resp, identity, identity_len); in eap_gtc_process() 111 wpabuf_put_u8(resp, '\0'); in eap_gtc_process() 113 wpabuf_put_data(resp, password, password_len); in eap_gtc_process() 115 wpabuf_head_u8(resp) + sizeof(struct eap_hdr) + in eap_gtc_process() [all …]
|
D | eap_ttls.c | 268 static int eap_ttls_avp_encapsulate(struct wpabuf **resp, u32 avp_code, in eap_ttls_avp_encapsulate() argument 274 msg = wpabuf_alloc(sizeof(struct ttls_avp) + wpabuf_len(*resp) + 4); in eap_ttls_avp_encapsulate() 276 wpabuf_clear_free(*resp); in eap_ttls_avp_encapsulate() 277 *resp = NULL; in eap_ttls_avp_encapsulate() 282 pos = eap_ttls_avp_hdr(avp, avp_code, 0, mandatory, wpabuf_len(*resp)); in eap_ttls_avp_encapsulate() 283 os_memcpy(pos, wpabuf_head(*resp), wpabuf_len(*resp)); in eap_ttls_avp_encapsulate() 284 pos += wpabuf_len(*resp); in eap_ttls_avp_encapsulate() 286 wpabuf_clear_free(*resp); in eap_ttls_avp_encapsulate() 288 *resp = msg; in eap_ttls_avp_encapsulate() 376 struct wpabuf **resp) in eap_ttls_phase2_eap_process() argument [all …]
|
D | eap_fast.c | 423 struct wpabuf **resp) in eap_fast_phase2_request() argument 453 *resp = eap_sm_buildIdentity(sm, hdr->identifier, 1); in eap_fast_phase2_request() 474 hdr, resp)) in eap_fast_phase2_request() 492 *resp = data->phase2_method->process(sm, data->phase2_priv, &iret, in eap_fast_phase2_request() 494 if (*resp == NULL || in eap_fast_phase2_request() 506 if (*resp == NULL && config && in eap_fast_phase2_request() 512 } else if (*resp == NULL) in eap_fast_phase2_request() 584 struct wpabuf *resp = NULL; in eap_fast_process_eap_payload_tlv() local 606 if (eap_fast_phase2_request(sm, data, ret, hdr, &resp)) { in eap_fast_process_eap_payload_tlv() 612 return eap_fast_tlv_eap_payload(resp); in eap_fast_process_eap_payload_tlv() [all …]
|
D | eap_mschapv2.c | 155 struct wpabuf *resp; in eap_mschapv2_challenge_reply() local 172 resp = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_MSCHAPV2, ms_len, in eap_mschapv2_challenge_reply() 174 if (resp == NULL) in eap_mschapv2_challenge_reply() 177 ms = wpabuf_put(resp, sizeof(*ms)); in eap_mschapv2_challenge_reply() 191 wpabuf_put_u8(resp, sizeof(*r)); /* Value-Size */ in eap_mschapv2_challenge_reply() 194 r = wpabuf_put(resp, sizeof(*r)); in eap_mschapv2_challenge_reply() 202 wpabuf_free(resp); in eap_mschapv2_challenge_reply() 217 wpabuf_free(resp); in eap_mschapv2_challenge_reply() 225 wpabuf_put_data(resp, identity, identity_len); in eap_mschapv2_challenge_reply() 228 return resp; in eap_mschapv2_challenge_reply() [all …]
|
D | eap_peap.c | 502 const struct wpabuf *req, struct wpabuf **resp, in eap_tlv_process() argument 546 *resp = eap_tlv_build_nak(eap_get_id(req), in eap_tlv_process() 548 return *resp == NULL ? -1 : 0; in eap_tlv_process() 621 *resp = eap_tlv_build_result(sm, data, crypto_tlv != NULL, in eap_tlv_process() 633 struct wpabuf **resp) in eap_peap_phase2_request() argument 652 *resp = eap_sm_buildIdentity(sm, hdr->identifier, 1); in eap_peap_phase2_request() 656 if (eap_tlv_process(sm, data, &iret, req, resp, in eap_peap_phase2_request() 685 *resp = eap_msg_alloc( in eap_peap_phase2_request() 690 if (*resp == NULL) { in eap_peap_phase2_request() 696 wpabuf_put_buf(*resp, buf); in eap_peap_phase2_request() [all …]
|
D | eap_md5.c | 33 struct wpabuf *resp; in eap_md5_process() local 76 resp = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_MD5, 1 + CHAP_MD5_LEN, in eap_md5_process() 78 if (resp == NULL) in eap_md5_process() 85 wpabuf_put_u8(resp, CHAP_MD5_LEN); in eap_md5_process() 87 id = eap_get_id(resp); in eap_md5_process() 88 rpos = wpabuf_put(resp, CHAP_MD5_LEN); in eap_md5_process() 93 wpabuf_free(resp); in eap_md5_process() 98 return resp; in eap_md5_process()
|
D | eap_psk.c | 89 struct wpabuf *resp; in eap_psk_process_1() local 135 resp = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_PSK, in eap_psk_process_1() 138 if (resp == NULL) in eap_psk_process_1() 140 hdr2 = wpabuf_put(resp, sizeof(*hdr2)); in eap_psk_process_1() 144 wpabuf_put_data(resp, data->id_p, data->id_p_len); in eap_psk_process_1() 149 wpabuf_free(resp); in eap_psk_process_1() 161 wpabuf_free(resp); in eap_psk_process_1() 173 return resp; in eap_psk_process_1() 183 struct wpabuf *resp; in eap_psk_process_3() local 315 resp = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_PSK, plen, in eap_psk_process_3() [all …]
|
/hostap-latest/src/eap_server/ |
D | eap_server_pax.c | 202 struct eap_pax_hdr *resp; in eap_pax_check() local 208 if (pos == NULL || len < sizeof(*resp) + EAP_PAX_ICV_LEN) { in eap_pax_check() 214 resp = (struct eap_pax_hdr *) pos; in eap_pax_check() 219 resp->op_code, resp->flags, resp->mac_id, resp->dh_group_id, in eap_pax_check() 220 resp->public_key_id); in eap_pax_check() 222 (u8 *) (resp + 1), len - sizeof(*resp) - EAP_PAX_ICV_LEN); in eap_pax_check() 225 resp->op_code != EAP_PAX_OP_STD_2) { in eap_pax_check() 227 "ignore op %d", resp->op_code); in eap_pax_check() 232 resp->op_code != EAP_PAX_OP_ACK) { in eap_pax_check() 234 "ignore op %d", resp->op_code); in eap_pax_check() [all …]
|
D | eap_server_mschapv2.c | 248 struct eap_mschapv2_hdr *resp; in eap_mschapv2_check() local 259 resp = (struct eap_mschapv2_hdr *) pos; in eap_mschapv2_check() 261 resp->op_code != MSCHAPV2_OP_RESPONSE) { in eap_mschapv2_check() 263 "ignore op %d", resp->op_code); in eap_mschapv2_check() 268 resp->op_code != MSCHAPV2_OP_SUCCESS && in eap_mschapv2_check() 269 resp->op_code != MSCHAPV2_OP_FAILURE) { in eap_mschapv2_check() 271 "Failure - ignore op %d", resp->op_code); in eap_mschapv2_check() 276 resp->op_code != MSCHAPV2_OP_FAILURE) { in eap_mschapv2_check() 278 "- ignore op %d", resp->op_code); in eap_mschapv2_check() 290 struct eap_mschapv2_hdr *resp; in eap_mschapv2_process_response() local [all …]
|
/hostap-latest/wlantest/ |
D | wlantest_cli.c | 107 u8 *resp, size_t max_resp_len) in cmd_send_and_recv() argument 114 res = recv(s, resp, max_resp_len, 0); in cmd_send_and_recv() 118 cmd_resp = WPA_GET_BE32(resp); in cmd_send_and_recv() 143 u8 resp[WLANTEST_CTRL_MAX_RESP_LEN]; in get_bssid_list() local 151 rlen = cmd_send_and_recv(s, buf, sizeof(buf), resp, sizeof(resp)); in get_bssid_list() 155 bssid = attr_get(resp + 4, rlen - 4, WLANTEST_ATTR_BSSID, &len); in get_bssid_list() 175 u8 resp[WLANTEST_CTRL_MAX_RESP_LEN]; in get_sta_list() local 189 rlen = cmd_send_and_recv(s, buf, pos - buf, resp, sizeof(resp)); in get_sta_list() 193 addr = attr_get(resp + 4, rlen - 4, WLANTEST_ATTR_STA_ADDR, &len); in get_sta_list() 230 u8 resp[WLANTEST_CTRL_MAX_RESP_LEN]; in cmd_list_bss() local [all …]
|
/hostap-latest/src/utils/ |
D | pcsc_funcs.c | 812 unsigned char resp[3]; in _scard_select_file() local 839 len = sizeof(resp); in _scard_select_file() 840 ret = scard_transmit(scard, cmd, cmdlen, resp, &len); in _scard_select_file() 853 if (resp[0] == 0x98 && resp[1] == 0x04) { in _scard_select_file() 860 if (resp[0] == 0x6e) { in _scard_select_file() 865 if (resp[0] != 0x6c && resp[0] != 0x9f && resp[0] != 0x61) { in _scard_select_file() 867 "(expected 0x61, 0x6c, or 0x9f)", resp[0]); in _scard_select_file() 871 get_resp[4] = resp[1]; in _scard_select_file() 873 resp[1]); in _scard_select_file() 878 *buf_len = resp[1] < rlen ? resp[1] : rlen; in _scard_select_file() [all …]
|
/hostap-latest/src/ap/ |
D | fils_hlp.c | 163 struct wpabuf *resp; in fils_dhcp_handler() local 253 resp = wpabuf_alloc(2 * ETH_ALEN + 6 + 2 + in fils_dhcp_handler() 255 if (!resp) in fils_dhcp_handler() 257 wpabuf_put_data(resp, sta->addr, ETH_ALEN); in fils_dhcp_handler() 258 wpabuf_put_data(resp, hapd->own_addr, ETH_ALEN); in fils_dhcp_handler() 259 wpabuf_put_data(resp, "\xaa\xaa\x03\x00\x00\x00", 6); in fils_dhcp_handler() 260 wpabuf_put_be16(resp, ETH_P_IP); in fils_dhcp_handler() 261 iph = wpabuf_put(resp, sizeof(*iph)); in fils_dhcp_handler() 270 udph = wpabuf_put(resp, sizeof(*udph)); in fils_dhcp_handler() 278 wpabuf_put_data(resp, pos, end_opt - pos); in fils_dhcp_handler() [all …]
|