This will be useful on a proper peer_changed() event to finally make the
relation of a Peer and the newly instanciated interface, and thus the
proper iface index to work with when running dhcp.
---
gsupplicant/gsupplicant.h | 1 +
gsupplicant/supplicant.c | 8 ++++++++
2 files changed, 9 insertions(+)
diff --git a/gsupplicant/gsupplicant.h b/gsupplicant/gsupplicant.h
index e52e069..df496e0 100644
--- a/gsupplicant/gsupplicant.h
+++ b/gsupplicant/gsupplicant.h
@@ -279,6 +279,7 @@ const char *g_supplicant_peer_get_name(GSupplicantPeer
*peer);
bool g_supplicant_peer_is_wps_pbc(GSupplicantPeer *peer);
bool g_supplicant_peer_is_wps_pin(GSupplicantPeer *peer);
bool g_supplicant_peer_is_in_a_group(GSupplicantPeer *peer);
+GSupplicantInterface *g_supplicant_peer_get_group_interface(GSupplicantPeer
*peer);
struct _GSupplicantCallbacks {
void (*system_ready) (void);
diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c
index 7034a08..e594012 100644
--- a/gsupplicant/supplicant.c
+++ b/gsupplicant/supplicant.c
@@ -1090,6 +1090,14 @@ bool g_supplicant_peer_is_in_a_group(GSupplicantPeer
*peer)
return true;
}
+GSupplicantInterface *g_supplicant_peer_get_group_interface(GSupplicantPeer
*peer)
+{
+ if (!peer)
+ return NULL;
+
+ return (GSupplicantInterface *) peer->current_group_iface;
+}
+
static void merge_network(GSupplicantNetwork *network)
{
GString *str;
--
1.8.5.5
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman