libosmocore/debian
Neels Hofmeyr c4fce1425e 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
2018-02-28 19:26:33 +01:00
..
patches Remove obsolete .deb patch 2017-01-10 23:29:47 +00:00
source Fix debian package building. 2012-08-26 20:11:24 +02:00
changelog Bump version: 0.10.1 → 0.10.2 2017-11-02 18:55:08 +01:00
compat debian: Move to multi-arch support in libosmocore 2015-03-14 19:22:34 +01:00
control implement support for 3-digit MNC with leading zeros 2018-02-28 19:26:33 +01:00
copyright license: Fix the license to GPL 2017-12-09 13:03:29 +00:00
libosmocodec-doc.doc-base Integrate Debian packaging changes 2016-12-22 13:54:32 +00:00
libosmocodec-doc.install Integrate Debian packaging changes 2016-12-22 13:54:32 +00:00
libosmocodec0.install debian: Move to multi-arch support in libosmocore 2015-03-14 19:22:34 +01:00
libosmocoding-doc.doc-base libosmocoding: fix .deb building 2017-03-07 15:36:33 +01:00
libosmocoding-doc.install libosmocoding: fix .deb building 2017-03-07 15:36:33 +01:00
libosmocoding0.install libosmocoding: fix .deb building 2017-03-07 15:36:33 +01:00
libosmocore-dev.install Fixup severe build performance issues 2017-10-04 16:26:37 +02:00
libosmocore-doc.doc-base Integrate Debian packaging changes 2016-12-22 13:54:32 +00:00
libosmocore-doc.install Integrate Debian packaging changes 2016-12-22 13:54:32 +00:00
libosmocore-utils.dirs debian: Bump the changelog and package osmo-arfcn 2013-01-04 10:10:52 +01:00
libosmocore-utils.install debian: Bump the changelog and package osmo-arfcn 2013-01-04 10:10:52 +01:00
libosmocore.dirs update include paths in debian packaging spec 2011-05-10 11:28:02 +02:00
libosmocore.install debian: Split libosmocore into various libs and address lintian warnings 2013-08-12 15:29:54 +02:00
libosmocore9.install Tag/Release version 0.10.0 2017-10-27 20:18:49 +02:00
libosmoctrl1.install Tag/Release version 0.10.0 2017-10-27 20:18:49 +02:00
libosmogb-doc.doc-base deb: fix build by adding libosmogb doc package 2017-06-27 13:57:56 +02:00
libosmogb-doc.install deb: fix build by adding libosmogb doc package 2017-06-27 13:57:56 +02:00
libosmogb6.install implement support for 3-digit MNC with leading zeros 2018-02-28 19:26:33 +01:00
libosmogsm-doc.doc-base Integrate Debian packaging changes 2016-12-22 13:54:32 +00:00
libosmogsm-doc.install Integrate Debian packaging changes 2016-12-22 13:54:32 +00:00
libosmogsm9.install implement support for 3-digit MNC with leading zeros 2018-02-28 19:26:33 +01:00
libosmosim0.install debian: Move to multi-arch support in libosmocore 2015-03-14 19:22:34 +01:00
libosmovty-doc.doc-base Integrate Debian packaging changes 2016-12-22 13:54:32 +00:00
libosmovty-doc.install Integrate Debian packaging changes 2016-12-22 13:54:32 +00:00
libosmovty4.install Tag/Release version 0.10.0 2017-10-27 20:18:49 +02:00
rules deb: fix build by adding libosmogb doc package 2017-06-27 13:57:56 +02:00