diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2017-10-20 19:41:26 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2017-10-23 08:47:38 +0000 |
commit | 2d2490ed4eead00f23cc4a34b6a0fb17751f6a8f (patch) | |
tree | 98fd37d09e5c3c69c386f46f28fd45ab08cc8cef /include | |
parent | a19c126e7693c3f98cc8f5cd0f010d4fa23d922f (diff) |
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
Diffstat (limited to 'include')
-rw-r--r-- | include/osmocom/core/socket.h | 2 |
1 files changed, 2 insertions, 0 deletions
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); + /*! @} */ |