1 #ifndef WPA_SUPPLICANT_H
2 #define WPA_SUPPLICANT_H
4 /* Driver wrappers are not supposed to directly touch the internal data
5 * structure used in wpa_supplicant, so that definition is not provided here.
10 EVENT_ASSOC, EVENT_DISASSOC, EVENT_MICHAEL_MIC_FAILURE,
11 EVENT_SCAN_RESULTS, EVENT_ASSOCINFO, EVENT_INTERFACE_STATUS,
15 union wpa_event_data {
17 /* Optional request information data: IEs included in AssocReq
18 * and AssocResp. If these are not returned by the driver,
19 * WPA Supplicant will generate the WPA/RSN IE. */
20 u8 *req_ies, *resp_ies;
21 size_t req_ies_len, resp_ies_len;
23 /* Optional Beacon/ProbeResp data: IEs included in Beacon or
24 * Probe Response frames from the current AP (i.e., the one
25 * that the client just associated with). This information is
26 * used to update WPA/RSN IE for the AP. If this field is not
27 * set, the results from previous scan will be used. If no
28 * data for the new AP is found, scan results will be requested
29 * again (without scan request). At this point, the driver is
30 * expected to provide WPA/RSN IE for the AP (if WPA/WPA2 is
32 u8 *beacon_ies; /* beacon or probe resp IEs */
33 size_t beacon_ies_len;
37 } michael_mic_failure;
41 EVENT_INTERFACE_ADDED, EVENT_INTERFACE_REMOVED
46 int index; /* smaller the index, higher the priority */
52 * wpa_supplicant_event - report a driver event for wpa_supplicant
53 * @wpa_s: pointer to wpa_supplicant data; this is the @ctx variable registered
54 * with wpa_driver_events_init()
55 * @event: event type (defined above)
56 * @data: possible extra data for the event
58 * Driver wrapper code should call this function whenever an event is received
61 void wpa_supplicant_event(struct wpa_supplicant *wpa_s, wpa_event_type event,
62 union wpa_event_data *data);
65 * wpa_msg - conditional printf for default target and ctrl_iface monitors
66 * @level: priority level (MSG_*) of the message
67 * @fmt: printf format string, followed by optional arguments
69 * This function is used to print conditional debugging and error messages. The
70 * output may be directed to stdout, stderr, and/or syslog based on
71 * configuration. This function is like wpa_printf(), but it also sends the
72 * same message to all attached ctrl_iface monitors.
74 * Note: New line '\n' is added to the end of the text when printing to stdout.
76 void wpa_msg(struct wpa_supplicant *wpa_s, int level, char *fmt, ...)
77 __attribute__ ((format (printf, 3, 4)));
79 const char * wpa_ssid_txt(u8 *ssid, size_t ssid_len);
81 #endif /* WPA_SUPPLICANT_H */