wpa_ctrl.c File Reference

wpa_supplicant/hostapd control interface library More...

#include "includes.h"
#include "wpa_ctrl.h"
#include "common.h"

Include dependency graph for wpa_ctrl.c:

Go to the source code of this file.

Functions

int wpa_ctrl_attach (struct wpa_ctrl *ctrl)
 Register as an event monitor for the control interface.
int wpa_ctrl_detach (struct wpa_ctrl *ctrl)
 Unregister event monitor from the control interface.


Detailed Description

wpa_supplicant/hostapd control interface library

Copyright
Copyright (c) 2004-2006, Jouni Malinen <[email protected]>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

Alternatively, this software may be distributed under the terms of BSD license.

See README and COPYING for more details.

Definition in file wpa_ctrl.c.


Function Documentation

int wpa_ctrl_attach struct wpa_ctrl ctrl  ) 
 

Register as an event monitor for the control interface.

Parameters:
ctrl Control interface data from wpa_ctrl_open()
Returns:
0 on success, -1 on failure, -2 on timeout
This function registers the control interface connection as a monitor for wpa_supplicant/hostapd events. After a success wpa_ctrl_attach() call, the control interface connection starts receiving event messages that can be read with wpa_ctrl_recv().

Definition at line 264 of file wpa_ctrl.c.

int wpa_ctrl_detach struct wpa_ctrl ctrl  ) 
 

Unregister event monitor from the control interface.

Parameters:
ctrl Control interface data from wpa_ctrl_open()
Returns:
0 on success, -1 on failure, -2 on timeout
This function unregisters the control interface connection as a monitor for wpa_supplicant/hostapd events, i.e., cancels the registration done with wpa_ctrl_attach().

Definition at line 270 of file wpa_ctrl.c.


Generated on Sun Dec 31 13:55:12 2006 for wpa_supplicant by  doxygen 1.4.2