summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-05-23 20:41:31 +0200
committerHarald Welte <laforge@gnumonks.org>2011-05-23 20:41:31 +0200
commitea4b12aa5ddc054547926f5eca0e036268c1e98e (patch)
tree2436019667847fb4c3d30fab263f542881d02314 /src
parent61dc63e354e1a68317f72d485bea4b6a0194e863 (diff)
abis_nm: remove abis_nm_obj_class_name / abis_nm_adm_state_name
and export the underlying raw value_string arrays instead: abis_nm_obj_class_names / abis_nm_adm_state_names. This permits the caller to use get_string_value() as well as get_value_string().
Diffstat (limited to 'src')
-rw-r--r--src/gsm/abis_nm.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/gsm/abis_nm.c b/src/gsm/abis_nm.c
index 8e769df8..109c3bba 100644
--- a/src/gsm/abis_nm.c
+++ b/src/gsm/abis_nm.c
@@ -308,7 +308,7 @@ const struct tlv_definition abis_nm_att_tlvdef = {
},
};
-static const struct value_string abis_nm_obj_class_names[] = {
+const struct value_string abis_nm_obj_class_names[] = {
{ NM_OC_SITE_MANAGER, "SITE-MANAGER" },
{ NM_OC_BTS, "BTS" },
{ NM_OC_RADIO_CARRIER, "RADIO-CARRIER" },
@@ -329,11 +329,6 @@ static const struct value_string abis_nm_obj_class_names[] = {
{ 0, NULL }
};
-const char *abis_nm_obj_class_name(uint8_t oc)
-{
- return get_value_string(abis_nm_obj_class_names, oc);
-}
-
const char *abis_nm_opstate_name(uint8_t os)
{
switch (os) {
@@ -384,7 +379,7 @@ const char *abis_nm_test_name(uint8_t test)
return get_value_string(test_names, test);
}
-static const struct value_string abis_nm_adm_state_names[] = {
+const struct value_string abis_nm_adm_state_names[] = {
{ NM_STATE_LOCKED, "Locked" },
{ NM_STATE_UNLOCKED, "Unlocked" },
{ NM_STATE_SHUTDOWN, "Shutdown" },
@@ -392,15 +387,10 @@ static const struct value_string abis_nm_adm_state_names[] = {
{ 0, NULL }
};
-const char *abis_nm_adm_state_name(uint8_t adm)
-{
- return get_value_string(abis_nm_adm_state_names, adm);
-}
-
void abis_nm_debugp_foh(int ss, struct abis_om_fom_hdr *foh)
{
DEBUGP(ss, "OC=%s(%02x) INST=(%02x,%02x,%02x) ",
- abis_nm_obj_class_name(foh->obj_class), foh->obj_class,
- foh->obj_inst.bts_nr, foh->obj_inst.trx_nr,
+ get_value_string(abis_nm_obj_class_names, foh->obj_class),
+ foh->obj_class, foh->obj_inst.bts_nr, foh->obj_inst.trx_nr,
foh->obj_inst.ts_nr);
}