aboutsummaryrefslogtreecommitdiffstats
path: root/tests/testsuite.at
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2019-02-25 02:45:06 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2019-04-08 13:47:17 +0000
commit0c7826e9bd8026b239d320dba49416fd603f17fd (patch)
tree2d7553c002f684e8f2b76a4682093e29378271ac /tests/testsuite.at
parente8461e486ebac6361b0869962aa86c5b8d46e59e (diff)
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
Diffstat (limited to 'tests/testsuite.at')
-rw-r--r--tests/testsuite.at6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 0093403a..db2003f4 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -331,3 +331,9 @@ AT_KEYWORDS([tdef])
cat $abs_srcdir/tdef/tdef_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/tdef/tdef_test], [0], [expout], [ignore])
AT_CLEANUP
+
+AT_SETUP([sockaddr_str])
+AT_KEYWORDS([sockaddr_str])
+cat $abs_srcdir/sockaddr_str/sockaddr_str_test.ok > expout
+AT_CHECK([$abs_top_builddir/tests/sockaddr_str/sockaddr_str_test], [0], [expout], [ignore])
+AT_CLEANUP