Home
last modified time | relevance | path

Searched refs:msg (Results 1 – 25 of 222) sorted by relevance

123456789

/hostap-latest/src/p2p/
Dp2p_parse.c37 struct p2p_message *msg) in p2p_parse_attribute() argument
50 msg->capability = data; in p2p_parse_attribute()
61 msg->device_id = data; in p2p_parse_attribute()
63 MAC2STR(msg->device_id)); in p2p_parse_attribute()
71 msg->go_intent = data; in p2p_parse_attribute()
81 msg->status = data; in p2p_parse_attribute()
95 msg->listen_channel = data; in p2p_parse_attribute()
118 msg->operating_channel = data; in p2p_parse_attribute()
136 msg->channel_list = data; in p2p_parse_attribute()
137 msg->channel_list_len = len; in p2p_parse_attribute()
[all …]
Dp2p_pd.c456 static int p2ps_validate_pd_req(struct p2p_data *p2p, struct p2p_message *msg, in p2ps_validate_pd_req() argument
468 if ((_val) && !msg->_attr) { \ in p2ps_validate_pd_req()
487 if (msg->status && *msg->status != P2P_SC_SUCCESS_DEFERRED) in p2ps_validate_pd_req()
502 if (msg->feature_cap_len < sizeof(struct p2ps_feature_capab)) { in p2ps_validate_pd_req()
507 switch (*msg->conn_cap) { in p2ps_validate_pd_req()
544 if (msg->persistent_dev) { in p2ps_validate_pd_req()
547 if (ether_addr_equal(msg->persistent_dev, addr)) { in p2ps_validate_pd_req()
569 struct p2p_message msg; in p2p_process_prov_disc_req() local
590 if (p2p_parse(data, len, &msg)) in p2p_process_prov_disc_req()
595 MAC2STR(sa), msg.wps_config_methods, rx_freq); in p2p_process_prov_disc_req()
[all …]
Dp2p_go_neg.c601 struct p2p_message *msg, in p2p_check_pref_chan_no_recv() argument
623 for (j = 0; j < msg->channel_list_len; j++) { in p2p_check_pref_chan_no_recv()
624 if (!msg->channel_list || in p2p_check_pref_chan_no_recv()
625 op_channel != msg->channel_list[j]) in p2p_check_pref_chan_no_recv()
650 struct p2p_message *msg, in p2p_check_pref_chan_recv() argument
664 for (j = 2; j < (msg->pref_freq_list_len / 2); j++) { in p2p_check_pref_chan_recv()
666 msg->pref_freq_list[2 * j], in p2p_check_pref_chan_recv()
667 msg->pref_freq_list[2 * j + 1]); in p2p_check_pref_chan_recv()
695 struct p2p_device *dev, struct p2p_message *msg) in p2p_check_pref_chan() argument
793 if (msg->pref_freq_list_len == 0) in p2p_check_pref_chan()
[all …]
Dp2p_invitation.c188 struct p2p_message msg; in p2p_process_invitation_req() local
204 if (p2p_parse(data, len, &msg)) in p2p_process_invitation_req()
229 if (!msg.group_id || !msg.channel_list) { in p2p_process_invitation_req()
236 if (msg.invitation_flags) in p2p_process_invitation_req()
237 persistent = *msg.invitation_flags & P2P_INVITATION_FLAGS_TYPE; in p2p_process_invitation_req()
252 msg.channel_list, msg.channel_list_len) < in p2p_process_invitation_req()
268 p2p->cfg->cb_ctx, sa, msg.group_bssid, msg.group_id, in p2p_process_invitation_req()
269 msg.group_id + ETH_ALEN, msg.group_id_len - ETH_ALEN, in p2p_process_invitation_req()
271 msg.dev_password_id_present ? msg.dev_password_id : -1); in p2p_process_invitation_req()
315 if (msg.operating_channel) { in p2p_process_invitation_req()
[all …]
/hostap-latest/src/wps/
Dwps_attr_build.c21 int wps_build_public_key(struct wps_data *wps, struct wpabuf *msg) in wps_build_public_key() argument
81 wpabuf_put_be16(msg, ATTR_PUBLIC_KEY); in wps_build_public_key()
82 wpabuf_put_be16(msg, wpabuf_len(pubkey)); in wps_build_public_key()
83 wpabuf_put_buf(msg, pubkey); in wps_build_public_key()
97 int wps_build_req_type(struct wpabuf *msg, enum wps_request_type type) in wps_build_req_type() argument
100 wpabuf_put_be16(msg, ATTR_REQUEST_TYPE); in wps_build_req_type()
101 wpabuf_put_be16(msg, 1); in wps_build_req_type()
102 wpabuf_put_u8(msg, type); in wps_build_req_type()
107 int wps_build_resp_type(struct wpabuf *msg, enum wps_response_type type) in wps_build_resp_type() argument
110 wpabuf_put_be16(msg, ATTR_RESPONSE_TYPE); in wps_build_resp_type()
[all …]
Dwps_dev_attr.c16 int wps_build_manufacturer(struct wps_device_data *dev, struct wpabuf *msg) in wps_build_manufacturer() argument
20 wpabuf_put_be16(msg, ATTR_MANUFACTURER); in wps_build_manufacturer()
29 wpabuf_put_be16(msg, 1); in wps_build_manufacturer()
30 wpabuf_put_u8(msg, ' '); in wps_build_manufacturer()
34 wpabuf_put_be16(msg, len); in wps_build_manufacturer()
35 wpabuf_put_data(msg, dev->manufacturer, len); in wps_build_manufacturer()
40 int wps_build_model_name(struct wps_device_data *dev, struct wpabuf *msg) in wps_build_model_name() argument
44 wpabuf_put_be16(msg, ATTR_MODEL_NAME); in wps_build_model_name()
53 wpabuf_put_be16(msg, 1); in wps_build_model_name()
54 wpabuf_put_u8(msg, ' '); in wps_build_model_name()
[all …]
Dwps_enrollee.c19 static int wps_build_wps_state(struct wps_data *wps, struct wpabuf *msg) in wps_build_wps_state() argument
28 wpabuf_put_be16(msg, ATTR_WPS_STATE); in wps_build_wps_state()
29 wpabuf_put_be16(msg, 1); in wps_build_wps_state()
30 wpabuf_put_u8(msg, state); in wps_build_wps_state()
35 static int wps_build_e_hash(struct wps_data *wps, struct wpabuf *msg) in wps_build_e_hash() argument
54 wpabuf_put_be16(msg, ATTR_E_HASH1); in wps_build_e_hash()
55 wpabuf_put_be16(msg, SHA256_MAC_LEN); in wps_build_e_hash()
56 hash = wpabuf_put(msg, SHA256_MAC_LEN); in wps_build_e_hash()
70 wpabuf_put_be16(msg, ATTR_E_HASH2); in wps_build_e_hash()
71 wpabuf_put_be16(msg, SHA256_MAC_LEN); in wps_build_e_hash()
[all …]
Dwps_common.c272 void wps_fail_event(struct wps_context *wps, enum wps_msg_type msg, in wps_fail_event() argument
281 data.fail.msg = msg; in wps_fail_event()
437 struct wpabuf msg; in wps_oob_use_cred() local
445 wpabuf_set(&msg, attr->cred[i], attr->cred_len[i]); in wps_oob_use_cred()
446 if (wps_parse_msg(&msg, &cattr) < 0 || in wps_oob_use_cred()
577 struct wpabuf *msg; in wps_build_wsc_ack() local
581 msg = wpabuf_alloc(1000); in wps_build_wsc_ack()
582 if (msg == NULL) in wps_build_wsc_ack()
585 if (wps_build_version(msg) || in wps_build_wsc_ack()
586 wps_build_msg_type(msg, WPS_WSC_ACK) || in wps_build_wsc_ack()
[all …]
Dwps_i.h142 void wps_fail_event(struct wps_context *wps, enum wps_msg_type msg,
156 int wps_build_public_key(struct wps_data *wps, struct wpabuf *msg);
157 int wps_build_req_type(struct wpabuf *msg, enum wps_request_type type);
158 int wps_build_resp_type(struct wpabuf *msg, enum wps_response_type type);
159 int wps_build_config_methods(struct wpabuf *msg, u16 methods);
160 int wps_build_uuid_e(struct wpabuf *msg, const u8 *uuid);
161 int wps_build_dev_password_id(struct wpabuf *msg, u16 id);
162 int wps_build_config_error(struct wpabuf *msg, u16 err);
163 int wps_build_authenticator(struct wps_data *wps, struct wpabuf *msg);
164 int wps_build_key_wrap_auth(struct wps_data *wps, struct wpabuf *msg);
[all …]
Dwps_registrar.c477 static int wps_build_wps_state(struct wps_context *wps, struct wpabuf *msg) in wps_build_wps_state() argument
481 wpabuf_put_be16(msg, ATTR_WPS_STATE); in wps_build_wps_state()
482 wpabuf_put_be16(msg, 1); in wps_build_wps_state()
483 wpabuf_put_u8(msg, wps->wps_state); in wps_build_wps_state()
502 wpabuf_free(p2->msg); in wps_registrar_free_pending_m2()
514 struct wpabuf *msg) in wps_build_ap_setup_locked() argument
518 wpabuf_put_be16(msg, ATTR_AP_SETUP_LOCKED); in wps_build_ap_setup_locked()
519 wpabuf_put_be16(msg, 1); in wps_build_ap_setup_locked()
520 wpabuf_put_u8(msg, 1); in wps_build_ap_setup_locked()
527 struct wpabuf *msg) in wps_build_selected_registrar() argument
[all …]
Dwps_dev_attr.h14 int wps_build_manufacturer(struct wps_device_data *dev, struct wpabuf *msg);
15 int wps_build_model_name(struct wps_device_data *dev, struct wpabuf *msg);
16 int wps_build_model_number(struct wps_device_data *dev, struct wpabuf *msg);
17 int wps_build_serial_number(struct wps_device_data *dev, struct wpabuf *msg);
18 int wps_build_dev_name(struct wps_device_data *dev, struct wpabuf *msg);
19 int wps_build_device_attrs(struct wps_device_data *dev, struct wpabuf *msg);
20 int wps_build_os_version(struct wps_device_data *dev, struct wpabuf *msg);
21 int wps_build_vendor_ext_m1(struct wps_device_data *dev, struct wpabuf *msg);
22 int wps_build_rf_bands(struct wps_device_data *dev, struct wpabuf *msg,
25 struct wpabuf *msg);
[all …]
/hostap-latest/tests/hwsim/
Dtest_p2p_messages.py104 msg = {}
105 msg['fc'] = MGMT_SUBTYPE_ACTION << 4
106 msg['da'] = dst
107 msg['sa'] = src
109 msg['bssid'] = dst
111 msg['bssid'] = src
112 msg['payload'] = struct.pack("<BBBBBB",
115 msg['payload'] += struct.pack("<B", type)
117 msg['payload'] += struct.pack("<B", dialog_token)
118 return msg
[all …]
Dtest_wpas_wmm_ac.py140 msg = hapd.mgmt_rx()
141 payload = msg['payload']
146 msg['da'] = msg['sa']
147 msg['sa'] = apdev[0]['bssid']
150 msg['payload'] = struct.pack('BBBB', 17, 1, (dialog + 1) & 0xff, 0) + payload[4:]
151 hapd.mgmt_tx(msg)
154 msg['payload'] = struct.pack('BBBB', 17, 1, dialog, 0) + payload[4:]
155 hapd.mgmt_tx(msg)
163 msg['payload'] = struct.pack('BBBB', 17, 1, dialog, 0) + payload[4:]
164 hapd.mgmt_tx(msg)
[all …]
Dtest_ap_psk.py877 msg = last[0:18] + '01' + last[20:]
878 res = dev[0].request("EAPOL_RX " + bssid + " " + msg)
1426 def build_eapol(msg): argument
1427 data = struct.pack(">BBH", msg['version'], msg['type'], msg['length'])
1428 if msg['type'] == 3:
1429 data += struct.pack('>BHH', msg['descr_type'], msg['rsn_key_info'],
1430 msg['rsn_key_len'])
1431 data += msg['rsn_replay_counter']
1432 data += msg['rsn_key_nonce']
1433 data += msg['rsn_key_iv']
[all …]
/hostap-latest/src/radius/
Dradius.c52 struct radius_hdr * radius_msg_get_hdr(struct radius_msg *msg) in radius_msg_get_hdr() argument
54 return msg->hdr; in radius_msg_get_hdr()
58 struct wpabuf * radius_msg_get_buf(struct radius_msg *msg) in radius_msg_get_buf() argument
60 return msg->buf; in radius_msg_get_buf()
65 radius_get_attr_hdr(struct radius_msg *msg, int idx) in radius_get_attr_hdr() argument
68 (wpabuf_mhead_u8(msg->buf) + msg->attr_pos[idx]); in radius_get_attr_hdr()
72 static void radius_msg_set_hdr(struct radius_msg *msg, u8 code, u8 identifier) in radius_msg_set_hdr() argument
74 msg->hdr->code = code; in radius_msg_set_hdr()
75 msg->hdr->identifier = identifier; in radius_msg_set_hdr()
79 static int radius_msg_initialize(struct radius_msg *msg) in radius_msg_initialize() argument
[all …]
Dradius.h266 struct radius_hdr * radius_msg_get_hdr(struct radius_msg *msg);
267 struct wpabuf * radius_msg_get_buf(struct radius_msg *msg);
269 void radius_msg_free(struct radius_msg *msg);
270 void radius_msg_dump(struct radius_msg *msg);
271 u8 * radius_msg_add_msg_auth(struct radius_msg *msg);
272 int radius_msg_finish(struct radius_msg *msg, const u8 *secret,
274 int radius_msg_finish_srv(struct radius_msg *msg, const u8 *secret,
276 int radius_msg_finish_das_resp(struct radius_msg *msg, const u8 *secret,
279 void radius_msg_finish_acct(struct radius_msg *msg, const u8 *secret,
281 void radius_msg_finish_acct_resp(struct radius_msg *msg, const u8 *secret,
[all …]
/hostap-latest/src/drivers/
Ddriver_nl80211.c197 static int nl80211_put_mesh_config(struct nl_msg *msg,
293 static int ack_handler(struct nl_msg *msg, void *arg) in ack_handler() argument
307 static int ack_handler_cookie(struct nl_msg *msg, void *arg) in ack_handler_cookie() argument
319 ((u8 *) nlmsg_data(nlmsg_hdr(msg)) + sizeof(struct nlmsghdr) + in ack_handler_cookie()
321 if (nlmsg_hdr(msg)->nlmsg_len <= ack_len) in ack_handler_cookie()
324 attr_len = nlmsg_hdr(msg)->nlmsg_len - ack_len; in ack_handler_cookie()
326 if(!(nlmsg_hdr(msg)->nlmsg_flags & NLM_F_ACK_TLVS)) in ack_handler_cookie()
337 static int finish_handler(struct nl_msg *msg, void *arg) in finish_handler() argument
372 ack_len += err->msg.nlmsg_len - sizeof(*nlh); in error_handler()
394 os_memcmp(orig_nlh, &err->msg, sizeof(err->msg)) != 0) in error_handler()
[all …]
Ddriver_nl80211_scan.c32 static int get_noise_for_scan_results(struct nl_msg *msg, void *arg) in get_noise_for_scan_results() argument
35 struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg)); in get_noise_for_scan_results()
81 struct nl_msg *msg; in nl80211_get_noise_for_scan_results() local
84 msg = nl80211_drv_msg(drv, NLM_F_DUMP, NL80211_CMD_GET_SURVEY); in nl80211_get_noise_for_scan_results()
85 return send_and_recv_resp(drv, msg, get_noise_for_scan_results, info); in nl80211_get_noise_for_scan_results()
92 struct nl_msg *msg; in nl80211_abort_scan() local
96 msg = nl80211_cmd_msg(bss, 0, NL80211_CMD_ABORT_SCAN); in nl80211_abort_scan()
97 ret = send_and_recv_cmd(drv, msg); in nl80211_abort_scan()
110 struct nl_msg *msg; in nl80211_abort_vendor_scan() local
117 msg = nl80211_drv_msg(drv, 0, NL80211_CMD_VENDOR); in nl80211_abort_vendor_scan()
[all …]
Ddriver_macsec_linux.c95 static int dump_callback(struct nl_msg *msg, void *argp);
102 struct nl_msg *msg; in msg_prepare() local
104 msg = nlmsg_alloc(); in msg_prepare()
105 if (!msg) { in msg_prepare()
110 if (!genlmsg_put(msg, 0, 0, ctx->macsec_genl_id, 0, 0, cmd, 0)) { in msg_prepare()
115 NLA_PUT_U32(msg, MACSEC_ATTR_IFINDEX, ifindex); in msg_prepare()
117 return msg; in msg_prepare()
120 nlmsg_free(msg); in msg_prepare()
125 static int nla_put_rxsc_config(struct nl_msg *msg, u64 sci) in nla_put_rxsc_config() argument
127 struct nlattr *nest = nla_nest_start(msg, MACSEC_ATTR_RXSC_CONFIG); in nla_put_rxsc_config()
[all …]
/hostap-latest/wpa_supplicant/dbus/
Ddbus_new.c136 DBusMessage *msg; in wpas_dbus_signal_interface() local
145 msg = dbus_message_new_signal(WPAS_DBUS_NEW_PATH, in wpas_dbus_signal_interface()
147 if (msg == NULL) in wpas_dbus_signal_interface()
150 dbus_message_iter_init_append(msg, &iter); in wpas_dbus_signal_interface()
159 dbus_connection_send(iface->con, msg, NULL); in wpas_dbus_signal_interface()
160 dbus_message_unref(msg); in wpas_dbus_signal_interface()
199 DBusMessage *msg; in wpas_dbus_signal_scan_done() local
208 msg = dbus_message_new_signal(wpa_s->dbus_new_path, in wpas_dbus_signal_scan_done()
211 if (msg == NULL) in wpas_dbus_signal_scan_done()
215 if (dbus_message_append_args(msg, DBUS_TYPE_BOOLEAN, &succ, in wpas_dbus_signal_scan_done()
[all …]
/hostap-latest/src/ap/
Daccounting.c38 struct radius_msg *msg; in accounting_msg() local
46 msg = radius_msg_new(RADIUS_CODE_ACCOUNTING_REQUEST, in accounting_msg()
48 if (msg == NULL) { in accounting_msg()
53 if (!radius_msg_add_attr_int32(msg, RADIUS_ATTR_ACCT_STATUS_TYPE, in accounting_msg()
63 !radius_msg_add_attr_int32(msg, RADIUS_ATTR_ACCT_AUTHENTIC, in accounting_msg()
89 if (!radius_msg_add_attr(msg, RADIUS_ATTR_USER_NAME, val, in accounting_msg()
97 msg) < 0) in accounting_msg()
100 if (sta && add_sqlite_radius_attr(hapd, sta, msg, 1) < 0) in accounting_msg()
110 if (!radius_msg_add_attr(msg, RADIUS_ATTR_CLASS, in accounting_msg()
119 !radius_msg_add_attr(msg, in accounting_msg()
[all …]
/hostap-latest/src/eap_peer/
Dikev2.c822 struct wpabuf *msg, u8 exchange_type, in ikev2_build_hdr() argument
830 hdr = wpabuf_put(msg, sizeof(*hdr)); in ikev2_build_hdr()
842 struct wpabuf *msg, u8 next_payload) in ikev2_build_sar1() argument
852 phdr = wpabuf_put(msg, sizeof(*phdr)); in ikev2_build_sar1()
856 p = wpabuf_put(msg, sizeof(*p)); in ikev2_build_sar1()
861 t = wpabuf_put(msg, sizeof(*t)); in ikev2_build_sar1()
867 wpabuf_put_be16(msg, 0x800e); /* AF=1, AttrType=14 */ in ikev2_build_sar1()
868 wpabuf_put_be16(msg, 128); /* 128-bit key */ in ikev2_build_sar1()
870 plen = (u8 *) wpabuf_put(msg, 0) - (u8 *) t; in ikev2_build_sar1()
873 t = wpabuf_put(msg, sizeof(*t)); in ikev2_build_sar1()
[all …]
/hostap-latest/src/eap_common/
Deap_sim_common.c204 void eap_sim_add_mac(const u8 *k_aut, const u8 *msg, size_t msg_len, u8 *mac, in eap_sim_add_mac() argument
211 addr[0] = msg; in eap_sim_add_mac()
218 wpa_hexdump(MSG_MSGDUMP, "EAP-SIM: Add MAC - msg", msg, msg_len); in eap_sim_add_mac()
398 void eap_sim_add_mac_sha256(const u8 *k_aut, const u8 *msg, size_t msg_len, in eap_sim_add_mac_sha256() argument
405 addr[0] = msg; in eap_sim_add_mac_sha256()
412 wpa_hexdump(MSG_MSGDUMP, "EAP-AKA': Add MAC - msg", msg, msg_len); in eap_sim_add_mac_sha256()
982 struct eap_sim_msg *msg; in eap_sim_msg_init() local
986 msg = os_zalloc(sizeof(*msg)); in eap_sim_msg_init()
987 if (msg == NULL) in eap_sim_msg_init()
990 msg->buf = wpabuf_alloc(EAP_SIM_INIT_LEN); in eap_sim_msg_init()
[all …]
/hostap-latest/src/common/
Ddpp_reconfig.c23 static void dpp_build_attr_csign_key_hash(struct wpabuf *msg, const u8 *hash) in dpp_build_attr_csign_key_hash() argument
27 wpabuf_put_le16(msg, DPP_ATTR_C_SIGN_KEY_HASH); in dpp_build_attr_csign_key_hash()
28 wpabuf_put_le16(msg, SHA256_MAC_LEN); in dpp_build_attr_csign_key_hash()
29 wpabuf_put_data(msg, hash, SHA256_MAC_LEN); in dpp_build_attr_csign_key_hash()
40 struct wpabuf *msg = NULL; in dpp_build_reconfig_announcement() local
96 msg = dpp_alloc_msg(DPP_PA_RECONFIG_ANNOUNCEMENT, attr_len); in dpp_build_reconfig_announcement()
97 if (!msg) in dpp_build_reconfig_announcement()
101 dpp_build_attr_csign_key_hash(msg, hash); in dpp_build_reconfig_announcement()
106 wpabuf_put_le16(msg, DPP_ATTR_FINITE_CYCLIC_GROUP); in dpp_build_reconfig_announcement()
107 wpabuf_put_le16(msg, 2); in dpp_build_reconfig_announcement()
[all …]
/hostap-latest/src/crypto/
Dcrypto_linux.c453 struct msghdr msg; in linux_af_alg_skcipher_oper() local
460 os_memset(&msg, 0, sizeof(msg)); in linux_af_alg_skcipher_oper()
462 msg.msg_control = buf; in linux_af_alg_skcipher_oper()
463 msg.msg_controllen = CMSG_SPACE(sizeof(u32)); in linux_af_alg_skcipher_oper()
464 msg.msg_iov = io; in linux_af_alg_skcipher_oper()
465 msg.msg_iovlen = 1; in linux_af_alg_skcipher_oper()
466 hdr = CMSG_FIRSTHDR(&msg); in linux_af_alg_skcipher_oper()
473 ret = sendmsg(skcipher->t, &msg, 0); in linux_af_alg_skcipher_oper()
544 struct msghdr msg; in rc4_skip() local
562 os_memset(&msg, 0, sizeof(msg)); in rc4_skip()
[all …]

123456789