diff options
author | Harald Welte <laforge@gnumonks.org> | 2014-05-19 11:25:46 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2014-05-19 11:25:46 +0200 |
commit | 5b5650f3de0213a459b4184bab3ab2d0d833c4a4 (patch) | |
tree | 430c771244ae37d7cd95960fc1781ed6aeed1213 | |
parent | c22d72cdedcea9dfd2f6286fb89d352c80808327 (diff) |
Fix introducing osmocom speficic OML attributes
Rename NM_ATT_O_REDUCEPOWER to NM_ATT_OSMO_REDUCEPOWER, which
makes it more clear that this is an osmcoom specific attribute.
Also, we cannot simply overload 0x01 as an already defined OML
attribute. The problem is quite simple: When we use abis_nm_att_tlvdef
during the TLV parse, 0x01 will match to NM_ATT_ABIS_CHANNEL,
which is defined as { TLV_TYPE_FIXED, 3 }.
So instead, we need to introduce a new abis_nm_osmo_att_tlvdef[],
which has to be patched into abis_nm_att_tlvdef[] by the means of
tlv_def_patch(), exactly how we do it for bs-11 and nanobts specific
attributes.
I'm using 0xfe for the attribute, as 0xfe doesn't overlap with the IPA
specific attribues (and we might want to combine/merge the 12.21 plus
IPA plus osmocom spefici attributes)
-rw-r--r-- | include/osmocom/gsm/protocol/gsm_12_21.h | 4 | ||||
-rw-r--r-- | src/gsm/abis_nm.c | 7 | ||||
-rw-r--r-- | src/gsm/libosmogsm.map | 1 |
3 files changed, 11 insertions, 1 deletions
diff --git a/include/osmocom/gsm/protocol/gsm_12_21.h b/include/osmocom/gsm/protocol/gsm_12_21.h index b1725d54..ad0890c7 100644 --- a/include/osmocom/gsm/protocol/gsm_12_21.h +++ b/include/osmocom/gsm/protocol/gsm_12_21.h @@ -487,7 +487,9 @@ enum abis_nm_attr { NM_ATT_BS11_PLL_MODE = 0xfc, NM_ATT_BS11_PASSWORD = 0xfd, - NM_ATT_O_REDUCEPOWER = 0x01, + /* osmocom (osmo-bts) specific attributes, used in combination + * with the "org.osmocom" manufacturer identification */ + NM_ATT_OSMO_REDUCEPOWER = 0xfe, /* TLV_TYPE_TV */ }; #define NM_ATT_BS11_FILE_DATA NM_ATT_EVENT_TYPE diff --git a/src/gsm/abis_nm.c b/src/gsm/abis_nm.c index 2c23a648..7a1f6648 100644 --- a/src/gsm/abis_nm.c +++ b/src/gsm/abis_nm.c @@ -323,6 +323,13 @@ const struct tlv_definition abis_nm_att_tlvdef = { }, }; +/*! \brief org.osmocom GSM A-bis OML TLV parser definition */ +const struct tlv_definition abis_nm_osmo_att_tlvdef = { + .def = { + [NM_ATT_OSMO_REDUCEPOWER] = { TLV_TYPE_TV }, + }, +}; + /*! \brief Human-readable strings for A-bis OML Object Class */ const struct value_string abis_nm_obj_class_names[] = { { NM_OC_SITE_MANAGER, "SITE-MANAGER" }, diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 3c5025df..cab4fc40 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -10,6 +10,7 @@ abis_nm_event_type_name; abis_nm_nack_cause_name; abis_nm_nack_name; abis_nm_att_tlvdef; +abis_nm_osmo_att_tlvdef; abis_nm_obj_class_names; abis_nm_opstate_name; abis_nm_nacks; |