add osmo_imsi_str_valid() and osmo_msisdn_str_valid()
Add GSM23003_IMSI_MIN_DIGITS definition.
Add regression test gsm23003_test.c to test the two new functions.
Will be used by OsmoHLR to validate VTY and CTRL input.
Change-Id: I1e94f5b0717b947d2a7a7d36bacdf04a75cb3522
diff --git a/include/osmocom/gsm/gsm23003.h b/include/osmocom/gsm/gsm23003.h
index 2bc7583..dd41bc5 100644
--- a/include/osmocom/gsm/gsm23003.h
+++ b/include/osmocom/gsm/gsm23003.h
@@ -3,6 +3,7 @@
#pragma once
#include <stdint.h>
+#include <stdbool.h>
/* 23.003 Chapter 12.1 */
struct osmo_plmn_id {
@@ -81,3 +82,6 @@
struct osmo_gummei gummei;
uint32_t mtmsi;
};
+
+bool osmo_imsi_str_valid(const char *imsi);
+bool osmo_msisdn_str_valid(const char *msisdn);