summaryrefslogtreecommitdiffstats
path: root/include/osmocom
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2014-10-01 16:18:11 +0800
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-05-25 11:12:16 +0800
commit908085ccbc6383e95f2c80134bcaf2e9816b7187 (patch)
tree9f5dfce6293ca3120da4fd09122482a50143f38d /include/osmocom
parent0d86c21f6af7452291f4148c166e145fb65dc0b9 (diff)
Add APN utility function to libosmogsm
The current functions are used to 'qualify' an APN from the user-supplied APN name (name identifier) towards the fully-qualified APN name which is used in the .grps DNS zone.
Diffstat (limited to 'include/osmocom')
-rw-r--r--include/osmocom/gsm/apn.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/osmocom/gsm/apn.h b/include/osmocom/gsm/apn.h
new file mode 100644
index 00000000..d8d73996
--- /dev/null
+++ b/include/osmocom/gsm/apn.h
@@ -0,0 +1,13 @@
+#pragma once
+
+#include <stdint.h>
+
+/* 23.003 Section 9.1.1, excluding any terminating zero byte */
+#define APN_NI_MAXLEN 63
+
+/* 23.003 Section 9.1, excluding any terminating zero byte */
+#define APN_MAXLEN 100
+
+char *osmo_apn_qualify(unsigned int mcc, unsigned int mnc, const char *ni);
+char *osmo_apn_qualify_from_imsi(const char *imsi,
+ const char *ni, int have_3dig_mnc);