socket: add function osmo_sock_local_ip() to query local ip

In some cases it is required to know the ip-address of the interface
through that a given remote IP-Address can be reached.

Add function osmo_sock_local_ip() to determine the local ip-address
for a given remote ip-address

Change-Id: I2988cc52b196fc8476703d1287e24cb4a48491c2
diff --git a/include/osmocom/core/socket.h b/include/osmocom/core/socket.h
index ebfcab3..47d9f30 100644
--- a/include/osmocom/core/socket.h
+++ b/include/osmocom/core/socket.h
@@ -57,4 +57,6 @@
 int osmo_sock_mcast_all_set(int fd, bool enable);
 int osmo_sock_mcast_subscribe(int fd, const char *grp_addr);
 
+int osmo_sock_local_ip(char *local_ip, const char *remote_ip);
+
 /*! @} */