wpa_supplicant / hostapd  2.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Fields
p2p_config Struct Reference

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_channelpref_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...
 

Detailed Description

P2P configuration.

This configuration is provided to the P2P module during initialization with p2p_init().

Field Documentation

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.

Parameters
ctxCallback context from cb_ctx
levelDebug verbosity level (MSG_*)
msgDebug 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.

Parameters
ctxCallback context from cb_ctx
addrSource address of the message triggering this notification
infoP2P peer information
new_deviceInform 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.

Parameters
ctxCallback context from cb_ctx
dev_addrP2P 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.

Parameters
ctxCallback 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.

Parameters
ctxCallback context from cb_ctx
intended_addrBuffer for returning intended GO interface address
ssidBuffer for returning group SSID
ssid_lenBuffer for returning length of ssid
group_ifaceBuffer for returning whether a separate group interface would be used
Returns
1 if GO info found, 0 otherwise
       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.

Parameters
ctxCallback context from cb_ctx
interface_addrP2P Interface Address of the GO
bufBuffer for returning NoA
buf_lenBuffer length in octets
Returns
Number of octets used in buf, 0 to indicate no NoA is being advertized, or -1 on failure

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.

Parameters
ctxCallback context from cb_ctx
addrPeer device address to search for
ssidPersistent group SSID or NULL if any
ssid_lenLength of ssid
go_dev_addrBuffer for returning GO P2P Device Address
ret_ssidBuffer for returning group SSID
ret_ssid_lenBuffer for returning length of ssid
intended_iface_addrBuffer for returning intended iface address
Returns
1 if a matching persistent group was found, 0 otherwise
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.

Parameters
ctxCallback context from cb_ctx
goWhether the use if for GO role
lenLength of freq_list in entries (both IN and OUT)
freq_listBuffer for returning the preferred frequencies (MHz)
Returns
0 on success, -1 on failure
       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.

Parameters
ctxCallback context from cb_ctx
dev_addrP2P Device Address of a GO
Returns
1 if we are connected as a P2P client to the specified GO or 0 if not.
void(* p2p_config::go_neg_completed)(void *ctx, struct p2p_go_neg_results *res)

Notification of GO Negotiation results.

Parameters
ctxCallback context from cb_ctx
resGO 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.

Parameters
ctxCallback context from cb_ctx
srcSource address of the message triggering this notification
dev_passwd_idWPS Device Password ID
go_intentPeer'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.

Parameters
ctxCallback context from cb_ctx
saSource address of the Invitation Request
bssidP2P Group BSSID from the request or NULL if not included
go_dev_addrGO Device Address from P2P Group ID
ssidSSID from P2P Group ID
ssid_lenLength of ssid buffer in octets
goVariable for returning whether the local end is GO in the group
group_bssidBuffer for returning P2P Group BSSID (if local end GO)
force_freqVariable for returning forced frequency for the group
persistent_groupWhether this is an invitation to reinvoke a persistent group (instead of invitation to join an active group)
channelsAvailable operating channels for the group
dev_pw_idDevice Password ID for NFC static handover or -1 if not used
Returns
Status code (P2P_SC_*)
       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.

Parameters
ctxCallback context from cb_ctx
saSource address of the Invitation Request
bssidP2P Group BSSID or NULL if not received
ssidSSID of the group
ssid_lenLength of ssid in octets
go_dev_addrGO Device Address
statusResponse Status
op_freqOperational 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.

Parameters
ctxCallback context from cb_ctx
statusNegotiation result (Status Code)
bssidP2P Group BSSID or NULL if not received
channelsAvailable operating channels for the group
addrPeer address
freqFrequency (in MHz) indicated during invitation or 0
peer_oper_freqOperating 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.

Parameters
ctxCallback context from cb_ctx
Returns
1 if concurrent session is active on other virtual interface or 0 if not.
int(* p2p_config::is_p2p_in_progress)(void *ctx)

Check whether P2P operation is in progress.

Parameters
ctxCallback context from cb_ctx
Returns
1 if P2P operation (e.g., group formation) is in progress or 0 if not.
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.

Parameters
ctxCallback context from cb_ctx
typeScan type
freqSpecific frequency (MHz) to scan or 0 for no restriction
num_req_dev_typesNumber of requested device types
req_dev_typesArray containing requested device types
dev_idDevice ID to search for or NULL to find all devices
pw_idDevice Password ID
Returns
0 on success, -1 on failure
       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.
Parameters
P2P_SCAN_SOCIAL_PLUS_ONErequest 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.

Parameters
ctxCallback context from cb_ctx
srcSource address (GO's P2P Interface Address)
statusResult of the request (P2P_SC_*)
noaReturned NoA value
noa_lenLength 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.

Parameters
ctxCallback context from cb_ctx
peerSource address of the response
statusCause of failure, will not be P2P_PROV_DISC_SUCCESS
adv_idIf non-zero, then the adv_id of the PD Request
adv_macP2P Device Address of the advertizer
deferred_session_respDeferred 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.

Parameters
ctxCallback context from cb_ctx
peerSource address of the request
config_methodsRequested WPS Config Method
dev_addrP2P Device Address of the found P2P Device
pri_dev_typePrimary Device Type
dev_nameDevice Name
supp_config_methodsSupported configuration Methods
dev_capabDevice Capabilities
group_capabGroup Capabilities
group_idP2P Group ID (or NULL if not included)
group_id_lenLength 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.

Parameters
ctxCallback context from cb_ctx
peerSource address of the response
config_methodsValue 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.

Parameters
ctxCallback context from cb_ctx
Returns
1 if operation was started, 0 otherwise
       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.

Parameters
ctxCallback context from cb_ctx
freqFrequency (in MHz) of the channel
saSource address of the request
dialog_tokenDialog token
update_indicService Update Indicator from the source of request
tlvsP2P Service Request TLV(s)
tlvs_lenLength 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.

Parameters
ctxCallback context from cb_ctx
saSource address of the request
update_indicService Update Indicator from the source of response
tlvsP2P Service Response TLV(s)
tlvs_lenLength 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.

Parameters
ctxCallback context from cb_ctx
freqFrequency in MHz for the channel on which to transmit
dstDestination MAC address (Address 1)
srcSource MAC address (Address 2)
bssidBSSID (Address 3)
bufFrame body (starting from Category field)
lenLength of buf in octets
wait_timeHow many msec to wait for a response frame
Returns
0 on success, -1 on failure
       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.

Parameters
ctxCallback 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.

Parameters
ctxCallback context from cb_ctx
bufProbe Response frame (including the header and body)
freqForced frequency (in MHz) to use or 0.
Returns
0 on success, -1 on failure
       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.

Parameters
ctxCallback context from cb_ctx
freqFrequency of the listen channel in MHz
durationDuration for the Listen state in milliseconds
probe_resp_ieIE(s) to be added to Probe Response frames
Returns
0 on success, -1 on failure
       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.

Parameters
ctxCallback context from cb_ctx
       This callback can be used to stop a Listen state operation that was
       previously requested with start_listen().

The documentation for this struct was generated from the following file: