pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35180?usp=email )
Change subject: socket: Introduce API osmo_sock_multiaddr_get_name_buf() ......................................................................
Patch Set 1:
(1 comment)
File src/core/socket.c:
https://gerrit.osmocom.org/c/libosmocore/+/35180/comment/2e83f24a_61d0386d PS1, Line 2052: int osmo_sock_get_name_buf(char *str, size_t str_len, int fd) Something which we could do is internally integrating the multiaddr support into the existing general osmo_sock_get_name_buf(), by means of doing inside here:
int sock_type; socklen_t sock_type_length = sizeof(sock_type); getsockopt(socket, SOL_SOCKET, SO_TYPE, &sock_type, &sock_type_length); if (sock_type == IPPROTO_SCTP) osmo_sock_multiaddr_get_name_buf();
I'm fine with both approaches, the existing one or the one presented in this commit.