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

WPA Supplicant / Control interface (shared code for all backends) More...

#include "utils/includes.h"
#include "utils/common.h"
#include "utils/eloop.h"
#include "utils/uuid.h"
#include "common/version.h"
#include "common/ieee802_11_defs.h"
#include "common/ieee802_11_common.h"
#include "common/wpa_ctrl.h"
#include "crypto/tls.h"
#include "ap/hostapd.h"
#include "eap_peer/eap.h"
#include "eapol_supp/eapol_supp_sm.h"
#include "rsn_supp/wpa.h"
#include "rsn_supp/preauth.h"
#include "rsn_supp/pmksa_cache.h"
#include "l2_packet/l2_packet.h"
#include "wps/wps.h"
#include "fst/fst.h"
#include "fst/fst_ctrl_iface.h"
#include "config.h"
#include "wpa_supplicant_i.h"
#include "driver_i.h"
#include "wps_supplicant.h"
#include "ibss_rsn.h"
#include "ap.h"
#include "p2p_supplicant.h"
#include "p2p/p2p.h"
#include "hs20_supplicant.h"
#include "wifi_display.h"
#include "notify.h"
#include "bss.h"
#include "scan.h"
#include "ctrl_iface.h"
#include "interworking.h"
#include "blacklist.h"
#include "autoscan.h"
#include "wnm_sta.h"
#include "offchannel.h"
#include "drivers/driver.h"
#include "mesh.h"

Data Structures

struct  cipher_info
 

Functions

void wpas_ctrl_radio_work_flush (struct wpa_supplicant *wpa_s)
 
char * wpa_supplicant_ctrl_iface_process (struct wpa_supplicant *wpa_s, char *buf, size_t *resp_len)
 Process ctrl_iface command. More...
 
char * wpa_supplicant_global_ctrl_iface_process (struct wpa_global *global, char *buf, size_t *resp_len)
 Process global ctrl_iface command. More...
 

Detailed Description

WPA Supplicant / Control interface (shared code for all backends)

Function Documentation

char* wpa_supplicant_ctrl_iface_process ( struct wpa_supplicant wpa_s,
char *  buf,
size_t *  resp_len 
)

Process ctrl_iface command.

Parameters
wpa_sPointer to wpa_supplicant data
bufReceived command buffer (nul terminated string)
resp_lenVariable to be set to the response length
Returns
Response (*resp_len bytes) or NULL on failure

Control interface backends call this function when receiving a message that they do not process internally, i.e., anything else than ATTACH, DETACH, and LEVEL. The return response value is then sent to the external program that sent the command. Caller is responsible for freeing the buffer after this. If NULL is returned, *resp_len can be set to two special values: 1 = send "FAIL\n" response, 2 = send "OK\n" response. If *resp_len has any other value, no response is sent.

char* wpa_supplicant_global_ctrl_iface_process ( struct wpa_global global,
char *  buf,
size_t *  resp_len 
)

Process global ctrl_iface command.

Parameters
globalPointer to global data from wpa_supplicant_init()
bufReceived command buffer (nul terminated string)
resp_lenVariable to be set to the response length
Returns
Response (*resp_len bytes) or NULL on failure

Control interface backends call this function when receiving a message from the global ctrl_iface connection. The return response value is then sent to the external program that sent the command. Caller is responsible for freeing the buffer after this. If NULL is returned, *resp_len can be set to two special values: 1 = send "FAIL\n" response, 2 = send "OK\n" response. If *resp_len has any other value, no response is sent.