aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs/gtphub.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2015-11-10 22:07:04 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2015-11-16 15:16:36 +0100
commitc227594394ddd00e11b8e57cfd16182338cef131 (patch)
treeff722434292655148823d181ccff2b59e2f73be1 /openbsc/src/gprs/gtphub.c
parent5b664f4b9b95f3f8be3741794fceb309a345bb00 (diff)
gtphub: make test code reusable for future tests.
Generalize to make the PDP ctx message definitions and "sending" of messages from SGSN->gtphub->GGSN and back reusable in future tests. Publish gsn_addr_from_sockaddr() in gtphub.h for use in gtphub_test.c. Use an osmo_sockaddr for resolved_ggsn_addr, because one is needed for comparison in probably every future test. Add LVL2_ASSERT() to print assertion message and return instead of abort, so that functions can be called from several tests without losing the info of which test caused it from which line. Use globals for struct gtphub and time_t now, to reduce nr of args that need to be passed around when writing tests. Add a default test setup function. Sponsored-by: On-Waves ehi
Diffstat (limited to 'openbsc/src/gprs/gtphub.c')
-rw-r--r--openbsc/src/gprs/gtphub.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/openbsc/src/gprs/gtphub.c b/openbsc/src/gprs/gtphub.c
index 76fe78add..f24fc042a 100644
--- a/openbsc/src/gprs/gtphub.c
+++ b/openbsc/src/gprs/gtphub.c
@@ -91,8 +91,6 @@ void gsn_addr_copy(struct gsn_addr *gsna, const struct gsn_addr *src)
memcpy(gsna, src, sizeof(struct gsn_addr));
}
-/* Decode sa to gsna. Return 0 on success. If port is non-NULL, the port number
- * from sa is also returned. */
int gsn_addr_from_sockaddr(struct gsn_addr *gsna, uint16_t *port,
const struct osmo_sockaddr *sa)
{