From 59f4caf4efcbd76478cdd2a1d800c0978144c5ba Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Thu, 19 Jul 2018 22:13:19 +0200 Subject: add osmo_sockaddr_to_str_and_uint() This came from osmo-bsc refactoring patch I82e3f918295daa83274a4cf803f046979f284366 https://gerrit.osmocom.org/#/c/osmo-bsc/+/9671/6/src/osmo-bsc/gsm_data.c@1708 Add regression test in utils_test.c. Change-Id: I1f2918418c38918c5ac70acaa51a47adfca12b5e --- include/osmocom/core/socket.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/osmocom') diff --git a/include/osmocom/core/socket.h b/include/osmocom/core/socket.h index 47d9f308..20515b99 100644 --- a/include/osmocom/core/socket.h +++ b/include/osmocom/core/socket.h @@ -44,6 +44,9 @@ int osmo_sock_init_sa(struct sockaddr *ss, uint16_t type, int osmo_sockaddr_is_local(struct sockaddr *addr, unsigned int addrlen); +unsigned int osmo_sockaddr_to_str_and_uint(char *addr, unsigned int addr_len, uint16_t *port, + const struct sockaddr *sa); + int osmo_sock_unix_init(uint16_t type, uint8_t proto, const char *socket_path, unsigned int flags); -- cgit v1.2.3