aboutsummaryrefslogtreecommitdiffstats
path: root/src/sockaddr_str.c
AgeCommit message (Collapse)AuthorFilesLines
2019-04-11make osmo_sockaddr_str_is_set() NULL-safeNeels Hofmeyr1-1/+2
Obviously a NULL pointer should return false instead of segfaulting. Change-Id: Iac025cf4d556cbed99f3924cd9ca05a05881cd9a
2019-04-08add osmo_sockaddr_str APINeels Hofmeyr1-0/+378
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