Lines Matching refs:resp
2038 static void wpas_sd_add_proto_not_avail(struct wpabuf *resp, u8 srv_proto,
2043 if (wpabuf_tailroom(resp) < 5)
2047 len_pos = wpabuf_put(resp, 2);
2048 wpabuf_put_u8(resp, srv_proto);
2049 wpabuf_put_u8(resp, srv_trans_id);
2051 wpabuf_put_u8(resp, P2P_SD_PROTO_NOT_AVAILABLE);
2053 WPA_PUT_LE16(len_pos, (u8 *) wpabuf_put(resp, 0) - len_pos - 2);
2058 struct wpabuf *resp, u8 srv_trans_id)
2072 if (wpabuf_tailroom(resp) <
2073 5 + wpabuf_len(bsrv->query) + wpabuf_len(bsrv->resp))
2076 len_pos = wpabuf_put(resp, 2);
2077 wpabuf_put_u8(resp, P2P_SERV_BONJOUR);
2078 wpabuf_put_u8(resp, srv_trans_id);
2080 wpabuf_put_u8(resp, P2P_SD_SUCCESS);
2082 wpabuf_head(bsrv->resp),
2083 wpabuf_len(bsrv->resp));
2085 wpabuf_put_buf(resp, bsrv->query); /* Key */
2086 wpabuf_put_buf(resp, bsrv->resp); /* Value */
2087 WPA_PUT_LE16(len_pos, (u8 *) wpabuf_put(resp, 0) - len_pos -
2121 struct wpabuf *resp, u8 srv_trans_id,
2132 wpas_sd_add_proto_not_avail(resp, P2P_SERV_BONJOUR,
2138 wpas_sd_all_bonjour(wpa_s, resp, srv_trans_id);
2147 if (wpabuf_tailroom(resp) <
2148 5 + query_len + wpabuf_len(bsrv->resp))
2154 len_pos = wpabuf_put(resp, 2);
2155 wpabuf_put_u8(resp, P2P_SERV_BONJOUR);
2156 wpabuf_put_u8(resp, srv_trans_id);
2159 wpabuf_put_u8(resp, P2P_SD_SUCCESS);
2161 wpabuf_head(bsrv->resp),
2162 wpabuf_len(bsrv->resp));
2165 wpabuf_put_data(resp, query, query_len); /* Key */
2166 wpabuf_put_buf(resp, bsrv->resp); /* Value */
2168 WPA_PUT_LE16(len_pos, (u8 *) wpabuf_put(resp, 0) - len_pos - 2);
2174 if (wpabuf_tailroom(resp) < 5)
2178 len_pos = wpabuf_put(resp, 2);
2179 wpabuf_put_u8(resp, P2P_SERV_BONJOUR);
2180 wpabuf_put_u8(resp, srv_trans_id);
2183 wpabuf_put_u8(resp, P2P_SD_REQUESTED_INFO_NOT_AVAILABLE);
2185 WPA_PUT_LE16(len_pos, (u8 *) wpabuf_put(resp, 0) - len_pos -
2192 struct wpabuf *resp, u8 srv_trans_id)
2206 if (wpabuf_tailroom(resp) < 5 + 1 + os_strlen(usrv->service))
2210 len_pos = wpabuf_put(resp, 2);
2211 wpabuf_put_u8(resp, P2P_SERV_UPNP);
2212 wpabuf_put_u8(resp, srv_trans_id);
2215 wpabuf_put_u8(resp, P2P_SD_SUCCESS);
2217 wpabuf_put_u8(resp, usrv->version);
2220 wpabuf_put_str(resp, usrv->service);
2221 WPA_PUT_LE16(len_pos, (u8 *) wpabuf_put(resp, 0) - len_pos -
2228 struct wpabuf *resp, u8 srv_trans_id,
2242 wpas_sd_add_proto_not_avail(resp, P2P_SERV_UPNP,
2248 wpas_sd_all_upnp(wpa_s, resp, srv_trans_id);
2252 if (wpabuf_tailroom(resp) < 5)
2256 len_pos = wpabuf_put(resp, 2);
2257 wpabuf_put_u8(resp, P2P_SERV_UPNP);
2258 wpabuf_put_u8(resp, srv_trans_id);
2276 if (wpabuf_tailroom(resp) < 2)
2280 wpabuf_put_u8(resp, P2P_SD_SUCCESS);
2282 wpabuf_put_u8(resp, version);
2284 wpabuf_put_u8(resp, ',');
2290 if (wpabuf_tailroom(resp) < os_strlen(usrv->service))
2292 wpabuf_put_str(resp, usrv->service);
2300 wpabuf_put_u8(resp, P2P_SD_REQUESTED_INFO_NOT_AVAILABLE);
2304 WPA_PUT_LE16(len_pos, (u8 *) wpabuf_put(resp, 0) - len_pos - 2);
2310 struct wpabuf *resp, u8 srv_trans_id,
2321 wpas_sd_add_proto_not_avail(resp, P2P_SERV_WIFI_DISPLAY,
2332 if (wpabuf_tailroom(resp) < 5)
2342 len_pos = wpabuf_put(resp, 2);
2343 wpabuf_put_u8(resp, P2P_SERV_WIFI_DISPLAY);
2344 wpabuf_put_u8(resp, srv_trans_id);
2345 wpabuf_put_u8(resp, P2P_SD_SUCCESS); /* Status Code */
2350 wpabuf_tailroom(resp) >=
2354 wpabuf_put_buf(resp, wpa_s->global->wfd_subelem[*pos]);
2359 WPA_PUT_LE16(len_pos, (u8 *) wpabuf_put(resp, 0) - len_pos - 2);
2372 struct wpabuf *resp;
2396 resp = wpabuf_alloc(10000);
2397 if (resp == NULL)
2407 wpabuf_free(resp);
2426 wpas_sd_all_bonjour(wpa_s, resp, srv_trans_id);
2427 wpas_sd_all_upnp(wpa_s, resp, srv_trans_id);
2440 resp, P2P_SERV_ALL_SERVICES,
2444 wpas_sd_all_bonjour(wpa_s, resp, srv_trans_id);
2445 wpas_sd_all_upnp(wpa_s, resp, srv_trans_id);
2448 wpas_sd_req_bonjour(wpa_s, resp, srv_trans_id,
2452 wpas_sd_req_upnp(wpa_s, resp, srv_trans_id,
2457 wpas_sd_req_wfd(wpa_s, resp, srv_trans_id,
2464 wpas_sd_add_proto_not_avail(resp, srv_proto,
2476 wpas_p2p_sd_response(wpa_s, freq, sa, dialog_token, resp);
2478 wpabuf_free(resp);
2687 wpabuf_free(bsrv->resp);
2718 struct wpabuf *query, struct wpabuf *resp)
2726 bsrv->resp = resp;