Change in libosmocore[master]: add osmo_sockaddr_str API

osmith gerrit-no-reply at
Wed Mar 20 14:07:37 UTC 2019

osmith has uploaded a new patch set (#6) to the change originally created by Neels Hofmeyr. ( )

Change subject: add osmo_sockaddr_str API

add osmo_sockaddr_str API

For handling RTP IP addresses and ports, osmo-mgw, osmo-bsc and osmo-msc so far
have their own separate shims and code duplication around inet_ntoa(), htons(),
sockaddr conversions etc. Unify and standardize with this common API.

In the MGW endpoint FSM that was introduced in osmo-bsc and which I would like
to re-use for osmo-msc (upcoming patch moving that to osmo-mgw), it has turned
out that using char* IP address and uint16_t port number types are a convenient
common denominator for logging, MGCP message composition and GSM48. Ongoing
osmo-msc work also uses this for MNCC.

This is of course potentially useful for any other IP+port combinations besides
RTP stream handling.

Needless to say that most current implementations will probably stay with their
current own conversion code for a long time; for current osmo-{bsc,msc,mgw}
work (MGW endpoint FSM) though, I would like to move to this API here.

Change-Id: Id617265337f09dfb6ddfe111ef5e578cd3dc9f63
M include/
A include/osmocom/core/sockaddr_str.h
M src/
A src/sockaddr_str.c
M tests/
A tests/sockaddr_str/sockaddr_str_test.c
A tests/sockaddr_str/sockaddr_str_test.ok
M tests/
9 files changed, 1,008 insertions(+), 2 deletions(-)

  git pull ssh:// refs/changes/23/13123/6
To view, visit
To unsubscribe, or for help writing mail filters, visit

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Id617265337f09dfb6ddfe111ef5e578cd3dc9f63
Gerrit-Change-Number: 13123
Gerrit-PatchSet: 6
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at>
Gerrit-Assignee: osmith <osmith at>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Max <msuraev at>
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at>
Gerrit-CC: Harald Welte <laforge at>
Gerrit-CC: osmith <osmith at>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gerrit-log mailing list