[PATCH] gsm48: factor out MCC+MNC BCD parsing for re-use in UMTS

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Harald Welte laforge at gnumonks.org
Wed Mar 16 10:46:01 UTC 2016


Hi Neels,

On Tue, Mar 15, 2016 at 01:28:10PM +0100, Neels Hofmeyr wrote:
> So create new functions to take on the MCC+MNC BCD handling and call those
> from gsm48_generate_lai() and gsm48_decode_lai(). In this way, the 3G code
> in openbsc can use only the BCD functionality without code duplication.

fine.  As this kind of bit/nibble shifting is something that can easily
get wrong, and we don't have a test case yet, it should be best to add a
test case testing gsm48_generate_lai() first, then perform the
factoring-out and confirm that the test result doesn't change.

-- 
- Harald Welte <laforge at gnumonks.org>           http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
                                                  (ETSI EN 300 175-7 Ch. A6)



More information about the OpenBSC mailing list