ctrl_iface.c File Reference

WPA Supplicant / UNIX domain and UDP socket -based control interface. More...

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/un.h>
#include <sys/uio.h>
#include "common.h"
#include "eloop.h"
#include "wpa.h"
#include "wpa_supplicant.h"
#include "config.h"
#include "eapol_sm.h"
#include "wpa_supplicant_i.h"
#include "ctrl_iface.h"
#include "l2_packet.h"
#include "preauth.h"
#include "wpa_ctrl.h"
#include "eap.h"

Include dependency graph for ctrl_iface.c:

Go to the source code of this file.

Defines

#define CTRL_IFACE_SOCK   struct sockaddr_un

Functions

int wpa_supplicant_ctrl_iface_init (struct wpa_supplicant *wpa_s)
 Initialize control interface.
void wpa_supplicant_ctrl_iface_deinit (struct wpa_supplicant *wpa_s)
 Deinitialize control interface.
void wpa_supplicant_ctrl_iface_send (struct wpa_supplicant *wpa_s, int level, char *buf, size_t len)
 Send a control interface packet to monitors.
void wpa_supplicant_ctrl_iface_wait (struct wpa_supplicant *wpa_s)
 Wait for ctrl_iface monitor.
int wpa_supplicant_global_ctrl_iface_init (struct wpa_global *global)
 Initialize global control interface.
void wpa_supplicant_global_ctrl_iface_deinit (struct wpa_global *global)
 Deinitialize global ctrl interface.


Detailed Description

WPA Supplicant / UNIX domain and UDP socket -based control interface.

Copyright
Copyright (c) 2004-2005, 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 ctrl_iface.c.


Function Documentation

void wpa_supplicant_ctrl_iface_deinit struct wpa_supplicant wpa_s  ) 
 

Deinitialize control interface.

Parameters:
wpa_s Pointer to wpa_supplicant data
Deinitialize the control interface that was initialized with wpa_supplicant_ctrl_iface_init().

Definition at line 1270 of file ctrl_iface.c.

Here is the call graph for this function:

int wpa_supplicant_ctrl_iface_init struct wpa_supplicant wpa_s  ) 
 

Initialize control interface.

Parameters:
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.

Definition at line 1137 of file ctrl_iface.c.

Here is the call graph for this function:

void wpa_supplicant_ctrl_iface_send struct wpa_supplicant wpa_s,
int  level,
char *  buf,
size_t  len
 

Send a control interface packet to monitors.

Parameters:
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.

Definition at line 1328 of file ctrl_iface.c.

Here is the call graph for this function:

void wpa_supplicant_ctrl_iface_wait struct wpa_supplicant wpa_s  ) 
 

Wait for ctrl_iface monitor.

Parameters:
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.

Definition at line 1430 of file ctrl_iface.c.

Here is the call graph for this function:

void wpa_supplicant_global_ctrl_iface_deinit struct wpa_global global  ) 
 

Deinitialize global ctrl interface.

Parameters:
global Pointer to global data from wpa_supplicant_init()
Deinitialize the global control interface that was initialized with wpa_supplicant_global_ctrl_iface_init().

Definition at line 1682 of file ctrl_iface.c.

Here is the call graph for this function:

int wpa_supplicant_global_ctrl_iface_init struct wpa_global global  ) 
 

Initialize global control interface.

Parameters:
global Pointer to global data from wpa_supplicant_init()
Returns:
0 on success, -1 on failure
Initialize the global control interface and start receiving commands from external programs.

Definition at line 1590 of file ctrl_iface.c.

Here is the call graph for this function:


Generated on Sat May 6 21:14:46 2006 for wpa_supplicant by  doxygen 1.4.2