aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/dbus/dbus_new_handlers.c
diff options
context:
space:
mode:
authorSaurav Babu <saurav.babu@samsung.com>2017-07-18 07:07:57 (GMT)
committerJouni Malinen <j@w1.fi>2017-09-09 22:39:37 (GMT)
commitcdf2501494eff1a5b425911340db59d73e1d566a (patch)
tree56cdccb95d8d4478e462d546c6d66db7f155ff9a /wpa_supplicant/dbus/dbus_new_handlers.c
parent190f6f1176dfeb74cbb08389f6de493f31aed813 (diff)
downloadhostap-cdf2501494eff1a5b425911340db59d73e1d566a.zip
hostap-cdf2501494eff1a5b425911340db59d73e1d566a.tar.gz
hostap-cdf2501494eff1a5b425911340db59d73e1d566a.tar.bz2
dbus: Add new interface property to get mesh group
Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
Diffstat (limited to 'wpa_supplicant/dbus/dbus_new_handlers.c')
-rw-r--r--wpa_supplicant/dbus/dbus_new_handlers.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c b/wpa_supplicant/dbus/dbus_new_handlers.c
index a763bc9..564c868 100644
--- a/wpa_supplicant/dbus/dbus_new_handlers.c
+++ b/wpa_supplicant/dbus/dbus_new_handlers.c
@@ -4805,6 +4805,7 @@ DBusMessage * wpas_dbus_handler_vendor_elem_remove(DBusMessage *message,
#ifdef CONFIG_MESH
+
/**
* wpas_dbus_getter_mesh_peers - Get connected mesh peers
* @iter: Pointer to incoming dbus message iter
@@ -4865,4 +4866,36 @@ dbus_bool_t wpas_dbus_getter_mesh_peers(
return TRUE;
}
+
+
+/**
+ * wpas_dbus_getter_mesh_group - Get mesh group
+ * @iter: Pointer to incoming dbus message iter
+ * @error: Location to store error on failure
+ * @user_data: Function specific data
+ * Returns: TRUE on success, FALSE on failure
+ *
+ * Getter for "MeshGroup" property.
+ */
+dbus_bool_t wpas_dbus_getter_mesh_group(
+ const struct wpa_dbus_property_desc *property_desc,
+ DBusMessageIter *iter, DBusError *error, void *user_data)
+{
+ struct wpa_supplicant *wpa_s = user_data;
+ struct wpa_ssid *ssid = wpa_s->current_ssid;
+
+ if (!wpa_s->ifmsh || !ssid)
+ return FALSE;
+
+ if (!wpas_dbus_simple_array_property_getter(iter, DBUS_TYPE_BYTE,
+ (char *) ssid->ssid,
+ ssid->ssid_len, error)) {
+ dbus_set_error(error, DBUS_ERROR_FAILED,
+ "%s: error constructing reply", __func__);
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
#endif /* CONFIG_MESH */