wpa_supplicant / hostapd  2.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Structures | Functions
dbus_new_handlers_wps.c File Reference

WPA Supplicant / dbus-based control interface (WPS) Copyright (c) 2009, Witold Sowa witol.nosp@m.d.so.nosp@m.wa@gm.nosp@m.ail..nosp@m.com More...

#include "includes.h"
#include "common.h"
#include "../config.h"
#include "../wpa_supplicant_i.h"
#include "../wps_supplicant.h"
#include "../driver_i.h"
#include "../ap.h"
#include "dbus_new_helpers.h"
#include "dbus_new.h"
#include "dbus_new_handlers.h"
#include "dbus_dict_helpers.h"

Data Structures

struct  wps_start_params
 

Functions

DBusMessage * wpas_dbus_handler_wps_start (DBusMessage *message, struct wpa_supplicant *wpa_s)
 Start WPS configuration. More...
 
DBusMessage * wpas_dbus_handler_wps_cancel (DBusMessage *message, struct wpa_supplicant *wpa_s)
 Cancel ongoing WPS configuration. More...
 
dbus_bool_t wpas_dbus_getter_process_credentials (DBusMessageIter *iter, DBusError *error, void *user_data)
 Check if credentials are processed. More...
 
dbus_bool_t wpas_dbus_setter_process_credentials (DBusMessageIter *iter, DBusError *error, void *user_data)
 Set credentials_processed conf param. More...
 
dbus_bool_t wpas_dbus_getter_config_methods (DBusMessageIter *iter, DBusError *error, void *user_data)
 Get current WPS configuration methods. More...
 
dbus_bool_t wpas_dbus_setter_config_methods (DBusMessageIter *iter, DBusError *error, void *user_data)
 Set WPS configuration methods. More...
 

Detailed Description

WPA Supplicant / dbus-based control interface (WPS) Copyright (c) 2009, Witold Sowa witol.nosp@m.d.so.nosp@m.wa@gm.nosp@m.ail..nosp@m.com

Function Documentation

dbus_bool_t wpas_dbus_getter_config_methods ( DBusMessageIter *  iter,
DBusError *  error,
void *  user_data 
)

Get current WPS configuration methods.

Parameters
iterPointer to incoming dbus message iter
errorLocation to store error on failure
user_dataFunction specific data
Returns
TRUE on success, FALSE on failure

Getter for "ConfigMethods" property. Returned boolean will be true if providing the relevant string worked, or false otherwise.

dbus_bool_t wpas_dbus_getter_process_credentials ( DBusMessageIter *  iter,
DBusError *  error,
void *  user_data 
)

Check if credentials are processed.

Parameters
messagePointer to incoming dbus message
wpa_swpa_supplicant data structure
Returns
TRUE on success, FALSE on failure

Getter for "ProcessCredentials" property. Returns returned boolean will be true if wps_cred_processing configuration field is not equal to 1 or false if otherwise.

DBusMessage* wpas_dbus_handler_wps_cancel ( DBusMessage *  message,
struct wpa_supplicant wpa_s 
)

Cancel ongoing WPS configuration.

Parameters
messagePointer to incoming dbus message
wpa_swpa_supplicant data structure
Returns
NULL on success or DBus error on failure

Handler for "Cancel" method call. Returns NULL if WPS cancel successfull or DBus error on WPS cancel failure

DBusMessage* wpas_dbus_handler_wps_start ( DBusMessage *  message,
struct wpa_supplicant wpa_s 
)

Start WPS configuration.

Parameters
messagePointer to incoming dbus message
wpa_swpa_supplicant data structure
Returns
DBus message dictionary on success or DBus error on failure

Handler for "Start" method call. DBus dictionary argument contains information about role (enrollee or registrar), authorization method (pin or push button) and optionally pin and bssid. Returned message has a dictionary argument which may contain newly generated pin (optional).

dbus_bool_t wpas_dbus_setter_config_methods ( DBusMessageIter *  iter,
DBusError *  error,
void *  user_data 
)

Set WPS configuration methods.

Parameters
iterPointer to incoming dbus message iter
errorLocation to store error on failure
user_dataFunction specific data
Returns
TRUE on success, FALSE on failure

Setter for "ConfigMethods" property. Sets the methods string, apply such change and returns true on success. Returns false otherwise.

dbus_bool_t wpas_dbus_setter_process_credentials ( DBusMessageIter *  iter,
DBusError *  error,
void *  user_data 
)

Set credentials_processed conf param.

Parameters
iterPointer to incoming dbus message iter
errorLocation to store error on failure
user_dataFunction specific data
Returns
TRUE on success, FALSE on failure

Setter for "ProcessCredentials" property. Sets credentials_processed on 2 if boolean argument is true or on 1 if otherwise.