diff options
author | Harald Welte <laforge@gnumonks.org> | 2015-12-13 11:56:36 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2015-12-13 21:57:29 +0100 |
commit | fad5752ab5b91e615dd82365c0663e38b4540dcd (patch) | |
tree | b6723ca1cb8eb7e6320f835fa7166c4834349b25 | |
parent | f4b173cb0c8c5179081a4b82928b375fdf0caf17 (diff) |
RSL: Add enum + TLV definitions for ip.access style embedded IEs
-rw-r--r-- | include/osmocom/gsm/protocol/gsm_08_58.h | 25 | ||||
-rw-r--r-- | include/osmocom/gsm/rsl.h | 6 | ||||
-rw-r--r-- | src/gsm/libosmogsm.map | 1 | ||||
-rw-r--r-- | src/gsm/rsl.c | 26 |
4 files changed, 58 insertions, 0 deletions
diff --git a/include/osmocom/gsm/protocol/gsm_08_58.h b/include/osmocom/gsm/protocol/gsm_08_58.h index 3f01a926..530bbc86 100644 --- a/include/osmocom/gsm/protocol/gsm_08_58.h +++ b/include/osmocom/gsm/protocol/gsm_08_58.h @@ -577,4 +577,29 @@ enum rsl_rel_mode { RSL_REL_LOCAL_END = 1, }; +/*! \brief ip.access specific embedded information elements */ +enum rsl_ipac_embedded_ie { + RSL_IPAC_EIE_RXLEV = 0x00, + RSL_IPAC_EIE_RXQUAL = 0x01, + RSL_IPAC_EIE_FREQ_ERR = 0x02, + RSL_IPAC_EIE_TIMING_ERR = 0x03, + RSL_IPAC_EIE_MEAS_AVG_CFG = 0x04, + RSL_IPAC_EIE_BS_PWR_CTL = 0x05, + RSL_IPAC_EIE_MS_PWR_CTL = 0x06, + RSL_IPAC_EIE_HANDO_THRESH = 0x07, + RSL_IPAC_EIE_NCELL_DEFAULTS = 0x08, + RSL_IPAC_EIE_NCELL_LIST = 0x09, + RSL_IPAC_EIE_PC_THRESH_COMP = 0x0a, + RSL_IPAC_EIE_HO_THRESH_COMP = 0x0b, + RSL_IPAC_EIE_HO_CAUSE = 0x0c, + RSL_IPAC_EIE_HO_CANDIDATES = 0x0d, + RSL_IPAC_EIE_NCELL_BA_CHG_LIST = 0x0e, + RSL_IPAC_EIE_NUM_OF_MS = 0x10, + RSL_IPAC_EIE_HO_CAND_EXT = 0x11, + RSL_IPAC_EIE_NCELL_DEF_EXT = 0x12, + RSL_IPAC_EIE_NCELL_LIST_EXT = 0x13, + RSL_IPAC_EIE_MASTER_KEY = 0x14, + RSL_IPAC_EIE_MASTER_SALT = 0x15, +}; + /*! @} */ diff --git a/include/osmocom/gsm/rsl.h b/include/osmocom/gsm/rsl.h index 753dd191..418e3f03 100644 --- a/include/osmocom/gsm/rsl.h +++ b/include/osmocom/gsm/rsl.h @@ -21,6 +21,12 @@ extern const struct tlv_definition rsl_att_tlvdef; #define rsl_tlv_parse(dec, buf, len) \ tlv_parse(dec, &rsl_att_tlvdef, buf, len, 0, 0) +extern const struct tlv_definition rsl_ipac_eie_tlvdef; + +/*! \brief Parse RSL IPAC EIE TLV structure using \ref tlv_parse */ +#define rsl_ipac_eie_tlv_parse(dec, buf, len) \ + tlv_parse(dec, &rsl_ipac_eie_tlvdef, buf, len, 0, 0) + /* encode channel number as per Section 9.3.1 */ uint8_t rsl_enc_chan_nr(uint8_t type, uint8_t subch, uint8_t timeslot); /* decode channel number as per Section 9.3.1 */ diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 0c0d9f77..917a77d2 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -219,6 +219,7 @@ osmo_sitype2rsl; rr_cause_name; rsl_att_tlvdef; +rsl_ipac_eie_tlvdef; rsl_ccch_conf_to_bs_cc_chans; rsl_ccch_conf_to_bs_ccch_sdcch_comb; rsl_chan_nr_str; diff --git a/src/gsm/rsl.c b/src/gsm/rsl.c index e27f84a5..de2e9d76 100644 --- a/src/gsm/rsl.c +++ b/src/gsm/rsl.c @@ -504,4 +504,30 @@ struct msgb *rsl_rll_simple(uint8_t msg_type, uint8_t chan_nr, return msg; } +const struct tlv_definition rsl_ipac_eie_tlvdef = { + .def = { + [RSL_IPAC_EIE_RXLEV] = { TLV_TYPE_TV }, + [RSL_IPAC_EIE_RXQUAL] = { TLV_TYPE_TV }, + [RSL_IPAC_EIE_FREQ_ERR] = { TLV_TYPE_FIXED, 2 }, + [RSL_IPAC_EIE_TIMING_ERR] = { TLV_TYPE_TV }, + [RSL_IPAC_EIE_MEAS_AVG_CFG] = { TLV_TYPE_TLV }, + [RSL_IPAC_EIE_BS_PWR_CTL] = { TLV_TYPE_FIXED, 3 }, + [RSL_IPAC_EIE_MS_PWR_CTL] = { TLV_TYPE_FIXED, 3 }, + [RSL_IPAC_EIE_HANDO_THRESH] = { TLV_TYPE_FIXED, 6 }, + [RSL_IPAC_EIE_NCELL_DEFAULTS] = { TLV_TYPE_FIXED, 3 }, + [RSL_IPAC_EIE_NCELL_LIST] = { TLV_TYPE_TLV }, + [RSL_IPAC_EIE_PC_THRESH_COMP] = { TLV_TYPE_FIXED, 10 }, + [RSL_IPAC_EIE_HO_THRESH_COMP] = { TLV_TYPE_FIXED, 10 }, + [RSL_IPAC_EIE_HO_CAUSE] = { TLV_TYPE_TLV }, + [RSL_IPAC_EIE_HO_CANDIDATES] = { TLV_TYPE_TLV }, + [RSL_IPAC_EIE_NCELL_BA_CHG_LIST]= { TLV_TYPE_TLV }, + [RSL_IPAC_EIE_NUM_OF_MS] = { TLV_TYPE_TV }, + [RSL_IPAC_EIE_HO_CAND_EXT] = { TLV_TYPE_TLV }, + [RSL_IPAC_EIE_NCELL_DEF_EXT] = { TLV_TYPE_TLV }, + [RSL_IPAC_EIE_NCELL_LIST_EXT] = { TLV_TYPE_TLV }, + [RSL_IPAC_EIE_MASTER_KEY] = { TLV_TYPE_TLV }, + [RSL_IPAC_EIE_MASTER_SALT] = { TLV_TYPE_TLV }, + }, +}; + /*! @} */ |