diff --git a/src/Tizen.Network.WiFi/Interop/Interop.WiFi.cs b/src/Tizen.Network.WiFi/Interop/Interop.WiFi.cs
index 580f0cc0268..10e5c65ef9a 100755
--- a/src/Tizen.Network.WiFi/Interop/Interop.WiFi.cs
+++ b/src/Tizen.Network.WiFi/Interop/Interop.WiFi.cs
@@ -132,6 +132,8 @@ internal static partial class WiFi
internal static extern int SetScanStateChangedCallback(SafeWiFiManagerHandle wifi, ScanStateChangedCallback callback, IntPtr userData);
[DllImport(Libraries.WiFi, EntryPoint = "wifi_manager_unset_scan_state_changed_cb")]
internal static extern int UnsetScanStateChangedCallback(SafeWiFiManagerHandle wifi);
+ [DllImport(Libraries.WiFi, EntryPoint = "wifi_manager_tdls_get_connected_peer")]
+ internal static extern int GetTdlsConnectedPeer(SafeWiFiManagerHandle wifi, out string peerMacAddress);
internal static class AP
{
diff --git a/src/Tizen.Network.WiFi/Tizen.Network.WiFi/WiFiManager.cs b/src/Tizen.Network.WiFi/Tizen.Network.WiFi/WiFiManager.cs
index d7dd257d003..dfd571edcde 100755
--- a/src/Tizen.Network.WiFi/Tizen.Network.WiFi/WiFiManager.cs
+++ b/src/Tizen.Network.WiFi/Tizen.Network.WiFi/WiFiManager.cs
@@ -536,5 +536,17 @@ static public Task StartMultiScan(int frequency)
WiFiManagerImpl.Instance.SetSpecificScanFreq(frequency);
return WiFiManagerImpl.Instance.StartMultiScan();
}
+
+ ///
+ /// Gets MAC address of peer connected through TDLS.
+ ///
+ /// 11
+ /// MAC address of the TDLS peer if connected on success or an empty string.
+ /// http://tizen.org/privilege/network.get
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ static public string GetTDLSConnectedPeer()
+ {
+ return WiFiManagerImpl.Instance.GetTDLSConnectedPeer();
+ }
}
}
diff --git a/src/Tizen.Network.WiFi/Tizen.Network.WiFi/WiFiManagerImpl.cs b/src/Tizen.Network.WiFi/Tizen.Network.WiFi/WiFiManagerImpl.cs
index 64c2740f7d0..4a9ab715a43 100644
--- a/src/Tizen.Network.WiFi/Tizen.Network.WiFi/WiFiManagerImpl.cs
+++ b/src/Tizen.Network.WiFi/Tizen.Network.WiFi/WiFiManagerImpl.cs
@@ -724,6 +724,17 @@ internal Task StartMultiScan()
return task.Task;
}
+ internal string GetTDLSConnectedPeer()
+ {
+ string address = "";
+ int ret = Interop.WiFi.GetTdlsConnectedPeer(GetSafeHandle(), out address);
+ if (ret != (int)WiFiError.None)
+ {
+ Log.Error(Globals.LogTag, "Failed to get mac address, Error - " + (WiFiError)ret);
+ }
+ return String.Copy(address);
+ }
+
private void CheckReturnValue(int ret, string method, string privilege)
{
if (ret != (int)WiFiError.None)