diff options
author | Martin Mathieson <martin.r.mathieson@googlemail.com> | 2014-09-08 13:55:23 +0100 |
---|---|---|
committer | Martin Mathieson <martin.r.mathieson@googlemail.com> | 2014-09-08 14:12:28 +0000 |
commit | 806981d15687fbcc3867519f149afd55ba7bffa2 (patch) | |
tree | a5084266f83d53de44b0703e7c522aa1834b5758 /asn1/lte-rrc | |
parent | c1bc1b6a83e17a79fc09cfdaac7cc5b60964379e (diff) |
Show band info for inter-freq entries in UE capabilities. Addresses Pascal's comments.
Change-Id: Ie60dc73e40a2ac1d80197fa712075ccff83cf797
Reviewed-on: https://code.wireshark.org/review/4032
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
Diffstat (limited to 'asn1/lte-rrc')
-rw-r--r-- | asn1/lte-rrc/lte-rrc.cnf | 37 | ||||
-rw-r--r-- | asn1/lte-rrc/packet-lte-rrc-template.c | 24 |
2 files changed, 61 insertions, 0 deletions
diff --git a/asn1/lte-rrc/lte-rrc.cnf b/asn1/lte-rrc/lte-rrc.cnf index 283b81f5f8..2510a29253 100644 --- a/asn1/lte-rrc/lte-rrc.cnf +++ b/asn1/lte-rrc/lte-rrc.cnf @@ -1601,3 +1601,40 @@ SoundingRS-UL-ConfigDedicated/setup/duration STRINGS=TFS(<e_rrc_duration_val) PROTO_ITEM_SET_GENERATED(ti); ti = proto_tree_add_uint(subtree, hf_lte_rrc_sr_config_subframe_offset, tvb, index_offset>>3, 1, subframe_offset); PROTO_ITEM_SET_GENERATED(ti); + + +#.FN_BODY FreqBandIndicator VAL_PTR=&value + guint32 value; +%(DEFAULT_BODY)s + set_freq_band_indicator(value, actx); + +#.FN_BODY FreqBandIndicator-v9e0 VAL_PTR=&value + guint32 value; +%(DEFAULT_BODY)s + set_freq_band_indicator(value, actx); + +#.FN_BODY FreqBandIndicator-r11 VAL_PTR=&value + guint32 value; +%(DEFAULT_BODY)s + set_freq_band_indicator(value, actx); + + +#.FN_BODY InterFreqBandInfo + meas_capabilities_item_band_mappings_t *mappings; + proto_item *it; +%(DEFAULT_BODY)s + mappings = private_data_meas_capabilities_item_band_mappings(actx); + if (mappings->number_of_interfreq_serving_read <= mappings->number_of_bands_set) { + guint16 serving_band = mappings->band_by_item[mappings->number_of_interfreq_serving_read]; + guint16 target_band = mappings->band_by_item[mappings->number_of_interfreq_target_read++]; + if (mappings->number_of_interfreq_target_read == mappings->number_of_bands_set) { + mappings->number_of_interfreq_target_read = 0; + mappings->number_of_interfreq_serving_read++; + } + + /* Add a generated item showing serving & target band for this entry */ + it = proto_tree_add_uint(tree, hf_lte_rrc_bandEUTRA, tvb, 0, 0, serving_band); + proto_item_append_text(it, " -> band %%u", target_band); + PROTO_ITEM_SET_GENERATED(it); + } + diff --git a/asn1/lte-rrc/packet-lte-rrc-template.c b/asn1/lte-rrc/packet-lte-rrc-template.c index 0d4ce1c1b3..08c7fd1723 100644 --- a/asn1/lte-rrc/packet-lte-rrc-template.c +++ b/asn1/lte-rrc/packet-lte-rrc-template.c @@ -1833,6 +1833,13 @@ static const true_false_string lte_rrc_interBandTDD_CA_WithDifferentConfig_bit2_ /* through this API, which ensures that they will not overwrite each other!! */ /*****************************************************************************/ +typedef struct meas_capabilities_item_band_mappings_t { + guint16 number_of_bands_set; + guint16 number_of_interfreq_serving_read; + guint16 number_of_interfreq_target_read; + guint16 band_by_item[256]; +} meas_capabilities_item_band_mappings_t; + /**********************************************************/ /* Struct to store all current uses of packet private data */ @@ -1846,6 +1853,7 @@ typedef struct lte_rrc_private_data_t drb_mapping_t drb_mapping; drx_config_t drx_config; pdcp_security_info_t pdcp_security; + meas_capabilities_item_band_mappings_t meas_capabilities_item_band_mappings; } lte_rrc_private_data_t; /* Helper function to get or create a struct that will be actx->private_data */ @@ -1956,6 +1964,22 @@ static pdcp_security_info_t* private_data_pdcp_security_algorithms(asn1_ctx_t *a } +/* Measurement UE capabilities item -> band mappings */ +static meas_capabilities_item_band_mappings_t* private_data_meas_capabilities_item_band_mappings(asn1_ctx_t *actx) +{ + lte_rrc_private_data_t *private_data = (lte_rrc_private_data_t*)lte_rrc_get_private_data(actx); + return &private_data->meas_capabilities_item_band_mappings; +} + +static set_freq_band_indicator(guint32 value, asn1_ctx_t *actx) +{ + /* Store band mapping for this item in the next position */ + meas_capabilities_item_band_mappings_t *mappings = private_data_meas_capabilities_item_band_mappings(actx); + if (mappings->number_of_bands_set < 256) { + mappings->band_by_item[mappings->number_of_bands_set++] = (guint16)value; + } +} + /*****************************************************************************/ |