wpa_ctrl.h
Go to the documentation of this file.
00001 /*
00002  * wpa_supplicant/hostapd control interface library
00003  * Copyright (c) 2004-2006, Jouni Malinen <j@w1.fi>
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License version 2 as
00007  * published by the Free Software Foundation.
00008  *
00009  * Alternatively, this software may be distributed under the terms of BSD
00010  * license.
00011  *
00012  * See README and COPYING for more details.
00013  */
00014 
00015 #ifndef WPA_CTRL_H
00016 #define WPA_CTRL_H
00017 
00018 #ifdef  __cplusplus
00019 extern "C" {
00020 #endif
00021 
00022 /* wpa_supplicant control interface - fixed message prefixes */
00023 
00025 #define WPA_CTRL_REQ "CTRL-REQ-"
00026 
00028 #define WPA_CTRL_RSP "CTRL-RSP-"
00029 
00030 /* Event messages with fixed prefix */
00032 #define WPA_EVENT_CONNECTED "CTRL-EVENT-CONNECTED "
00033 
00034 #define WPA_EVENT_DISCONNECTED "CTRL-EVENT-DISCONNECTED "
00035 
00036 #define WPA_EVENT_TERMINATING "CTRL-EVENT-TERMINATING "
00037 
00038 #define WPA_EVENT_PASSWORD_CHANGED "CTRL-EVENT-PASSWORD-CHANGED "
00039 
00040 #define WPA_EVENT_EAP_NOTIFICATION "CTRL-EVENT-EAP-NOTIFICATION "
00041 
00042 #define WPA_EVENT_EAP_STARTED "CTRL-EVENT-EAP-STARTED "
00043 
00044 #define WPA_EVENT_EAP_PROPOSED_METHOD "CTRL-EVENT-EAP-PROPOSED-METHOD "
00045 
00046 #define WPA_EVENT_EAP_METHOD "CTRL-EVENT-EAP-METHOD "
00047 
00048 #define WPA_EVENT_EAP_PEER_CERT "CTRL-EVENT-EAP-PEER-CERT "
00049 
00050 #define WPA_EVENT_EAP_TLS_CERT_ERROR "CTRL-EVENT-EAP-TLS-CERT-ERROR "
00051 
00052 #define WPA_EVENT_EAP_SUCCESS "CTRL-EVENT-EAP-SUCCESS "
00053 
00054 #define WPA_EVENT_EAP_FAILURE "CTRL-EVENT-EAP-FAILURE "
00055 
00056 #define WPA_EVENT_SCAN_RESULTS "CTRL-EVENT-SCAN-RESULTS "
00057 
00058 #define WPA_EVENT_BSS_ADDED "CTRL-EVENT-BSS-ADDED "
00059 
00060 #define WPA_EVENT_BSS_REMOVED "CTRL-EVENT-BSS-REMOVED "
00061 
00063 #define WPS_EVENT_OVERLAP "WPS-OVERLAP-DETECTED "
00064 
00065 #define WPS_EVENT_AP_AVAILABLE_PBC "WPS-AP-AVAILABLE-PBC "
00066 
00068 #define WPS_EVENT_AP_AVAILABLE_PIN "WPS-AP-AVAILABLE-PIN "
00069 
00070 #define WPS_EVENT_AP_AVAILABLE "WPS-AP-AVAILABLE "
00071 
00072 #define WPS_EVENT_CRED_RECEIVED "WPS-CRED-RECEIVED "
00073 
00074 #define WPS_EVENT_M2D "WPS-M2D "
00075 
00076 #define WPS_EVENT_FAIL "WPS-FAIL "
00077 
00078 #define WPS_EVENT_SUCCESS "WPS-SUCCESS "
00079 
00080 #define WPS_EVENT_TIMEOUT "WPS-TIMEOUT "
00081 
00082 #define WPS_EVENT_ENROLLEE_SEEN "WPS-ENROLLEE-SEEN "
00083 
00084 /* WPS ER events */
00085 #define WPS_EVENT_ER_AP_ADD "WPS-ER-AP-ADD "
00086 #define WPS_EVENT_ER_AP_REMOVE "WPS-ER-AP-REMOVE "
00087 #define WPS_EVENT_ER_ENROLLEE_ADD "WPS-ER-ENROLLEE-ADD "
00088 #define WPS_EVENT_ER_ENROLLEE_REMOVE "WPS-ER-ENROLLEE-REMOVE "
00089 
00090 /* hostapd control interface - fixed message prefixes */
00091 #define WPS_EVENT_PIN_NEEDED "WPS-PIN-NEEDED "
00092 #define WPS_EVENT_NEW_AP_SETTINGS "WPS-NEW-AP-SETTINGS "
00093 #define WPS_EVENT_REG_SUCCESS "WPS-REG-SUCCESS "
00094 #define WPS_EVENT_AP_SETUP_LOCKED "WPS-AP-SETUP-LOCKED "
00095 #define AP_STA_CONNECTED "AP-STA-CONNECTED "
00096 #define AP_STA_DISCONNECTED "AP-STA-DISCONNECTED "
00097 
00098 
00099 /* wpa_supplicant/hostapd control interface access */
00100 
00111 struct wpa_ctrl * wpa_ctrl_open(const char *ctrl_path);
00112 
00113 
00120 void wpa_ctrl_close(struct wpa_ctrl *ctrl);
00121 
00122 
00149 int wpa_ctrl_request(struct wpa_ctrl *ctrl, const char *cmd, size_t cmd_len,
00150                      char *reply, size_t *reply_len,
00151                      void (*msg_cb)(char *msg, size_t len));
00152 
00153 
00164 int wpa_ctrl_attach(struct wpa_ctrl *ctrl);
00165 
00166 
00176 int wpa_ctrl_detach(struct wpa_ctrl *ctrl);
00177 
00178 
00192 int wpa_ctrl_recv(struct wpa_ctrl *ctrl, char *reply, size_t *reply_len);
00193 
00194 
00205 int wpa_ctrl_pending(struct wpa_ctrl *ctrl);
00206 
00207 
00221 int wpa_ctrl_get_fd(struct wpa_ctrl *ctrl);
00222 
00223 #ifdef CONFIG_CTRL_IFACE_UDP
00224 #define WPA_CTRL_IFACE_PORT 9877
00225 #define WPA_GLOBAL_CTRL_IFACE_PORT 9878
00226 #endif /* CONFIG_CTRL_IFACE_UDP */
00227 
00228 
00229 #ifdef  __cplusplus
00230 }
00231 #endif
00232 
00233 #endif /* WPA_CTRL_H */


wpa_supplicant
Author(s): Package maintained by Blaise Gassend
autogenerated on Thu Jan 2 2014 11:26:39