From 2d2490ed4eead00f23cc4a34b6a0fb17751f6a8f Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Fri, 20 Oct 2017 19:41:26 +0200 Subject: 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 --- include/osmocom/core/socket.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/osmocom/core/socket.h b/include/osmocom/core/socket.h index ebfcab3a..47d9f308 100644 --- a/include/osmocom/core/socket.h +++ b/include/osmocom/core/socket.h @@ -57,4 +57,6 @@ int osmo_sock_mcast_ttl_set(int fd, uint8_t ttl); 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); + /*! @} */ -- cgit v1.2.3