diff options
author | Bert van Leeuwen <bert.vanleeuwen@gmail.com> | 2020-04-24 11:25:01 +0200 |
---|---|---|
committer | Jaap Keuter <jaap.keuter@xs4all.nl> | 2020-04-25 18:10:46 +0000 |
commit | 5a854b882fd90f97e20539568e8277f12a98c342 (patch) | |
tree | 2588843bb80c08ea2349f30efa060594863ebdb7 /epan/dissectors/packet-dis.c | |
parent | d2824f4820f662ccddea08455ea903de69a87072 (diff) |
DIS: dissector fix for Articulated Part VP records.
The IEEE 1278.1-2012 spec for DIS (Distributed Interactive Simulation)
specifies the format of Articulated Part VP record as:
8bits Record Type enum
8bits Change Indicator unsigned integer
16bits ID unsigned integer
32bits Parameter Type enum
32bits Parameter Value floating point
32bits Padding unused
(Section 6.2.94.2)
The dissector was interpreting the last 64bits as one value, this patch
fixes it to interpret it as 32bit float and 32bit padding.
Change-Id: Id509715f02daeecf12e3094fc1ed63e81705852b
Reviewed-on: https://code.wireshark.org/review/36922
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Diffstat (limited to 'epan/dissectors/packet-dis.c')
-rw-r--r-- | epan/dissectors/packet-dis.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/epan/dissectors/packet-dis.c b/epan/dissectors/packet-dis.c index a8342b9a0a..a2522b5214 100644 --- a/epan/dissectors/packet-dis.c +++ b/epan/dissectors/packet-dis.c @@ -4587,6 +4587,7 @@ static int hf_dis_vp_part_attached_to_id = -1; static int hf_dis_vp_artic_param_type = -1; static int hf_dis_vp_change = -1; static int hf_dis_vp_parameter_value = -1; +static int hf_dis_vp_padding = -1; static int hf_dis_vr_exercise_id = -1; static int hf_dis_vr_exercise_file_path = -1; static int hf_dis_vr_exercise_file_name = -1; @@ -5326,8 +5327,11 @@ static gint dissect_DIS_FIELDS_VP_ARTICULATED_PART(tvbuff_t *tvb, proto_tree *tr proto_tree_add_item(tree, hf_dis_vp_artic_param_type, tvb, offset, 4, ENC_BIG_ENDIAN); offset += 4; - proto_tree_add_item(tree, hf_dis_vp_parameter_value, tvb, offset, 8, ENC_BIG_ENDIAN); - offset += 8; + proto_tree_add_item(tree, hf_dis_vp_parameter_value, tvb, offset, 4, ENC_BIG_ENDIAN); + offset += 4; + + proto_tree_add_item(tree, hf_dis_vp_padding, tvb, offset, 4, ENC_BIG_ENDIAN); + offset += 4; return offset; } @@ -10191,7 +10195,12 @@ void proto_register_dis(void) }, { &hf_dis_vp_parameter_value, { "Parameter Value", "dis.vp.parameter_value", - FT_UINT64, BASE_DEC, NULL, 0x0, + FT_FLOAT, BASE_NONE, NULL, 0x0, + NULL, HFILL } + }, + { &hf_dis_vp_padding, + { "Padding (unused)", "dis.vp.padding", + FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_dis_vr_num_records, |