This is needed in later patch when we restart the VPN connection and
need to know the earlier address so that it can be removed from the
interface.
---
 vpn/vpn-ipconfig.c | 9 +++++++++
 vpn/vpn.h          | 1 +
 2 files changed, 10 insertions(+)

diff --git a/vpn/vpn-ipconfig.c b/vpn/vpn-ipconfig.c
index 5a4ebc8..c096fa3 100644
--- a/vpn/vpn-ipconfig.c
+++ b/vpn/vpn-ipconfig.c
@@ -69,6 +69,15 @@ struct vpn_ipdevice {
 
 static GHashTable *ipdevice_hash = NULL;
 
+struct connman_ipaddress *
+__vpn_ipconfig_get_address(struct vpn_ipconfig *ipconfig)
+{
+       if (!ipconfig)
+               return NULL;
+
+       return ipconfig->address;
+}
+
 const char *__vpn_ipconfig_get_peer(struct vpn_ipconfig *ipconfig)
 {
        if (!ipconfig->address)
diff --git a/vpn/vpn.h b/vpn/vpn.h
index b75550e..8bf86bd 100644
--- a/vpn/vpn.h
+++ b/vpn/vpn.h
@@ -32,6 +32,7 @@ void __vpn_manager_cleanup(void);
 
 struct vpn_ipconfig;
 
+struct connman_ipaddress *__vpn_ipconfig_get_address(struct vpn_ipconfig 
*ipconfig);
 unsigned short __vpn_ipconfig_get_type_from_index(int index);
 unsigned int __vpn_ipconfig_get_flags_from_index(int index);
 void __vpn_ipconfig_foreach(void (*function) (int index,
-- 
1.8.3.1

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

Reply via email to