aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2005-06-22 05:01:50 (GMT)
committerJouni Malinen <j@w1.fi>2005-06-22 05:01:50 (GMT)
commit6b1951d1d14d873d40420386cfe55f0df1752453 (patch)
tree75b3604deb26cf390174229d768f514c75c67c35
parentd896b12aff194f2d0b038e139969a93d88cc2369 (diff)
downloadhostap-history-6b1951d1d14d873d40420386cfe55f0df1752453.zip
hostap-history-6b1951d1d14d873d40420386cfe55f0df1752453.tar.gz
hostap-history-6b1951d1d14d873d40420386cfe55f0df1752453.tar.bz2
Added function documentation.
-rw-r--r--wpa_supplicant/ctrl_iface.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 26a1fc4..f59cbd8 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -745,6 +745,14 @@ static char * wpa_supplicant_ctrl_iface_path(struct wpa_supplicant *wpa_s)
}
+/**
+ * wpa_supplicant_ctrl_iface_init - Initialize control interface
+ * @wpa_s: Pointer to wpa_supplicant data
+ * Returns: 0 on success, -1 on failure
+ *
+ * Initialize the control interface and start receiving commands from external
+ * programs.
+ */
int wpa_supplicant_ctrl_iface_init(struct wpa_supplicant *wpa_s)
{
CTRL_IFACE_SOCK addr;
@@ -866,6 +874,13 @@ fail:
}
+/**
+ * wpa_supplicant_ctrl_iface_init - Deinitialize control interface
+ * @wpa_s: Pointer to wpa_supplicant data
+ *
+ * Deinitialize the control interface that was initialized with
+ * wpa_supplicant_ctrl_iface_deinit().
+ */
void wpa_supplicant_ctrl_iface_deinit(struct wpa_supplicant *wpa_s)
{
struct wpa_ctrl_dst *dst, *prev;
@@ -910,6 +925,15 @@ void wpa_supplicant_ctrl_iface_deinit(struct wpa_supplicant *wpa_s)
}
+/**
+ * wpa_supplicant_ctrl_iface_send - Send a control interface packet to monitors
+ * @wpa_s: Pointer to wpa_supplicant data
+ * @level: Priority level of the message
+ * @buf: Message data
+ * @len: Message length
+ *
+ * Send a packet to all monitor programs attached to the control interface.
+ */
void wpa_supplicant_ctrl_iface_send(struct wpa_supplicant *wpa_s, int level,
char *buf, size_t len)
{
@@ -1005,6 +1029,15 @@ void wpa_supplicant_ctrl_iface_send(struct wpa_supplicant *wpa_s, int level,
}
+/**
+ * wpa_supplicant_ctrl_iface_wait - Wait for ctrl_iface monitor
+ * @wpa_s: Pointer to wpa_supplicant data
+ *
+ * Wait until the first message from an external program using the control
+ * interface is received. This function can be used to delay normal startup
+ * processing to allow control interface programs to attach with
+ * %wpa_supplicant before normal operations are started.
+ */
void wpa_supplicant_ctrl_iface_wait(struct wpa_supplicant *wpa_s)
{
fd_set rfds;