wpa_supplicant / hostapd
2.5
|
Wi-Fi Direct - P2P provision discovery. More...
#include "includes.h"
#include "common.h"
#include "common/ieee802_11_defs.h"
#include "common/wpa_ctrl.h"
#include "wps/wps_defs.h"
#include "p2p_i.h"
#include "p2p.h"
Macros | |
#define | MAX_PROV_DISC_REQ_RETRIES 120 |
#define | P2PS_PD_RESP_CHECK(_val, _attr) |
Functions | |
void | p2p_process_prov_disc_req (struct p2p_data *p2p, const u8 *sa, const u8 *data, size_t len, int rx_freq) |
void | p2p_process_prov_disc_resp (struct p2p_data *p2p, const u8 *sa, const u8 *data, size_t len) |
int | p2p_send_prov_disc_req (struct p2p_data *p2p, struct p2p_device *dev, int join, int force_freq) |
int | p2p_prov_disc_req (struct p2p_data *p2p, const u8 *peer_addr, struct p2ps_provision *p2ps_prov, u16 config_methods, int join, int force_freq, int user_initiated_pd) |
Send Provision Discovery Request. More... | |
void | p2p_reset_pending_pd (struct p2p_data *p2p) |
void | p2ps_prov_free (struct p2p_data *p2p) |
Wi-Fi Direct - P2P provision discovery.
#define P2PS_PD_RESP_CHECK | ( | _val, | |
_attr | |||
) |
int p2p_prov_disc_req | ( | struct p2p_data * | p2p, |
const u8 * | peer_addr, | ||
struct p2ps_provision * | p2ps_prov, | ||
u16 | config_methods, | ||
int | join, | ||
int | force_freq, | ||
int | user_initiated_pd | ||
) |
Send Provision Discovery Request.
p2p | P2P module context from p2p_init() |
peer_addr | MAC address of the peer P2P client |
p2ps_prov | Provisioning info for P2PS |
config_methods | WPS Config Methods value (only one bit set) |
join | Whether this is used by a client joining an active group |
force_freq | Forced TX frequency for the frame (mainly for the join case) |
user_initiated_pd | Flag to indicate if initiated by user or not |
This function can be used to request a discovered P2P peer to display a PIN (config_methods = WPS_CONFIG_DISPLAY) or be prepared to enter a PIN from us (config_methods = WPS_CONFIG_KEYPAD). The Provision Discovery Request frame is transmitted once immediately and if no response is received, the frame will be sent again whenever the target device is discovered during device dsicovery (start with a p2p_find() call). Response from the peer is indicated with the p2p_config::prov_disc_resp() callback.