wpa_supplicant / hostapd
2.5
|
Wi-Fi Direct - P2P service discovery. More...
#include "includes.h"
#include "common.h"
#include "common/ieee802_11_defs.h"
#include "common/gas.h"
#include "p2p_i.h"
#include "p2p.h"
Functions | |
struct p2p_sd_query * | p2p_pending_sd_req (struct p2p_data *p2p, struct p2p_device *dev) |
void | p2p_free_sd_queries (struct p2p_data *p2p) |
int | p2p_start_sd (struct p2p_data *p2p, struct p2p_device *dev) |
void | p2p_rx_gas_initial_req (struct p2p_data *p2p, const u8 *sa, const u8 *data, size_t len, int rx_freq) |
void | p2p_sd_response (struct p2p_data *p2p, int freq, const u8 *dst, u8 dialog_token, const struct wpabuf *resp_tlvs) |
Send response to a service discovery query. More... | |
void | p2p_rx_gas_initial_resp (struct p2p_data *p2p, const u8 *sa, const u8 *data, size_t len, int rx_freq) |
void | p2p_rx_gas_comeback_req (struct p2p_data *p2p, const u8 *sa, const u8 *data, size_t len, int rx_freq) |
void | p2p_rx_gas_comeback_resp (struct p2p_data *p2p, const u8 *sa, const u8 *data, size_t len, int rx_freq) |
void * | p2p_sd_request (struct p2p_data *p2p, const u8 *dst, const struct wpabuf *tlvs) |
Schedule a service discovery query. More... | |
void | p2p_sd_service_update (struct p2p_data *p2p) |
Indicate a change in local services. More... | |
int | p2p_sd_cancel_request (struct p2p_data *p2p, void *req) |
Cancel a pending service discovery query. More... | |
Wi-Fi Direct - P2P service discovery.
int p2p_sd_cancel_request | ( | struct p2p_data * | p2p, |
void * | req | ||
) |
Cancel a pending service discovery query.
p2p | P2P module context from p2p_init() |
req | Query reference from p2p_sd_request() |
Schedule a service discovery query.
p2p | P2P module context from p2p_init() |
dst | Destination peer or NULL to apply for all peers |
tlvs | P2P Service Query TLV(s) |
Response to the query is indicated with the p2p_config::sd_response() callback.
void p2p_sd_response | ( | struct p2p_data * | p2p, |
int | freq, | ||
const u8 * | dst, | ||
u8 | dialog_token, | ||
const struct wpabuf * | resp_tlvs | ||
) |
Send response to a service discovery query.
p2p | P2P module context from p2p_init() |
freq | Frequency from p2p_config::sd_request() callback |
dst | Destination address from p2p_config::sd_request() callback |
dialog_token | Dialog token from p2p_config::sd_request() callback |
resp_tlvs | P2P Service Response TLV(s) |
This function is called as a response to the request indicated with p2p_config::sd_request() callback.
void p2p_sd_service_update | ( | struct p2p_data * | p2p | ) |
Indicate a change in local services.
p2p | P2P module context from p2p_init() |
This function needs to be called whenever there is a change in availability of the local services. This will increment the Service Update Indicator value which will be used in SD Request and Response frames.