summaryrefslogtreecommitdiffstats
path: root/debian
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-02-20 13:47:08 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2018-02-28 19:26:33 +0100
commitc4fce1425e19d604c199c895e227dc2519110456 (patch)
tree0eecba6800e7ac3a714d8a7b7183b6c44bb09f40 /debian
parent8fd85578bc7174155e1bb9e98a0d7cdbf85749af (diff)
implement support for 3-digit MNC with leading zeros
Enable representing three-digit MNC with leading zeros. The MNCs 23 and 023 are actually different; so far we treated both as 23. Re-encode an incoming BCD or string of 023 as it were, i.e. not dropping the leading zero as 23. Break ABI compatibility by changing the size and ordering of structs gprs_ra_id, osmo_plmn_id, osmo_cell_global_id, ... by adding an mnc_3_digits flag. Change ordering in gprs_ra_id because the canonical oder is {Mobile Country Code, Mobile Network Code}, so have the mcc member first. ABI compatibility cannot be maintained for struct gprs_ra_id, since it is a direct member of structs bssgp_bvc_ctx and bssgp_paging_info, and even just adding a flag to the end would cause ABI changes of those structs. Similarly, osmo_plmn_id is a direct member of osmo_location_area_id, and so forth. Add new API to set and read this additional flag to preserve leading zeros: - osmo_plmn_to_bcd(), osmo_plmn_from_bcd() after gsm48_mcc_mnc_to_bcd() and gsm48_mcc_mnc_from_bcd(). - gsm48_decode_lai2(), gsm48_generate_lai2() after gsm48_decode_lai(), gsm48_generate_lai(). - gsm0808_create_layer3_2() after gsm0808_create_layer3() and gsm0808_create_layer3_aoip(). - various osmo_*_name() functions in gsm23003.h (osmo_rai_name() still in gsm48.h close to struct gprs_ra_id definition). The amount and duplication of these may seem a bit overboard, but IMO they do make sense in this way. Though most code will soon see patches unifying the data structures used, in some cases (vty, ctrl) they are required singled out. Without these functions, the formatting ("%0*u", mnc_3_digits ? 3 : 2, mnc) would be duplicated all over our diverse repositories. In various log output, include the leading MNC zeros. Mark one TODO in card_fs_sim.c, I am not sure how to communicate a leading zero to/from a SIM card FS. The focus here is on the core network / BSS. To indicate ABI incompatibility, bump libosmogsm and libosmogb LIBVERSIONs; adjust debian files accordingly. Implementation choices: - The default behavior upon zero-initialization will be the mnc_3_digits flag set to false, which yields exactly the previous behavior. - I decided against packing the mnc with the mnc_3_digits field into a sub-struct because it would immediately break all builds of dependent projects: it would require immediate merging of numerous patches in other repositories, and it would make compiling older code against a newer libosmocore unneccessarily hard. Change-Id: Id2240f7f518494c9df6c8bda52c0d5092f90f221
Diffstat (limited to 'debian')
-rw-r--r--debian/control12
-rw-r--r--debian/libosmogb6.install (renamed from debian/libosmogb5.install)0
-rw-r--r--debian/libosmogsm9.install (renamed from debian/libosmogsm8.install)0
3 files changed, 6 insertions, 6 deletions
diff --git a/debian/control b/debian/control
index 596c3f19..d911f32f 100644
--- a/debian/control
+++ b/debian/control
@@ -28,8 +28,8 @@ Multi-Arch: foreign
Depends: libosmocodec0 (= ${binary:Version}),
libosmocoding0 (= ${binary:Version}),
libosmocore9 (= ${binary:Version}),
- libosmogb5 (= ${binary:Version}),
- libosmogsm8 (= ${binary:Version}),
+ libosmogb6 (= ${binary:Version}),
+ libosmogsm9 (= ${binary:Version}),
libosmovty4 (= ${binary:Version}),
libosmoctrl1 (= ${binary:Version}),
libosmosim0 (= ${binary:Version}),
@@ -146,7 +146,7 @@ Description: Documentation for the Osmo Core library
.
This package contains the documentation for the libosmocore library.
-Package: libosmogb5
+Package: libosmogb6
Section: libs
Architecture: any
Multi-Arch: same
@@ -167,7 +167,7 @@ Package: libosmogb-doc
Architecture: all
Section: doc
Depends: ${misc:Depends},
- libosmogb5,
+ libosmogb6,
libjs-jquery
Description: Documentation for the Osmo GPRS Gb library
This is part of the libosmocore "meta"-library. The libosmocore library
@@ -178,7 +178,7 @@ Description: Documentation for the Osmo GPRS Gb library
.
This package contains the documentation for the libosmogb library.
-Package: libosmogsm8
+Package: libosmogsm9
Section: libs
Architecture: any
Multi-Arch: same
@@ -202,7 +202,7 @@ Package: libosmogsm-doc
Architecture: all
Section: doc
Depends: ${misc:Depends},
- libosmogsm8,
+ libosmogsm9,
libjs-jquery
Description: Documentation for the Osmo GSM utility library
This is part of the libosmocore "meta"-library. The libosmocore library
diff --git a/debian/libosmogb5.install b/debian/libosmogb6.install
index 4c474255..4c474255 100644
--- a/debian/libosmogb5.install
+++ b/debian/libosmogb6.install
diff --git a/debian/libosmogsm8.install b/debian/libosmogsm9.install
index 5e617298..5e617298 100644
--- a/debian/libosmogsm8.install
+++ b/debian/libosmogsm9.install