wpa_supplicant / hostapd  2.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
dbus_old.h
Go to the documentation of this file.
1 
5 #ifndef CTRL_IFACE_DBUS_H
6 #define CTRL_IFACE_DBUS_H
7 
8 struct wps_credential;
9 
10 #ifdef CONFIG_CTRL_IFACE_DBUS
11 
12 #define WPAS_DBUS_OBJECT_PATH_MAX 150
13 
14 #define WPAS_DBUS_SERVICE "fi.epitest.hostap.WPASupplicant"
15 #define WPAS_DBUS_PATH "/fi/epitest/hostap/WPASupplicant"
16 #define WPAS_DBUS_INTERFACE "fi.epitest.hostap.WPASupplicant"
17 
18 #define WPAS_DBUS_PATH_INTERFACES WPAS_DBUS_PATH "/Interfaces"
19 #define WPAS_DBUS_IFACE_INTERFACE WPAS_DBUS_INTERFACE ".Interface"
20 
21 #define WPAS_DBUS_NETWORKS_PART "Networks"
22 #define WPAS_DBUS_IFACE_NETWORK WPAS_DBUS_INTERFACE ".Network"
23 
24 #define WPAS_DBUS_BSSIDS_PART "BSSIDs"
25 #define WPAS_DBUS_IFACE_BSSID WPAS_DBUS_INTERFACE ".BSSID"
26 
27 
28 /* Errors */
29 #define WPAS_ERROR_INVALID_NETWORK \
30  WPAS_DBUS_IFACE_INTERFACE ".InvalidNetwork"
31 #define WPAS_ERROR_INVALID_BSSID \
32  WPAS_DBUS_IFACE_INTERFACE ".InvalidBSSID"
33 
34 #define WPAS_ERROR_INVALID_OPTS \
35  WPAS_DBUS_INTERFACE ".InvalidOptions"
36 #define WPAS_ERROR_INVALID_IFACE \
37  WPAS_DBUS_INTERFACE ".InvalidInterface"
38 
39 #define WPAS_ERROR_ADD_ERROR \
40  WPAS_DBUS_INTERFACE ".AddError"
41 #define WPAS_ERROR_EXISTS_ERROR \
42  WPAS_DBUS_INTERFACE ".ExistsError"
43 #define WPAS_ERROR_REMOVE_ERROR \
44  WPAS_DBUS_INTERFACE ".RemoveError"
45 
46 #define WPAS_ERROR_SCAN_ERROR \
47  WPAS_DBUS_IFACE_INTERFACE ".ScanError"
48 #define WPAS_ERROR_ADD_NETWORK_ERROR \
49  WPAS_DBUS_IFACE_INTERFACE ".AddNetworkError"
50 #define WPAS_ERROR_INTERNAL_ERROR \
51  WPAS_DBUS_IFACE_INTERFACE ".InternalError"
52 #define WPAS_ERROR_REMOVE_NETWORK_ERROR \
53  WPAS_DBUS_IFACE_INTERFACE ".RemoveNetworkError"
54 
55 #define WPAS_ERROR_WPS_PBC_ERROR \
56  WPAS_DBUS_IFACE_INTERFACE ".WpsPbcError"
57 #define WPAS_ERROR_WPS_PIN_ERROR \
58  WPAS_DBUS_IFACE_INTERFACE ".WpsPinError"
59 #define WPAS_ERROR_WPS_REG_ERROR \
60  WPAS_DBUS_IFACE_INTERFACE ".WpsRegError"
61 
62 #define WPAS_DBUS_BSSID_FORMAT "%02x%02x%02x%02x%02x%02x"
63 
64 struct wpa_global;
65 struct wpa_supplicant;
66 
71  enum wpa_states new_state,
72  enum wpa_states old_state);
73 void wpa_supplicant_dbus_notify_wps_cred(struct wpa_supplicant *wpa_s,
74  const struct wps_credential *cred);
75 void wpa_supplicant_dbus_notify_certification(struct wpa_supplicant *wpa_s,
76  int depth, const char *subject,
77  const char *cert_hash,
78  const struct wpabuf *cert);
79 
80 char * wpas_dbus_decompose_object_path(const char *path, char **network,
81  char **bssid);
82 
83 int wpas_dbus_register_iface(struct wpa_supplicant *wpa_s);
85 
86 
87 /* Methods internal to the dbus control interface */
89  struct wpa_global *global, const char *path);
90 
91 #else /* CONFIG_CTRL_IFACE_DBUS */
92 
93 static inline void
95 {
96 }
97 
98 static inline void
100 {
101 }
102 
103 static inline void
105  enum wpa_states new_state,
106  enum wpa_states old_state)
107 {
108 }
109 
110 static inline void
111 wpa_supplicant_dbus_notify_wps_cred(struct wpa_supplicant *wpa_s,
112  const struct wps_credential *cred)
113 {
114 }
115 
116 static inline void
117 wpa_supplicant_dbus_notify_certification(struct wpa_supplicant *wpa_s,
118  int depth, const char *subject,
119  const char *cert_hash,
120  const struct wpabuf *cert)
121 {
122 }
123 
124 static inline int
126 {
127  return 0;
128 }
129 
130 static inline int
132 {
133  return 0;
134 }
135 
136 #endif /* CONFIG_CTRL_IFACE_DBUS */
137 
138 #endif /* CTRL_IFACE_DBUS_H */
char * wpas_dbus_decompose_object_path(const char *path, char **network, char **bssid)
Decompose an interface object path into parts.
Definition: dbus_old.c:29
int wpas_dbus_unregister_iface(struct wpa_supplicant *wpa_s)
Unregister an interface from dbus.
Definition: dbus_old.c:702
void wpa_supplicant_dbus_notify_scan_results(struct wpa_supplicant *wpa_s)
Send a scan results signal.
Definition: dbus_old.c:376
int wpas_dbus_register_iface(struct wpa_supplicant *wpa_s)
Register a new interface with dbus.
Definition: dbus_old.c:658
Definition: wpabuf.h:16
Internal, global data for all wpa_supplicant interfaces.
Definition: wpa_supplicant_i.h:273
wpa_states
wpa_supplicant state
Definition: defs.h:161
int wpa_supplicant_dbus_ctrl_iface_init(struct wpas_dbus_priv *iface)
Initialize dbus control interface.
Definition: dbus_old.c:604
void wpa_supplicant_dbus_notify_scanning(struct wpa_supplicant *wpa_s)
send scanning status
Definition: dbus_old.c:466
Definition: dbus_common_i.h:12
struct wpa_supplicant * wpa_supplicant_get_iface_by_dbus_path(struct wpa_global *global, const char *path)
Get a new network interface.
Definition: dbus_old.c:731
WPS Credential.
Definition: wps.h:44
Internal data for wpa_supplicant interface.
Definition: wpa_supplicant_i.h:451
void wpa_supplicant_dbus_notify_state_change(struct wpa_supplicant *wpa_s, enum wpa_states new_state, enum wpa_states old_state)
Send a state change signal.
Definition: dbus_old.c:407