wpa_supplicant / hostapd
2.5
|
P2P configuration. More...
#include <p2p.h>
Data Fields | |
char | country [3] |
Country code to use in P2P operations. | |
u8 | reg_class |
Regulatory class for own listen channel. | |
u8 | channel |
Own listen channel. | |
u8 | channel_forced |
the listen channel was forced by configuration or by control interface and cannot be overridden | |
u8 | op_reg_class |
Regulatory class for own operational channel. | |
u8 | op_channel |
Own operational channel. | |
u8 | cfg_op_channel |
Whether op_channel is hardcoded in configuration. | |
struct p2p_channels | channels |
Own supported regulatory classes and channels. More... | |
struct p2p_channels | cli_channels |
Additional client channels. More... | |
unsigned int | num_pref_chan |
Number of pref_chan entries. | |
struct p2p_channel * | pref_chan |
Preferred channels for GO Negotiation. | |
u8 | pri_dev_type [8] |
Primary Device Type (see WPS) | |
u8 | sec_dev_type [P2P_SEC_DEVICE_TYPES][8] |
Optional secondary device types. | |
size_t | num_sec_dev_types |
Number of sec_dev_type entries. | |
u8 | dev_addr [ETH_ALEN] |
P2P Device Address. | |
char * | dev_name |
Device Name. | |
char * | manufacturer |
char * | model_name |
char * | model_number |
char * | serial_number |
u8 | uuid [16] |
u16 | config_methods |
int | concurrent_operations |
Whether concurrent operations are supported. | |
size_t | max_peers |
Maximum number of discovered peers to remember. More... | |
int | p2p_intra_bss |
Intra BSS communication is supported. | |
u8 | ssid_postfix [SSID_MAX_LEN-9] |
Postfix data to add to the SSID. More... | |
size_t | ssid_postfix_len |
Length of the ssid_postfix data. | |
unsigned int | max_listen |
Maximum listen duration in ms. | |
unsigned int | passphrase_len |
Passphrase length (8..63) More... | |
void * | cb_ctx |
Context to use with callback functions. | |
void(* | debug_print )(void *ctx, int level, const char *msg) |
Debug print. More... | |
int(* | p2p_scan )(void *ctx, enum p2p_scan_type type, int freq, unsigned int num_req_dev_types, const u8 *req_dev_types, const u8 *dev_id, u16 pw_id) |
Request a P2P scan/search. More... | |
int(* | send_probe_resp )(void *ctx, const struct wpabuf *buf, unsigned int freq) |
Transmit a Probe Response frame. More... | |
int(* | send_action )(void *ctx, unsigned int freq, const u8 *dst, const u8 *src, const u8 *bssid, const u8 *buf, size_t len, unsigned int wait_time) |
Transmit an Action frame. More... | |
void(* | send_action_done )(void *ctx) |
Notify that Action frame sequence was completed. More... | |
int(* | start_listen )(void *ctx, unsigned int freq, unsigned int duration, const struct wpabuf *probe_resp_ie) |
Start Listen state. More... | |
void(* | stop_listen )(void *ctx) |
Stop Listen state. More... | |
int(* | get_noa )(void *ctx, const u8 *interface_addr, u8 *buf, size_t buf_len) |
Get current Notice of Absence attribute payload. More... | |
void(* | dev_found )(void *ctx, const u8 *addr, const struct p2p_peer_info *info, int new_device) |
Notification of a found P2P Device. More... | |
void(* | dev_lost )(void *ctx, const u8 *dev_addr) |
Notification of a lost P2P Device. More... | |
void(* | find_stopped )(void *ctx) |
Notification of a p2p_find operation stopping. More... | |
void(* | go_neg_req_rx )(void *ctx, const u8 *src, u16 dev_passwd_id, u8 go_intent) |
Notification of a receive GO Negotiation Request. More... | |
void(* | go_neg_completed )(void *ctx, struct p2p_go_neg_results *res) |
Notification of GO Negotiation results. More... | |
void(* | sd_request )(void *ctx, int freq, const u8 *sa, u8 dialog_token, u16 update_indic, const u8 *tlvs, size_t tlvs_len) |
Callback on Service Discovery Request. More... | |
void(* | sd_response )(void *ctx, const u8 *sa, u16 update_indic, const u8 *tlvs, size_t tlvs_len) |
Callback on Service Discovery Response. More... | |
void(* | prov_disc_req )(void *ctx, const u8 *peer, u16 config_methods, const u8 *dev_addr, const u8 *pri_dev_type, const char *dev_name, u16 supp_config_methods, u8 dev_capab, u8 group_capab, const u8 *group_id, size_t group_id_len) |
Callback on Provisiong Discovery Request. More... | |
void(* | prov_disc_resp )(void *ctx, const u8 *peer, u16 config_methods) |
Callback on Provisiong Discovery Response. More... | |
void(* | prov_disc_fail )(void *ctx, const u8 *peer, enum p2p_prov_disc_status status, u32 adv_id, const u8 *adv_mac, const char *deferred_session_resp) |
Callback on Provision Discovery failure. More... | |
u8(* | invitation_process )(void *ctx, const u8 *sa, const u8 *bssid, const u8 *go_dev_addr, const u8 *ssid, size_t ssid_len, int *go, u8 *group_bssid, int *force_freq, int persistent_group, const struct p2p_channels *channels, int dev_pw_id) |
Optional callback for processing Invitations. More... | |
void(* | invitation_received )(void *ctx, const u8 *sa, const u8 *bssid, const u8 *ssid, size_t ssid_len, const u8 *go_dev_addr, u8 status, int op_freq) |
Callback on Invitation Request RX. More... | |
void(* | invitation_result )(void *ctx, int status, const u8 *bssid, const struct p2p_channels *channels, const u8 *addr, int freq, int peer_oper_freq) |
Callback on Invitation result. More... | |
int(* | go_connected )(void *ctx, const u8 *dev_addr) |
Check whether we are connected to a GO. More... | |
void(* | presence_resp )(void *ctx, const u8 *src, u8 status, const u8 *noa, size_t noa_len) |
Callback on Presence Response. More... | |
int(* | is_concurrent_session_active )(void *ctx) |
Check whether concurrent session is active on other virtual interfaces. More... | |
int(* | is_p2p_in_progress )(void *ctx) |
Check whether P2P operation is in progress. More... | |
int(* | get_persistent_group )(void *ctx, const u8 *addr, const u8 *ssid, size_t ssid_len, u8 *go_dev_addr, u8 *ret_ssid, size_t *ret_ssid_len, u8 *intended_iface_addr) |
Determine if we have a persistent group we share with remote peer and allocate interface for this group if needed. More... | |
int(* | get_go_info )(void *ctx, u8 *intended_addr, u8 *ssid, size_t *ssid_len, int *group_iface) |
Get information about a possible local GO role. More... | |
int(* | remove_stale_groups )(void *ctx, const u8 *peer, const u8 *go, const u8 *ssid, size_t ssid_len) |
Remove stale P2PS groups. More... | |
void(* | p2ps_prov_complete )(void *ctx, u8 status, const u8 *dev, const u8 *adv_mac, const u8 *ses_mac, const u8 *grp_mac, u32 adv_id, u32 ses_id, u8 conncap, int passwd_id, const u8 *persist_ssid, size_t persist_ssid_size, int response_done, int prov_start, const char *session_info, const u8 *feat_cap, size_t feat_cap_len) |
P2PS provisioning complete. More... | |
int(* | prov_disc_resp_cb )(void *ctx) |
Callback for indicating completion of PD Response. More... | |
u8(* | p2ps_group_capability )(void *ctx, u8 incoming, u8 role) |
Determine group capability. More... | |
int(* | get_pref_freq_list )(void *ctx, int go, unsigned int *len, unsigned int *freq_list) |
Get preferred frequency list for an interface. More... | |
P2P configuration.
This configuration is provided to the P2P module during initialization with p2p_init().
struct p2p_channels p2p_config::channels |
Own supported regulatory classes and channels.
List of supposerted channels per regulatory class. The regulatory classes are defined in IEEE Std 802.11-2007 Annex J and the numbering of the clases depends on the configured country code.
struct p2p_channels p2p_config::cli_channels |
Additional client channels.
This list of channels (if any) will be used when advertising local channels during GO Negotiation or Invitation for the cases where the local end may become the client. This may allow the peer to become a GO on additional channels if it supports these options. The main use case for this is to include passive-scan channels on devices that may not know their current location and have configured most channels to not allow initiation of radition (i.e., another device needs to take master responsibilities).
void(* p2p_config::debug_print)(void *ctx, int level, const char *msg) |
Debug print.
ctx | Callback context from cb_ctx |
level | Debug verbosity level (MSG_*) |
msg | Debug message |
void(* p2p_config::dev_found)(void *ctx, const u8 *addr, const struct p2p_peer_info *info, int new_device) |
Notification of a found P2P Device.
ctx | Callback context from cb_ctx |
addr | Source address of the message triggering this notification |
info | P2P peer information |
new_device | Inform if the peer is newly found This callback is used to notify that a new P2P Device has been found. This may happen, e.g., during Search state based on scan results or during Listen state based on receive Probe Request and Group Owner Negotiation Request. |
void(* p2p_config::dev_lost)(void *ctx, const u8 *dev_addr) |
Notification of a lost P2P Device.
ctx | Callback context from cb_ctx |
dev_addr | P2P Device Address of the lost P2P Device This callback is used to notify that a P2P Device has been deleted. |
void(* p2p_config::find_stopped)(void *ctx) |
Notification of a p2p_find operation stopping.
ctx | Callback context from cb_ctx |
int(* p2p_config::get_go_info)(void *ctx, u8 *intended_addr, u8 *ssid, size_t *ssid_len, int *group_iface) |
Get information about a possible local GO role.
ctx | Callback context from cb_ctx |
intended_addr | Buffer for returning intended GO interface address |
ssid | Buffer for returning group SSID |
ssid_len | Buffer for returning length of ssid |
group_iface | Buffer for returning whether a separate group interface would be used |
This is used to compose New Group settings (SSID, and intended address) during P2PS provisioning if results of provisioning *might* result in our being an autonomous GO.
int(* p2p_config::get_noa)(void *ctx, const u8 *interface_addr, u8 *buf, size_t buf_len) |
Get current Notice of Absence attribute payload.
ctx | Callback context from cb_ctx |
interface_addr | P2P Interface Address of the GO |
buf | Buffer for returning NoA |
buf_len | Buffer length in octets |
This function is used to fetch the current Notice of Absence attribute value from GO.
int(* p2p_config::get_persistent_group)(void *ctx, const u8 *addr, const u8 *ssid, size_t ssid_len, u8 *go_dev_addr, u8 *ret_ssid, size_t *ret_ssid_len, u8 *intended_iface_addr) |
Determine if we have a persistent group we share with remote peer and allocate interface for this group if needed.
ctx | Callback context from cb_ctx |
addr | Peer device address to search for |
ssid | Persistent group SSID or NULL if any |
ssid_len | Length of ssid |
go_dev_addr | Buffer for returning GO P2P Device Address |
ret_ssid | Buffer for returning group SSID |
ret_ssid_len | Buffer for returning length of ssid |
intended_iface_addr | Buffer for returning intended iface address |
int(* p2p_config::get_pref_freq_list)(void *ctx, int go, unsigned int *len, unsigned int *freq_list) |
Get preferred frequency list for an interface.
ctx | Callback context from cb_ctx |
go | Whether the use if for GO role |
len | Length of freq_list in entries (both IN and OUT) |
freq_list | Buffer for returning the preferred frequencies (MHz) |
This function can be used to query the preferred frequency list from the driver specific to a particular interface type.
int(* p2p_config::go_connected)(void *ctx, const u8 *dev_addr) |
Check whether we are connected to a GO.
ctx | Callback context from cb_ctx |
dev_addr | P2P Device Address of a GO |
void(* p2p_config::go_neg_completed)(void *ctx, struct p2p_go_neg_results *res) |
Notification of GO Negotiation results.
ctx | Callback context from cb_ctx |
res | GO Negotiation results This callback is used to notify that Group Owner Negotiation has been completed. Non-zero struct p2p_go_neg_results::status indicates failed negotiation. In case of success, this function is responsible for creating a new group interface (or using the existing interface depending on driver features), setting up the group interface in proper mode based on struct p2p_go_neg_results::role_go and initializing WPS provisioning either as a Registrar (if GO) or as an Enrollee. Successful WPS provisioning must be indicated by calling p2p_wps_success_cb(). The callee is responsible for timing out group formation if WPS provisioning cannot be completed successfully within 15 seconds. |
void(* p2p_config::go_neg_req_rx)(void *ctx, const u8 *src, u16 dev_passwd_id, u8 go_intent) |
Notification of a receive GO Negotiation Request.
ctx | Callback context from cb_ctx |
src | Source address of the message triggering this notification |
dev_passwd_id | WPS Device Password ID |
go_intent | Peer's GO Intent This callback is used to notify that a P2P Device is requesting group owner negotiation with us, but we do not have all the necessary information to start GO Negotiation. This indicates that the local user has not authorized the connection yet by providing a PIN or PBC button press. This information can be provided with a call to p2p_connect(). |
u8(* p2p_config::invitation_process)(void *ctx, const u8 *sa, const u8 *bssid, const u8 *go_dev_addr, const u8 *ssid, size_t ssid_len, int *go, u8 *group_bssid, int *force_freq, int persistent_group, const struct p2p_channels *channels, int dev_pw_id) |
Optional callback for processing Invitations.
ctx | Callback context from cb_ctx |
sa | Source address of the Invitation Request |
bssid | P2P Group BSSID from the request or NULL if not included |
go_dev_addr | GO Device Address from P2P Group ID |
ssid | SSID from P2P Group ID |
ssid_len | Length of ssid buffer in octets |
go | Variable for returning whether the local end is GO in the group |
group_bssid | Buffer for returning P2P Group BSSID (if local end GO) |
force_freq | Variable for returning forced frequency for the group |
persistent_group | Whether this is an invitation to reinvoke a persistent group (instead of invitation to join an active group) |
channels | Available operating channels for the group |
dev_pw_id | Device Password ID for NFC static handover or -1 if not used |
This optional callback can be used to implement persistent reconnect by allowing automatic restarting of persistent groups without user interaction. If this callback is not implemented (i.e., is %NULL), the received Invitation Request frames are replied with %P2P_SC_REQ_RECEIVED status and indicated to upper layer with the invitation_result() callback. If the requested parameters are acceptable and the group is known, %P2P_SC_SUCCESS may be returned. If the requested group is unknown, %P2P_SC_FAIL_UNKNOWN_GROUP should be returned. %P2P_SC_REQ_RECEIVED can be returned if there is not enough data to provide immediate response, i.e., if some sort of user interaction is needed. The invitation_received() callback will be called in that case immediately after this call.
void(* p2p_config::invitation_received)(void *ctx, const u8 *sa, const u8 *bssid, const u8 *ssid, size_t ssid_len, const u8 *go_dev_addr, u8 status, int op_freq) |
Callback on Invitation Request RX.
ctx | Callback context from cb_ctx |
sa | Source address of the Invitation Request |
bssid | P2P Group BSSID or NULL if not received |
ssid | SSID of the group |
ssid_len | Length of ssid in octets |
go_dev_addr | GO Device Address |
status | Response Status |
op_freq | Operational frequency for the group This callback is used to indicate sending of an Invitation Response for a received Invitation Request. If status == 0 (success), the upper layer code is responsible for starting the group. status == 1 indicates need to get user authorization for the group. Other status values indicate that the invitation request was rejected. |
void(* p2p_config::invitation_result)(void *ctx, int status, const u8 *bssid, const struct p2p_channels *channels, const u8 *addr, int freq, int peer_oper_freq) |
Callback on Invitation result.
ctx | Callback context from cb_ctx |
status | Negotiation result (Status Code) |
bssid | P2P Group BSSID or NULL if not received |
channels | Available operating channels for the group |
addr | Peer address |
freq | Frequency (in MHz) indicated during invitation or 0 |
peer_oper_freq | Operating frequency (in MHz) advertized by the peer during invitation or 0 |
This callback is used to indicate result of an Invitation procedure started with a call to p2p_invite(). The indicated status code is the value received from the peer in Invitation Response with 0 (P2P_SC_SUCCESS) indicating success or -1 to indicate a timeout or a local failure in transmitting the Invitation Request.
int(* p2p_config::is_concurrent_session_active)(void *ctx) |
Check whether concurrent session is active on other virtual interfaces.
ctx | Callback context from cb_ctx |
int(* p2p_config::is_p2p_in_progress)(void *ctx) |
Check whether P2P operation is in progress.
ctx | Callback context from cb_ctx |
size_t p2p_config::max_peers |
Maximum number of discovered peers to remember.
If more peers are discovered, older entries will be removed to make room for the new ones.
int(* p2p_config::p2p_scan)(void *ctx, enum p2p_scan_type type, int freq, unsigned int num_req_dev_types, const u8 *req_dev_types, const u8 *dev_id, u16 pw_id) |
Request a P2P scan/search.
ctx | Callback context from cb_ctx |
type | Scan type |
freq | Specific frequency (MHz) to scan or 0 for no restriction |
num_req_dev_types | Number of requested device types |
req_dev_types | Array containing requested device types |
dev_id | Device ID to search for or NULL to find all devices |
pw_id | Device Password ID |
This callback function is used to request a P2P scan or search operation to be completed. Type type argument specifies which type of scan is to be done. \a P2P_SCAN_SOCIAL indicates that only the social channels (1, 6, 11) should be scanned. \a P2P_SCAN_FULL indicates that all channels are to be scanned. \a P2P_SCAN_SPECIFIC request a scan of a single channel specified by freq.
P2P_SCAN_SOCIAL_PLUS_ONE | request scan of all the social channels plus one extra channel specified by freq. |
The full scan is used for the initial scan to find group owners from all. The other types are used during search phase scan of the social channels (with potential variation if the Listen channel of the target peer is known or if other channels are scanned in steps).
The scan results are returned after this call by calling p2p_scan_res_handler() for each scan result that has a P2P IE and then calling p2p_scan_res_handled() to indicate that all scan results have been indicated.
u8(* p2p_config::p2ps_group_capability)(void *ctx, u8 incoming, u8 role) |
Determine group capability.
This function can be used to determine group capability based on information from P2PS PD exchange and the current state of ongoing groups and driver capabilities.
P2PS_SETUP_* bitmap is used as the parameters and return value.
void(* p2p_config::p2ps_prov_complete)(void *ctx, u8 status, const u8 *dev, const u8 *adv_mac, const u8 *ses_mac, const u8 *grp_mac, u32 adv_id, u32 ses_id, u8 conncap, int passwd_id, const u8 *persist_ssid, size_t persist_ssid_size, int response_done, int prov_start, const char *session_info, const u8 *feat_cap, size_t feat_cap_len) |
P2PS provisioning complete.
When P2PS provisioning completes (successfully or not) we must transmit all of the results to the upper layers.
unsigned int p2p_config::passphrase_len |
Passphrase length (8..63)
This parameter controls the length of the random passphrase that is generated at the GO.
void(* p2p_config::presence_resp)(void *ctx, const u8 *src, u8 status, const u8 *noa, size_t noa_len) |
Callback on Presence Response.
ctx | Callback context from cb_ctx |
src | Source address (GO's P2P Interface Address) |
status | Result of the request (P2P_SC_*) |
noa | Returned NoA value |
noa_len | Length of the NoA buffer in octets |
void(* p2p_config::prov_disc_fail)(void *ctx, const u8 *peer, enum p2p_prov_disc_status status, u32 adv_id, const u8 *adv_mac, const char *deferred_session_resp) |
Callback on Provision Discovery failure.
ctx | Callback context from cb_ctx |
peer | Source address of the response |
status | Cause of failure, will not be P2P_PROV_DISC_SUCCESS |
adv_id | If non-zero, then the adv_id of the PD Request |
adv_mac | P2P Device Address of the advertizer |
deferred_session_resp | Deferred session response sent by advertizer This callback is used to indicate either a failure or no response to an earlier provision discovery request. This callback handler can be set to %NULL if provision discovery is not used or failures do not need to be indicated. |
void(* p2p_config::prov_disc_req)(void *ctx, const u8 *peer, u16 config_methods, const u8 *dev_addr, const u8 *pri_dev_type, const char *dev_name, u16 supp_config_methods, u8 dev_capab, u8 group_capab, const u8 *group_id, size_t group_id_len) |
Callback on Provisiong Discovery Request.
ctx | Callback context from cb_ctx |
peer | Source address of the request |
config_methods | Requested WPS Config Method |
dev_addr | P2P Device Address of the found P2P Device |
pri_dev_type | Primary Device Type |
dev_name | Device Name |
supp_config_methods | Supported configuration Methods |
dev_capab | Device Capabilities |
group_capab | Group Capabilities |
group_id | P2P Group ID (or NULL if not included) |
group_id_len | Length of P2P Group ID This callback is used to indicate reception of a Provision Discovery Request frame that the P2P module accepted. |
void(* p2p_config::prov_disc_resp)(void *ctx, const u8 *peer, u16 config_methods) |
Callback on Provisiong Discovery Response.
ctx | Callback context from cb_ctx |
peer | Source address of the response |
config_methods | Value from p2p_prov_disc_req() or 0 on failure This callback is used to indicate reception of a Provision Discovery Response frame for a pending request scheduled with p2p_prov_disc_req(). This callback handler can be set to %NULL if provision discovery is not used. |
int(* p2p_config::prov_disc_resp_cb)(void *ctx) |
Callback for indicating completion of PD Response.
ctx | Callback context from cb_ctx |
This callback can be used to perform any pending actions after provisioning. It is mainly used for P2PS pending group creation.
int(* p2p_config::remove_stale_groups)(void *ctx, const u8 *peer, const u8 *go, const u8 *ssid, size_t ssid_len) |
Remove stale P2PS groups.
Because P2PS stages potential GOs, and remote devices can remove credentials unilaterally, we need to make sure we don't let stale unusable groups build up.
void(* p2p_config::sd_request)(void *ctx, int freq, const u8 *sa, u8 dialog_token, u16 update_indic, const u8 *tlvs, size_t tlvs_len) |
Callback on Service Discovery Request.
ctx | Callback context from cb_ctx |
freq | Frequency (in MHz) of the channel |
sa | Source address of the request |
dialog_token | Dialog token |
update_indic | Service Update Indicator from the source of request |
tlvs | P2P Service Request TLV(s) |
tlvs_len | Length of tlvs buffer in octets This callback is used to indicate reception of a service discovery request. Response to the query must be indicated by calling p2p_sd_response() with the context information from the arguments to this callback function. This callback handler can be set to %NULL to indicate that service discovery is not supported. |
void(* p2p_config::sd_response)(void *ctx, const u8 *sa, u16 update_indic, const u8 *tlvs, size_t tlvs_len) |
Callback on Service Discovery Response.
ctx | Callback context from cb_ctx |
sa | Source address of the request |
update_indic | Service Update Indicator from the source of response |
tlvs | P2P Service Response TLV(s) |
tlvs_len | Length of tlvs buffer in octets This callback is used to indicate reception of a service discovery response. This callback handler can be set to %NULL if no service discovery requests are used. The information provided with this call is replies to the queries scheduled with p2p_sd_request(). |
int(* p2p_config::send_action)(void *ctx, unsigned int freq, const u8 *dst, const u8 *src, const u8 *bssid, const u8 *buf, size_t len, unsigned int wait_time) |
Transmit an Action frame.
ctx | Callback context from cb_ctx |
freq | Frequency in MHz for the channel on which to transmit |
dst | Destination MAC address (Address 1) |
src | Source MAC address (Address 2) |
bssid | BSSID (Address 3) |
buf | Frame body (starting from Category field) |
len | Length of buf in octets |
wait_time | How many msec to wait for a response frame |
The Action frame may not be transmitted immediately and the status of the transmission must be reported by calling p2p_send_action_cb() once the frame has either been transmitted or it has been dropped due to excessive retries or other failure to transmit.
void(* p2p_config::send_action_done)(void *ctx) |
Notify that Action frame sequence was completed.
ctx | Callback context from cb_ctx This function is called when the Action frame sequence that was started with send_action() has been completed, i.e., when there is no need to wait for a response from the destination peer anymore. |
int(* p2p_config::send_probe_resp)(void *ctx, const struct wpabuf *buf, unsigned int freq) |
Transmit a Probe Response frame.
ctx | Callback context from cb_ctx |
buf | Probe Response frame (including the header and body) |
freq | Forced frequency (in MHz) to use or 0. |
This function is used to reply to Probe Request frames that were indicated with a call to p2p_probe_req_rx(). The response is to be sent on the same channel, unless otherwise specified, or to be dropped if the driver is not listening to Probe Request frames anymore. Alternatively, the responsibility for building the Probe Response frames in Listen state may be in another system component in which case this function need to be implemented (i.e., the function pointer can be %NULL). The WPS and P2P IEs to be added for Probe Response frames in such a case are available from the start_listen() callback. It should be noted that the received Probe Request frames must be indicated by calling p2p_probe_req_rx() even if this send_probe_resp() is not used.
u8 p2p_config::ssid_postfix[SSID_MAX_LEN-9] |
Postfix data to add to the SSID.
This data will be added to the end of the SSID after the DIRECT-<random two="" octets>=""> prefix.
int(* p2p_config::start_listen)(void *ctx, unsigned int freq, unsigned int duration, const struct wpabuf *probe_resp_ie) |
Start Listen state.
ctx | Callback context from cb_ctx |
freq | Frequency of the listen channel in MHz |
duration | Duration for the Listen state in milliseconds |
probe_resp_ie | IE(s) to be added to Probe Response frames |
This Listen state may not start immediately since the driver may have other pending operations to complete first. Once the Listen state has started, p2p_listen_cb() must be called to notify the P2P module. Once the Listen state is stopped, p2p_listen_end() must be called to notify the P2P module that the driver is not in the Listen state anymore. If the send_probe_resp() is not used for generating the response, the IEs from probe_resp_ie need to be added to the end of the Probe Response frame body. If send_probe_resp() is used, the probe_resp_ie information can be ignored.
void(* p2p_config::stop_listen)(void *ctx) |
Stop Listen state.
ctx | Callback context from cb_ctx This callback can be used to stop a Listen state operation that was previously requested with start_listen(). |