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 
00052 /* wpa_supplicant/hostapd control interface access */
00053 
00065 struct wpa_ctrl * wpa_ctrl_open(const char *ctrl_path);
00066 
00067 
00075 void wpa_ctrl_close(struct wpa_ctrl *ctrl);
00076 
00077 
00105 int wpa_ctrl_request(struct wpa_ctrl *ctrl, const char *cmd, size_t cmd_len,
00106                      char *reply, size_t *reply_len,
00107                      void (*msg_cb)(char *msg, size_t len));
00108 
00109 
00121 int wpa_ctrl_attach(struct wpa_ctrl *ctrl);
00122 
00123 
00134 int wpa_ctrl_detach(struct wpa_ctrl *ctrl);
00135 
00136 
00151 int wpa_ctrl_recv(struct wpa_ctrl *ctrl, char *reply, size_t *reply_len);
00152 
00153 
00165 int wpa_ctrl_pending(struct wpa_ctrl *ctrl);
00166 
00167 
00182 int wpa_ctrl_get_fd(struct wpa_ctrl *ctrl);
00183 
00184 #ifdef CONFIG_CTRL_IFACE_UDP
00185 #define WPA_CTRL_IFACE_PORT 9877
00186 #define WPA_GLOBAL_CTRL_IFACE_PORT 9878
00187 #endif /* CONFIG_CTRL_IFACE_UDP */
00188 
00189 
00190 #ifdef  __cplusplus
00191 }
00192 #endif
00193 
00194 #endif /* WPA_CTRL_H */
00195 

Generated on Sun Dec 31 13:48:57 2006 for wpa_supplicant by  doxygen 1.4.2