aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs/gprs_utils.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2015-11-08 20:34:47 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2015-11-16 15:16:30 +0100
commit30f7bcbd79ad1b661dff844a43f0ccbf4f07cebf (patch)
tree68715097523724d61c56a99f2db6f947fac2f55b /openbsc/src/gprs/gprs_utils.c
parentc8a614d2e9c56fe13c22f239be82f2a2c958e039 (diff)
gtphub: add first bits of GRX ares
For the resolving function, change the function signature to return a gtphub_peer_port. In consequence, publish two functions concerned with gtphub_peer_port instances for use in test and gtphub_ext.c. Add GGSN resolution queue, callback and cache. Simple implementation: if an SGSN asks for a GGSN, it will first get no answer, and I hope it will ask again once the GGSN is in the cache. Within gtphub_ext.c, have a dummy sgsn struct, as the sgsn_ares code currently depends on it (half the functions pass an sgsn instance pointer around, but the other half use the global one). In the unit tests, wrap away the ares initialization so that they can work without a DNS server around. The netcat test breaks because of this, will remove it. Using sgsn_ares, implement the gtphub_resolve_ggsn_addr() function, I hope: untested. Minor cosmetics just to see if you're paying attention... ;) Sponsored-by: On-Waves ehi
Diffstat (limited to 'openbsc/src/gprs/gprs_utils.c')
-rw-r--r--openbsc/src/gprs/gprs_utils.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/openbsc/src/gprs/gprs_utils.c b/openbsc/src/gprs/gprs_utils.c
index 2293f0254..ad479db81 100644
--- a/openbsc/src/gprs/gprs_utils.c
+++ b/openbsc/src/gprs/gprs_utils.c
@@ -114,7 +114,9 @@ int gprs_msgb_resize_area(struct msgb *msg, uint8_t *area,
}
/* TODO: Move these conversion functions to a utils file. */
-/**
+/* TODO: consolidate with gprs_apn2str(). */
+/** memmove apn_enc to out_str, replacing the length octets in apn_enc with '.'
+ * (omitting the first one) and terminating with a '\0'.
* out_str needs to have rest_chars amount of bytes or 1 whatever is bigger.
*/
char * gprs_apn_to_str(char *out_str, const uint8_t *apn_enc, size_t rest_chars)