This will get the distant MAC address of the Peer.
---
 gsupplicant/gsupplicant.h | 1 +
 gsupplicant/supplicant.c  | 9 ++++++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/gsupplicant/gsupplicant.h b/gsupplicant/gsupplicant.h
index e49aaa6..97c804a 100644
--- a/gsupplicant/gsupplicant.h
+++ b/gsupplicant/gsupplicant.h
@@ -326,6 +326,7 @@ GSupplicantInterface 
*g_supplicant_peer_get_interface(GSupplicantPeer *peer);
 const char *g_supplicant_peer_get_path(GSupplicantPeer *peer);
 const char *g_supplicant_peer_get_identifier(GSupplicantPeer *peer);
 const void *g_supplicant_peer_get_device_address(GSupplicantPeer *peer);
+const void *g_supplicant_peer_get_iface_address(GSupplicantPeer *peer);
 const char *g_supplicant_peer_get_name(GSupplicantPeer *peer);
 const unsigned char *g_supplicant_peer_get_widi_ies(GSupplicantPeer *peer,
                                                                int *length);
diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c
index 909a617..060a4df 100644
--- a/gsupplicant/supplicant.c
+++ b/gsupplicant/supplicant.c
@@ -1079,6 +1079,14 @@ const void 
*g_supplicant_peer_get_device_address(GSupplicantPeer *peer)
        return peer->device_address;
 }
 
+const void *g_supplicant_peer_get_iface_address(GSupplicantPeer *peer)
+{
+       if (!peer)
+               return NULL;
+
+       return peer->iface_address;
+}
+
 const char *g_supplicant_peer_get_name(GSupplicantPeer *peer)
 {
        if (!peer)
@@ -2838,7 +2846,6 @@ static void group_sig_property(const char *key, 
DBusMessageIter *iter,
 
                if (len == ETH_ALEN)
                        memcpy(data->iface_address, dev_addr, len);
-
        } else if (g_strcmp0(key, "role") == 0) {
                const char *str = NULL;
 
-- 
2.0.4

_______________________________________________
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

Reply via email to