Change in libosmocore[master]: add osmo_ip_port API

Neels Hofmeyr gerrit-no-reply at
Mon Mar 4 23:20:17 UTC 2019

Hello Jenkins Builder, 

I'd like you to reexamine a change. Please visit

to look at the new patch set (#3).

Change subject: add osmo_ip_port API

add osmo_ip_port 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/ip_port.h
M src/
A src/ip_port.c
M tests/
A tests/ip_port/ip_port_test.c
A tests/ip_port/ip_port_test.ok
M tests/
8 files changed, 995 insertions(+), 0 deletions(-)

  git pull ssh:// refs/changes/23/13123/3
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: 3
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at>
Gerrit-Reviewer: Jenkins Builder (1000002)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gerrit-log mailing list