Functions
wps.c File Reference
#include "includes.h"
#include "common.h"
#include "crypto/dh_group5.h"
#include "common/ieee802_11_defs.h"
#include "wps_i.h"
#include "wps_dev_attr.h"
Include dependency graph for wps.c:

Go to the source code of this file.

Functions

int wps_attr_text (struct wpabuf *data, char *buf, char *end)
struct wpabufwps_build_assoc_req_ie (enum wps_request_type req_type)
struct wpabufwps_build_probe_req_ie (int pbc, struct wps_device_data *dev, const u8 *uuid, enum wps_request_type req_type)
void wps_deinit (struct wps_data *data)
void wps_free_pending_msgs (struct upnp_pending_message *msgs)
struct wpabufwps_get_msg (struct wps_data *wps, enum wsc_op_code *op_code)
const u8 * wps_get_uuid_e (const struct wpabuf *msg)
struct wps_datawps_init (const struct wps_config *cfg)
int wps_is_selected_pbc_registrar (const struct wpabuf *msg)
int wps_is_selected_pin_registrar (const struct wpabuf *msg)
enum wps_process_res wps_process_msg (struct wps_data *wps, enum wsc_op_code op_code, const struct wpabuf *msg)

Function Documentation

int wps_attr_text ( struct wpabuf data,
char *  buf,
char *  end 
)

Definition at line 365 of file wps.c.

struct wpabuf* wps_build_assoc_req_ie ( enum wps_request_type  req_type) [read]

wps_build_assoc_req_ie - Build WPS IE for (Re)Association Request : Value for Request Type attribute Returns: WPS IE or NULL on failure

The caller is responsible for freeing the buffer.

Definition at line 264 of file wps.c.

struct wpabuf* wps_build_probe_req_ie ( int  pbc,
struct wps_device_data dev,
const u8 *  uuid,
enum wps_request_type  req_type 
) [read]

wps_build_probe_req_ie - Build WPS IE for Probe Request : Whether searching for PBC mode APs : Device attributes : Own UUID : Value for Request Type attribute Returns: WPS IE or NULL on failure

The caller is responsible for freeing the buffer.

Definition at line 301 of file wps.c.

void wps_deinit ( struct wps_data data)

wps_deinit - Deinitialize WPS Registration protocol data : WPS Registration protocol data from wps_init()

Definition at line 117 of file wps.c.

Definition at line 352 of file wps.c.

struct wpabuf* wps_get_msg ( struct wps_data wps,
enum wsc_op_code op_code 
) [read]

wps_get_msg - Build a WPS message : WPS Registration protocol data from wps_init() : Buffer for returning message OP Code Returns: The generated WPS message or NULL on failure

This function is used to build a response to a message processed by calling wps_process_msg(). The caller is responsible for freeing the buffer.

Definition at line 173 of file wps.c.

const u8* wps_get_uuid_e ( const struct wpabuf msg)

wps_get_uuid_e - Get UUID-E from WPS IE : WPS IE contents from Beacon or Probe Response frame Returns: Pointer to UUID-E or NULL if not included

The returned pointer is to the msg contents and it remains valid only as long as the msg buffer is valid.

Definition at line 247 of file wps.c.

struct wps_data* wps_init ( const struct wps_config cfg) [read]

wps_init - Initialize WPS Registration protocol data : WPS configuration Returns: Pointer to allocated data or NULL on failure

This function is used to initialize WPS data for a registration protocol instance (i.e., each run of registration protocol as a Registrar of Enrollee. The caller is responsible for freeing this data after the registration run has been completed by calling wps_deinit().

Definition at line 34 of file wps.c.

int wps_is_selected_pbc_registrar ( const struct wpabuf msg)

wps_is_selected_pbc_registrar - Check whether WPS IE indicates active PBC : WPS IE contents from Beacon or Probe Response frame Returns: 1 if PBC Registrar is active, 0 if not

Definition at line 187 of file wps.c.

int wps_is_selected_pin_registrar ( const struct wpabuf msg)

wps_is_selected_pin_registrar - Check whether WPS IE indicates active PIN : WPS IE contents from Beacon or Probe Response frame Returns: 1 if PIN Registrar is active, 0 if not

Definition at line 213 of file wps.c.

enum wps_process_res wps_process_msg ( struct wps_data wps,
enum wsc_op_code  op_code,
const struct wpabuf msg 
)

wps_process_msg - Process a WPS message : WPS Registration protocol data from wps_init() : Message OP Code : Message data Returns: Processing result

This function is used to process WPS messages with OP Codes WSC_ACK, WSC_NACK, WSC_MSG, and WSC_Done. The caller (e.g., EAP server/peer) is responsible for reassembling the messages before calling this function. Response to this message is built by calling wps_get_msg().

Definition at line 153 of file wps.c.



wpa_supplicant_node
Author(s): Package maintained by Blaise Gassend
autogenerated on Thu Apr 24 2014 15:33:25