aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2010-07-30 11:11:38 +0200
committerHarald Welte <laforge@gnumonks.org>2010-07-30 11:17:13 +0200
commit5f827f4edea1a66a5a050edb022be81d2d9f8313 (patch)
tree409b0676f570f8348ac682b734d43a9dbcdd698a
parent88f9d98ccc2b8719b826d1a34c3aad8af3e4c132 (diff)
Add more RSL <-> Osmo SI type mappings, export osmo_sitype_strs[]
-rw-r--r--openbsc/include/openbsc/system_information.h3
-rw-r--r--openbsc/src/system_information.c18
2 files changed, 19 insertions, 2 deletions
diff --git a/openbsc/include/openbsc/system_information.h b/openbsc/include/openbsc/system_information.h
index 55c00d817..3ab8de015 100644
--- a/openbsc/include/openbsc/system_information.h
+++ b/openbsc/include/openbsc/system_information.h
@@ -1,6 +1,8 @@
#ifndef _SYSTEM_INFO_H
#define _SYSTEM_INFO_H
+#include <osmocore/utils.h>
+
#define GSM_MACBLOCK_LEN 23
enum osmo_sysinfo_type {
@@ -32,6 +34,7 @@ enum osmo_sysinfo_type {
typedef u_int8_t sysinfo_buf_t[GSM_MACBLOCK_LEN];
+const struct value_string osmo_sitype_strs[_MAX_SYSINFO_TYPE];
uint8_t gsm_sitype2rsl(enum osmo_sysinfo_type si_type);
const char *gsm_sitype_name(enum osmo_sysinfo_type si_type);
int gsm_generate_si(struct gsm_bts *bts, enum osmo_sysinfo_type type);
diff --git a/openbsc/src/system_information.c b/openbsc/src/system_information.c
index ff12f8510..9e830bcdf 100644
--- a/openbsc/src/system_information.c
+++ b/openbsc/src/system_information.c
@@ -506,7 +506,21 @@ static const uint8_t rsl2sitype[0xff] = {
[RSL_SYSTEM_INFO_4] = SYSINFO_TYPE_4,
[RSL_SYSTEM_INFO_5] = SYSINFO_TYPE_5,
[RSL_SYSTEM_INFO_6] = SYSINFO_TYPE_6,
+ [RSL_SYSTEM_INFO_7] = SYSINFO_TYPE_7,
+ [RSL_SYSTEM_INFO_8] = SYSINFO_TYPE_8,
+ [RSL_SYSTEM_INFO_9] = SYSINFO_TYPE_9,
+ [RSL_SYSTEM_INFO_10] = SYSINFO_TYPE_10,
[RSL_SYSTEM_INFO_13] = SYSINFO_TYPE_13,
+ [RSL_SYSTEM_INFO_16] = SYSINFO_TYPE_16,
+ [RSL_SYSTEM_INFO_17] = SYSINFO_TYPE_17,
+ [RSL_SYSTEM_INFO_18] = SYSINFO_TYPE_18,
+ [RSL_SYSTEM_INFO_19] = SYSINFO_TYPE_19,
+ [RSL_SYSTEM_INFO_20] = SYSINFO_TYPE_20,
+ [RSL_SYSTEM_INFO_2bis] = SYSINFO_TYPE_2bis,
+ [RSL_SYSTEM_INFO_2ter] = SYSINFO_TYPE_2ter,
+ [RSL_SYSTEM_INFO_2quater] = SYSINFO_TYPE_2quater,
+ [RSL_SYSTEM_INFO_5bis] = SYSINFO_TYPE_5bis,
+ [RSL_SYSTEM_INFO_5ter] = SYSINFO_TYPE_5ter,
};
typedef int (*gen_si_fn_t)(uint8_t *output, struct gsm_bts *bts);
@@ -521,7 +535,7 @@ static const gen_si_fn_t gen_si_fn[_MAX_SYSINFO_TYPE] = {
[SYSINFO_TYPE_13] = &generate_si13,
};
-static const struct value_string sitype_strs[] = {
+const struct value_string osmo_sitype_strs[_MAX_SYSINFO_TYPE] = {
{ SYSINFO_TYPE_1, "1" },
{ SYSINFO_TYPE_2, "2" },
{ SYSINFO_TYPE_3, "3" },
@@ -553,7 +567,7 @@ uint8_t gsm_sitype2rsl(enum osmo_sysinfo_type si_type)
const char *gsm_sitype_name(enum osmo_sysinfo_type si_type)
{
- return get_value_string(sitype_strs, si_type);
+ return get_value_string(osmo_sitype_strs, si_type);
}
int gsm_generate_si(struct gsm_bts *bts, enum osmo_sysinfo_type si_type)