diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2016-01-28 22:49:58 +0100 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2016-01-28 22:56:45 +0000 |
commit | 25ee6cb841d2dd432c4b30892e555806abe2d616 (patch) | |
tree | e887a4161c66bc7357c6c86611d424b14cad8515 /asn1/lcsap/lcsap.cnf | |
parent | 3c1d05d5a034c15abfd47f5b6f11de0270c4a434 (diff) | |
download | wireshark-25ee6cb841d2dd432c4b30892e555806abe2d616.tar.gz |
LCSAP: improve dissection
- add PLMN info in a subtree
- dissect Horizontal Accuracy
- dissect Vertical Accuracy
- dissect IMSI
Bug: 12054
Change-Id: Ic069d78f23fcf956e4aa5eb19f4d39af0f529757
Reviewed-on: https://code.wireshark.org/review/13585
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'asn1/lcsap/lcsap.cnf')
-rw-r--r-- | asn1/lcsap/lcsap.cnf | 36 |
1 files changed, 31 insertions, 5 deletions
diff --git a/asn1/lcsap/lcsap.cnf b/asn1/lcsap/lcsap.cnf index 5b6fb8636d..3f5f72d3dd 100644 --- a/asn1/lcsap/lcsap.cnf +++ b/asn1/lcsap/lcsap.cnf @@ -154,14 +154,16 @@ ProtocolIE-Field/value ie_field_value # 7.4.27 PLMN Identity #.FN_BODY PLMN-ID VAL_PTR = parameter_tvb tvbuff_t *parameter_tvb=NULL; + proto_tree *subtree; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, 3, 3, FALSE, ¶meter_tvb); - if(tvb_reported_length(tvb)==0) - return offset; + if(tvb_reported_length(tvb)==0) + return offset; - if (!parameter_tvb) - return offset; - dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, tree, 0, E212_NONE, TRUE); + if (!parameter_tvb) + return offset; + subtree = proto_item_add_subtree(actx->created_item, ett_lcsap_plmnd_id); + dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, subtree, 0, E212_NONE, TRUE); #.END #.FN_BODY Positioning-Method-And-Usage VAL_PTR = ¶meter_tvb @@ -214,6 +216,30 @@ ProtocolIE-Field/value ie_field_value proto_item_append_text(actx->created_item, " (%.5f degrees)", (((double)degrees/16777215) * 360)); +#.FN_BODY IMSI VAL_PTR=&imsi_tvb + tvbuff_t *imsi_tvb; +%(DEFAULT_BODY)s + if (imsi_tvb) { + proto_tree *subtree; + + subtree = proto_item_add_subtree(actx->created_item, ett_lcsap_imsi); + dissect_e212_imsi(imsi_tvb, actx->pinfo, subtree, 0, tvb_reported_length(imsi_tvb), FALSE); + } + +#.FN_BODY Horizontal-Accuracy VAL_PTR=&uncertainty_code + guint32 uncertainty_code; +%(DEFAULT_BODY)s + +#.FN_FTR Horizontal-Accuracy + proto_item_append_text(actx->created_item, " (%.1f m)", 10 * (pow(1.1, (double)uncertainty_code) - 1)); + +#.FN_BODY Vertical-Accuracy VAL_PTR=&vertical_uncertainty + guint32 vertical_uncertainty; +%(DEFAULT_BODY)s + +#.FN_FTR Vertical-Accuracy + proto_item_append_text(actx->created_item, " (%.1f m)", 45 * (pow(1.025, (double)vertical_uncertainty) - 1)); + #.TYPE_ATTR ProtocolExtensionID TYPE = FT_UINT8 DISPLAY = BASE_DEC STRINGS = VALS(lcsap_ProtocolIE_ID_vals) #.ASSIGN_VALUE_TO_TYPE # LCSAP does not have constants assigned to types, they are pure INTEGER |