[PATCH] libosmocore[master]: introduce GSM_MCC_MNC_INVALID

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/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Tue Feb 27 02:47:16 UTC 2018


Hello Harald Welte, Jenkins Builder,

I'd like you to reexamine a change.  Please visit

    https://gerrit.osmocom.org/6664

to look at the new patch set (#6).

introduce GSM_MCC_MNC_INVALID

In some cases, we want to mark an unset MCC-MNC. Define uint16-max for this
purpose.

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
---
M include/osmocom/gsm/gsm48.h
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/64/6664/6

diff --git a/include/osmocom/gsm/gsm48.h b/include/osmocom/gsm/gsm48.h
index 3364d53..b7ddc06 100644
--- a/include/osmocom/gsm/gsm48.h
+++ b/include/osmocom/gsm/gsm48.h
@@ -12,6 +12,10 @@
 /* reserved according to GSM 03.03 § 2.4 */
 #define GSM_RESERVED_TMSI   0xFFFFFFFF
 
+/* Valid MCC and MNC range from 0 to 999.
+ * To mark an invalid / unset MNC, this value shall be used. */
+#define GSM_MCC_MNC_INVALID 0xFFFF
+
 /* A parsed GPRS routing area */
 struct gprs_ra_id {
 	uint16_t	mcc;

-- 
To view, visit https://gerrit.osmocom.org/6664
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ieee7add0bd6d94cf84743a49794bbcd38561b72f
Gerrit-PatchSet: 6
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list