summaryrefslogtreecommitdiffstats
path: root/include/osmocom/gsm
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2019-05-10 11:28:27 +0200
committerosmith <osmith@sysmocom.de>2019-05-15 08:52:50 +0000
commitcdac620579b5bf44970b5f4bb11734fdfdf5bf59 (patch)
tree863be50aaf010be0b7ab0b3493bece6b5db92e4d /include/osmocom/gsm
parent18506c850c3bbcbfa814e07dc02a17fdb5f7bb9a (diff)
gsm_23_003: add GSM23003_MSISDN_{MIN,MAX}_DIGITS
Add the constant, so it can be used in create-subscriber-on-demand related patches. ITU-T Rec. E.164 6.1 states that maximum international number length should be 15. I did not find a source for a minimum length, but I've added the constant and set it to 1 for consistency (based on the existing osmo_msisdn_str_valid() function). Related: OS#2542 Change-Id: Idc74f4d94ad44b9fc1b6d43178f5f33d551ebfb1
Diffstat (limited to 'include/osmocom/gsm')
-rw-r--r--include/osmocom/gsm/protocol/gsm_23_003.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/osmocom/gsm/protocol/gsm_23_003.h b/include/osmocom/gsm/protocol/gsm_23_003.h
index be1b157b..3e5c3e57 100644
--- a/include/osmocom/gsm/protocol/gsm_23_003.h
+++ b/include/osmocom/gsm/protocol/gsm_23_003.h
@@ -20,6 +20,9 @@
#define GSM23003_MME_CODE_NUM_BYTES 1
#define GSM23003_MME_GROUP_NUM_BYTES 2
#define GSM23003_MTMSI_NUM_BYTES 4
+/* Chapter 3.2 */
+#define GSM23003_MSISDN_MAX_DIGITS 15 /* ITU-T Rec. E.164 6.1 */
+#define GSM23003_MSISDN_MIN_DIGITS 1
/* Chapter 6.2.1 */
#define GSM23003_IMEI_TAC_NUM_DIGITS 8
#define GSM23003_IMEI_SNR_NUM_DIGITS 6