wpa_ctrl.h

Go to the documentation of this file.
00001 
00016 #ifndef WPA_CTRL_H
00017 #define WPA_CTRL_H
00018 
00019 #ifdef  __cplusplus
00020 extern "C" {
00021 #endif
00022 
00023 /* wpa_supplicant control interface - fixed message prefixes */
00024 
00026 #define WPA_CTRL_REQ "CTRL-REQ-"
00027 
00029 #define WPA_CTRL_RSP "CTRL-RSP-"
00030 
00031 /* Event messages with fixed prefix */
00033 #define WPA_EVENT_CONNECTED "CTRL-EVENT-CONNECTED "
00034 
00035 #define WPA_EVENT_DISCONNECTED "CTRL-EVENT-DISCONNECTED "
00036 
00037 #define WPA_EVENT_TERMINATING "CTRL-EVENT-TERMINATING "
00038 
00039 #define WPA_EVENT_PASSWORD_CHANGED "CTRL-EVENT-PASSWORD-CHANGED "
00040 
00041 #define WPA_EVENT_EAP_NOTIFICATION "CTRL-EVENT-EAP-NOTIFICATION "
00042 
00043 #define WPA_EVENT_EAP_STARTED "CTRL-EVENT-EAP-STARTED "
00044 
00045 #define WPA_EVENT_EAP_METHOD "CTRL-EVENT-EAP-METHOD "
00046 
00047 #define WPA_EVENT_EAP_SUCCESS "CTRL-EVENT-EAP-SUCCESS "
00048 
00049 #define WPA_EVENT_EAP_FAILURE "CTRL-EVENT-EAP-FAILURE "
00050 
00051 #define WPA_EVENT_SCAN_RESULTS "CTRL-EVENT-SCAN-RESULTS "
00052 
00054 #define WPS_EVENT_OVERLAP "WPS-OVERLAP-DETECTED "
00055 
00056 #define WPS_EVENT_AP_AVAILABLE_PBC "WPS-AP-AVAILABLE-PBC "
00057 
00059 #define WPS_EVENT_AP_AVAILABLE_PIN "WPS-AP-AVAILABLE-PIN "
00060 
00061 #define WPS_EVENT_AP_AVAILABLE "WPS-AP-AVAILABLE "
00062 
00063 #define WPS_EVENT_CRED_RECEIVED "WPS-CRED-RECEIVED "
00064 
00065 #define WPS_EVENT_M2D "WPS-M2D "
00066 
00067 #define WPS_EVENT_FAIL "WPS-FAIL "
00068 
00069 #define WPS_EVENT_SUCCESS "WPS-SUCCESS "
00070 
00071 #define WPS_EVENT_TIMEOUT "WPS-TIMEOUT "
00072 
00073 /* WPS ER events */
00074 #define WPS_EVENT_ER_AP_ADD "WPS-ER-AP-ADD "
00075 #define WPS_EVENT_ER_AP_REMOVE "WPS-ER-AP-REMOVE "
00076 #define WPS_EVENT_ER_ENROLLEE_ADD "WPS-ER-ENROLLEE-ADD "
00077 #define WPS_EVENT_ER_ENROLLEE_REMOVE "WPS-ER-ENROLLEE-REMOVE "
00078 
00079 /* hostapd control interface - fixed message prefixes */
00080 #define WPS_EVENT_PIN_NEEDED "WPS-PIN-NEEDED "
00081 #define WPS_EVENT_NEW_AP_SETTINGS "WPS-NEW-AP-SETTINGS "
00082 #define WPS_EVENT_REG_SUCCESS "WPS-REG-SUCCESS "
00083 #define WPS_EVENT_AP_SETUP_LOCKED "WPS-AP-SETUP-LOCKED "
00084 #define AP_STA_CONNECTED "AP-STA-CONNECTED "
00085 #define AP_STA_DISCONNECTED "AP-STA-DISCONNECTED "
00086 
00087 
00088 /* wpa_supplicant/hostapd control interface access */
00089 
00101 struct wpa_ctrl * wpa_ctrl_open(const char *ctrl_path);
00102 
00103 
00111 void wpa_ctrl_close(struct wpa_ctrl *ctrl);
00112 
00113 
00141 int wpa_ctrl_request(struct wpa_ctrl *ctrl, const char *cmd, size_t cmd_len,
00142                      char *reply, size_t *reply_len,
00143                      void (*msg_cb)(char *msg, size_t len));
00144 
00145 
00157 int wpa_ctrl_attach(struct wpa_ctrl *ctrl);
00158 
00159 
00170 int wpa_ctrl_detach(struct wpa_ctrl *ctrl);
00171 
00172 
00187 int wpa_ctrl_recv(struct wpa_ctrl *ctrl, char *reply, size_t *reply_len);
00188 
00189 
00201 int wpa_ctrl_pending(struct wpa_ctrl *ctrl);
00202 
00203 
00218 int wpa_ctrl_get_fd(struct wpa_ctrl *ctrl);
00219 
00220 #ifdef CONFIG_CTRL_IFACE_UDP
00221 #define WPA_CTRL_IFACE_PORT 9877
00222 #define WPA_GLOBAL_CTRL_IFACE_PORT 9878
00223 #endif /* CONFIG_CTRL_IFACE_UDP */
00224 
00225 
00226 #ifdef  __cplusplus
00227 }
00228 #endif
00229 
00230 #endif /* WPA_CTRL_H */
00231 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on Sat Nov 21 23:16:49 2009 for hostapd by  doxygen 1.6.1