aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/core/socket.h
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-08-31 12:52:06 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2020-08-31 12:52:09 +0200
commit5cc4fe470645cff36cb2fed7aadd3ff2f224dd40 (patch)
treeafc01e54ba993c2d863a49e8d30e4916a174f50f /include/osmocom/core/socket.h
parent7bda8549a44501a98b9a29b15fd4461fadaebef0 (diff)
socket: Add some osmo_sockaddr print helpers
These are APIs useful to inline in log calls. Change-Id: Ie07a38b05b7888885dba4ae795e9f3d9a561543d
Diffstat (limited to 'include/osmocom/core/socket.h')
-rw-r--r--include/osmocom/core/socket.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/osmocom/core/socket.h b/include/osmocom/core/socket.h
index 9cb8d6ba..e6a6bd53 100644
--- a/include/osmocom/core/socket.h
+++ b/include/osmocom/core/socket.h
@@ -75,6 +75,9 @@ unsigned int osmo_sockaddr_to_str_and_uint(char *addr, unsigned int addr_len, ui
size_t osmo_sockaddr_in_to_str_and_uint(char *addr, unsigned int addr_len, uint16_t *port,
const struct sockaddr_in *sin);
+const char *osmo_sockaddr_ntop(const struct sockaddr *sa, char *dst);
+uint16_t osmo_sockaddr_port(const struct sockaddr *sa);
+
int osmo_sock_unix_init(uint16_t type, uint8_t proto,
const char *socket_path, unsigned int flags);