libosmocore.git branch neels/mnc3 updated. 0.10.2-187-ga5bae465

gitosis at gitosis at
Tue Feb 27 02:48:05 UTC 2018

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "An utility library for Open Source Mobile Communications".

The branch, neels/mnc3 has been updated
  discards  2b389ddd9ab23ce8e928def27e942a43dd4af4df (commit)
  discards  7484778e18a650ebc77c55ebd229f96ad302307f (commit)
  discards  322b4deae2799159130caffba64e7d204f9eb9ed (commit)
  discards  14e995070e632f626b41eb73f87d983ce9141d11 (commit)
  discards  aa8e052ef9538c43940179384e85dda0ba1bc933 (commit)
  discards  487f9d8d9f41e5dc3c184b7bd1d71128fab8b8b9 (commit)
       via  a5bae465eafd50657c4e5314d7e14477f23a0e48 (commit)
       via  b042ef1252d25d6e6513456d56df029472f30cd1 (commit)
       via  a4f39f52220f6ce560425860da2e64a9fc842d20 (commit)
       via  1d118e28c50127d88b8445b9b8c1b4d349dc4ad9 (commit)
       via  6c0204d57ff0df3b06a28256ee29152702ebb67f (commit)
       via  913d8503a3f705ffb43f43418c245d52a5b1d481 (commit)
       via  cc81722736c9bd2a0a16cf2247eda6b82074a198 (commit)
       via  888dc7d31aa4b39ba8e08884c39be1c09c92f82a (commit)
       via  6950b191e84c73687f9dc77462ff66cbeaec5686 (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (2b389ddd9ab23ce8e928def27e942a43dd4af4df)
             N -- N -- N (a5bae465eafd50657c4e5314d7e14477f23a0e48)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------

commit a5bae465eafd50657c4e5314d7e14477f23a0e48
Author: Neels Hofmeyr <neels at>
Date:   Tue Feb 20 15:14:14 2018 +0100

    introduce GSM_MCC_MNC_INVALID
    In some cases, we want to mark an unset MCC-MNC. Define uint16-max for this
    osmo-bsc code is already doing so with a -1 and using int data types, which
    will become inconvenient with the new API that handles MCC and MNC as uint16_t.
    Change-Id: Ieee7add0bd6d94cf84743a49794bbcd38561b72f

commit b042ef1252d25d6e6513456d56df029472f30cd1
Author: Neels Hofmeyr <neels at>
Date:   Tue Feb 20 21:38:00 2018 +0100

    gsm: add osmo_mnc_from_str(), osmo_mnc_cmp(), osmo_plmn_cmp() for 3-digit MNC
    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

commit a4f39f52220f6ce560425860da2e64a9fc842d20
Author: Neels Hofmeyr <neels at>
Date:   Tue Feb 20 22:20:42 2018 +0100

    gsm0408_test: add test cases for MNC with leading zeros
    Change-Id: I9b387e09293a6bbef84b9620ccf21ee2f9ec751c

commit 1d118e28c50127d88b8445b9b8c1b4d349dc4ad9
Author: Neels Hofmeyr <neels at>
Date:   Tue Feb 20 22:19:56 2018 +0100

    gsm0408_test: test new gsm48_{decode,generate}_lai2() functions
    Change-Id: I4c8492b8055803d2857f1ef30aede088778b085b

commit 6c0204d57ff0df3b06a28256ee29152702ebb67f
Author: Neels Hofmeyr <neels at>
Date:   Tue Feb 20 15:12:23 2018 +0100

    gsm0408_test: check for new mnc_3_digits flag
    Note that on the input side, the 3-digits flag may be left false when the MNC
    is >99 anyway. On the decoded side, the flag is set accurately.
    Change-Id: I89765613d8c5bd939a6957f7443ac88475f1b93c

commit 913d8503a3f705ffb43f43418c245d52a5b1d481
Author: Neels Hofmeyr <neels at>
Date:   Tue Feb 20 13:47:08 2018 +0100

    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
    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().
    - gsm0808_create_layer3_aoip2() after gsm0808_create_layer3_aoip().
    - osmo_decode_lai(), osmo_generate_lai() after
      gsm48_decode_lai(), gsm48_generate_lai().
    - gsm0808_create_layer3_2() after gsm0808_create_layer3() and gsm0808_create_layer3_aoip().
    - various osmo_*_name() functions. The amount and duplication of these may seem
      a bit overboard, but IMO they do make sense in this way. The root reason is
      that the use of MCC and MNC is quite diverse throughout the osmocom code
      base: in certain code, they are single uint16_t, in others they are embedded
      in structs along with lac and rac; sometimes, all should be printed in one go
      (repeatedly), in other 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, or printing
      MCC-MNC or RAI would otherwise end up to be more code.
    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


Summary of changes:
 include/osmocom/coding/gsm0503_coding.h |  10 +-
 include/osmocom/gsm/gsm0808.h           |   8 +-
 include/osmocom/gsm/gsm23003.h          |   2 +-
 include/osmocom/gsm/gsm48.h             |  23 +++--
 src/coding/gsm0503_coding.c             |  46 ++++++++-
 src/coding/            |   2 +
 src/fsm.c                               |   2 +
 src/gsm/gsm0808.c                       |  36 ++++----
 src/gsm/gsm48.c                         | 159 ++++++++++++++++++--------------
 src/gsm/                  |  22 ++---
 src/vty/fsm_vty.c                       |  12 ++-
 tests/coding/coding_test.c              |   4 +-
 tests/fsm/fsm_test.c                    |   7 ++
 tests/fsm/fsm_test.err                  |   8 +-
 tests/gsm0408/gsm0408_test.c            |  39 ++++----
 tests/gsm0408/gsm0408_test.ok           |  44 ++++-----
 16 files changed, 256 insertions(+), 168 deletions(-)

An utility library for Open Source Mobile Communications

More information about the osmocom-commitlog mailing list