summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2017-10-19 16:49:12 +0200
committerHarald Welte <laforge@gnumonks.org>2017-10-23 16:59:57 +0000
commit4b45669761234ff23769c4d376b04b3003d4bea9 (patch)
tree5e824b1036f2c871828f6433384a42526cd69525 /include
parent2d2490ed4eead00f23cc4a34b6a0fb17751f6a8f (diff)
abis_nm: Add abis_nm_admin_name() API
Similar APIs exist for opstate and availability status. This patch does not break backward compatibility because osmo-bsc still requires direct use of the structure in get_string_value(). Change-Id: Ieace734aaff3f07606113feddde65b75202d96d6
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/gsm/abis_nm.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/osmocom/gsm/abis_nm.h b/include/osmocom/gsm/abis_nm.h
index e031ee10..dd7ba0d5 100644
--- a/include/osmocom/gsm/abis_nm.h
+++ b/include/osmocom/gsm/abis_nm.h
@@ -28,9 +28,16 @@ const char *abis_nm_nack_name(uint8_t nack);
const char *abis_nm_event_type_name(uint8_t cause);
const char *abis_nm_severity_name(uint8_t cause);
extern const struct tlv_definition abis_nm_att_tlvdef;
+
const char *abis_nm_opstate_name(uint8_t os);
const char *abis_nm_avail_name(uint8_t avail);
const char *abis_nm_test_name(uint8_t test);
+/*! Get human-readable string for OML administrative state */
+static inline const char *abis_nm_admin_name(uint8_t admin)
+{
+ return get_value_string(abis_nm_adm_state_names, admin);
+}
+
extern const struct tlv_definition abis_nm_osmo_att_tlvdef;
extern const struct tlv_definition abis_nm_att_tlvdef_ipa;