summaryrefslogtreecommitdiffstats
path: root/tests/gsm23003/gsm23003_test.ok
Commit message (Collapse)AuthorAgeFilesLines
* gsm23003: add osmo_imei_str_valid()Oliver Smith2019-01-141-0/+12
| | | | | | | | | | | Verify 14 digit and 15 digit IMEI strings. OsmoHLR will use the 14 digit version to check IMEIs before writing them to the DB. Place the Luhn checksum code in a dedicated osmo_luhn() function, so it can be used elsewhere. Related: OS#2541 Change-Id: Id2d2a3a93b033bafc74c62e15297034bf4aafe61
* gsm23003: Add MME domain name related helper functionsHarald Welte2018-10-281-0/+5
| | | | | | | osmo_gen_mme_group_domain(), osmo_gen_mme_group_domain() and osmo_gen_home_network_domain() Change-Id: Ia882d9db05ec0037e593aeebea21bc31adb680bb
* fix osmo_mnc_from_str(): don't try to parse NULLNeels Hofmeyr2018-03-051-7/+7
| | | | | | | | In osmo_mnc_from_str() do not try to return some values even if the validation fails; hence don't try to decode a NULL pointer. That whole idea was half-baked and a can of worms to begin with. Change-Id: Ibaaa128ac60b941a015a31134eb52aef56bc6e22
* gsm: add osmo_mnc_from_str(), osmo_mnc_cmp(), osmo_plmn_cmp() for 3-digit MNCNeels Hofmeyr2018-02-281-0/+17
| | | | | | | | | | | osmo_mnc_from_str() preserves leading zeros in the string and is useful for VTY config parsing (osmo-bsc, osmo-msc, osmo-sgsn, osmo-pcu). osmo_{plmn,mnc}_cmp() takes care of the slight intricacy of ignoring the 3-digit flag if the MNC is anyway >99. Will be used by osmo-sgsn.git and osmo-bsc.git. (All current users just care about identical MNC, but a proper cmp doesn't hurt.) Change-Id: Ib7176b1d65a03b76f41f94bc9d3293a8a07d24c6
* gsm: make osmo_imsi_str_valid() NULL-safeNeels Hofmeyr2017-10-101-0/+2
| | | | | | | | | No callers that would pass NULL exist, but let's check against NULL from the start. Fixup for recent change I1e94f5b0717b947d2a7a7d36bacdf04a75cb3522. Change-Id: I111fbf29228929f2cd6ffa06bcb1f69da223224e
* add osmo_imsi_str_valid() and osmo_msisdn_str_valid()Neels Hofmeyr2017-10-051-0/+42
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