Lines Matching refs:p2p

186 void p2p_buf_add_device_info(struct wpabuf *buf, struct p2p_data *p2p,  in p2p_buf_add_device_info()  argument
198 wpabuf_put_data(buf, p2p->cfg->dev_addr, ETH_ALEN); in p2p_buf_add_device_info()
210 } else if (p2p->cfg->config_methods) { in p2p_buf_add_device_info()
211 methods |= p2p->cfg->config_methods & in p2p_buf_add_device_info()
222 wpabuf_put_data(buf, p2p->cfg->pri_dev_type, in p2p_buf_add_device_info()
223 sizeof(p2p->cfg->pri_dev_type)); in p2p_buf_add_device_info()
226 wpabuf_put_u8(buf, p2p->cfg->num_sec_dev_types); in p2p_buf_add_device_info()
229 for (i = 0; i < p2p->cfg->num_sec_dev_types; i++) in p2p_buf_add_device_info()
230 wpabuf_put_data(buf, p2p->cfg->sec_dev_type[i], in p2p_buf_add_device_info()
234 nlen = p2p->cfg->dev_name ? os_strlen(p2p->cfg->dev_name) : 0; in p2p_buf_add_device_info()
237 wpabuf_put_data(buf, p2p->cfg->dev_name, nlen); in p2p_buf_add_device_info()
353 void p2p_buf_add_p2p_interface(struct wpabuf *buf, struct p2p_data *p2p) in p2p_buf_add_p2p_interface() argument
359 wpabuf_put_data(buf, p2p->cfg->dev_addr, ETH_ALEN); in p2p_buf_add_p2p_interface()
366 wpabuf_put_data(buf, p2p->cfg->dev_addr, ETH_ALEN); in p2p_buf_add_p2p_interface()
387 void p2p_buf_add_service_hash(struct wpabuf *buf, struct p2p_data *p2p) in p2p_buf_add_service_hash() argument
389 if (!p2p) in p2p_buf_add_service_hash()
394 wpabuf_put_le16(buf, p2p->p2ps_seek_count * P2PS_HASH_LEN); in p2p_buf_add_service_hash()
395 wpabuf_put_data(buf, p2p->p2ps_seek_hash, in p2p_buf_add_service_hash()
396 p2p->p2ps_seek_count * P2PS_HASH_LEN); in p2p_buf_add_service_hash()
398 p2p->p2ps_seek_hash, p2p->p2ps_seek_count * P2PS_HASH_LEN); in p2p_buf_add_service_hash()
446 static int p2ps_wildcard_hash(struct p2p_data *p2p, in p2ps_wildcard_hash() argument
453 if (os_memcmp(test, p2p->wild_card_hash, P2PS_HASH_LEN) == 0) in p2ps_wildcard_hash()
462 static int p2p_wfa_service_adv(struct p2p_data *p2p) in p2p_wfa_service_adv() argument
466 for (adv = p2p->p2ps_adv_list; adv; adv = adv->next) { in p2p_wfa_service_adv()
476 static int p2p_buf_add_service_info(struct wpabuf *buf, struct p2p_data *p2p, in p2p_buf_add_service_info() argument
485 p2p_dbg(p2p, "Add service info for %s (adv_id=%u)", svc_name, adv_id); in p2p_buf_add_service_info()
491 p2p_dbg(p2p, in p2p_buf_add_service_info()
497 p2p_dbg(p2p, in p2p_buf_add_service_info()
507 p2p_dbg(p2p, in p2p_buf_add_service_info()
594 void p2p_buf_add_service_instance(struct wpabuf *buf, struct p2p_data *p2p, in p2p_buf_add_service_instance() argument
609 p2ps_wildcard = p2ps_wildcard_hash(p2p, hash, hash_count) && in p2p_buf_add_service_instance()
610 p2p_wfa_service_adv(p2p); in p2p_buf_add_service_instance()
633 p2p_buf_add_service_info(tmp_buf, p2p, 0, 0, P2PS_WILD_HASH_STR, in p2p_buf_add_service_instance()
646 p2p_buf_add_service_info(tmp_buf, p2p, in p2p_buf_add_service_instance()
736 int p2p_build_wps_ie(struct p2p_data *p2p, struct wpabuf *buf, int pw_id, in p2p_build_wps_ie() argument
777 if (wps_build_uuid_e(buf, p2p->cfg->uuid) < 0 || in p2p_build_wps_ie()
779 p2p->cfg->manufacturer) < 0 || in p2p_build_wps_ie()
781 p2p->cfg->model_name) < 0 || in p2p_build_wps_ie()
783 p2p->cfg->model_number) < 0 || in p2p_build_wps_ie()
785 p2p->cfg->serial_number) < 0) in p2p_build_wps_ie()
792 wpabuf_put_data(buf, p2p->cfg->pri_dev_type, WPS_DEV_TYPE_LEN); in p2p_build_wps_ie()
794 if (p2p_add_wps_string(buf, ATTR_DEV_NAME, p2p->cfg->dev_name) in p2p_build_wps_ie()
802 wpabuf_put_be16(buf, p2p->cfg->config_methods); in p2p_build_wps_ie()
808 if (all_attr && p2p->cfg->num_sec_dev_types) { in p2p_build_wps_ie()
810 4 + WPS_DEV_TYPE_LEN * p2p->cfg->num_sec_dev_types) in p2p_build_wps_ie()
814 p2p->cfg->num_sec_dev_types); in p2p_build_wps_ie()
815 wpabuf_put_data(buf, p2p->cfg->sec_dev_type, in p2p_build_wps_ie()
817 p2p->cfg->num_sec_dev_types); in p2p_build_wps_ie()
822 if (p2p->wps_vendor_ext[i] == NULL) in p2p_build_wps_ie()
825 4 + wpabuf_len(p2p->wps_vendor_ext[i])) in p2p_build_wps_ie()
828 wpabuf_put_be16(buf, wpabuf_len(p2p->wps_vendor_ext[i])); in p2p_build_wps_ie()
829 wpabuf_put_buf(buf, p2p->wps_vendor_ext[i]); in p2p_build_wps_ie()