aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dis.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-01-07 16:50:23 -0800
committerGuy Harris <guy@alum.mit.edu>2015-01-08 00:50:56 +0000
commit6edb27b58ed2eccf3a04d31dc5a614bcc9a78144 (patch)
tree435e74cbec29c335df0475386e20c8388672bb15 /epan/dissectors/packet-dis.c
parent8f1b82b0aab8184807c46164cbdb1af514f832bb (diff)
FT_DOUBLEs are 8 bytes; use FT_FLOAT for 4-byte floating-point values.
Change-Id: Ia39f8604229df18e1cdbbf81b78cd423e70f0f3c Reviewed-on: https://code.wireshark.org/review/6386 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-dis.c')
-rw-r--r--epan/dissectors/packet-dis.c42
1 files changed, 30 insertions, 12 deletions
diff --git a/epan/dissectors/packet-dis.c b/epan/dissectors/packet-dis.c
index af61679ba2..6b3de26a18 100644
--- a/epan/dissectors/packet-dis.c
+++ b/epan/dissectors/packet-dis.c
@@ -3543,9 +3543,12 @@ static int hf_dis_force_id = -1;
static int hf_dis_entity_linear_velocity_x = -1;
static int hf_dis_entity_linear_velocity_y = -1;
static int hf_dis_entity_linear_velocity_z = -1;
-static int hf_dis_entity_location_x = -1;
-static int hf_dis_entity_location_y = -1;
-static int hf_dis_entity_location_z = -1;
+static int hf_dis_entity_location_x_double = -1;
+static int hf_dis_entity_location_x_float = -1;
+static int hf_dis_entity_location_y_double = -1;
+static int hf_dis_entity_location_y_float = -1;
+static int hf_dis_entity_location_z_double = -1;
+static int hf_dis_entity_location_z_float = -1;
static int hf_dis_entity_orientation_psi = -1;
static int hf_dis_entity_orientation_theta = -1;
static int hf_dis_entity_orientation_phi = -1;
@@ -4518,11 +4521,11 @@ static int dissect_DIS_PARSER_ENTITY_STATE_PDU(tvbuff_t *tvb, packet_info *pinfo
offset += 4;
sub_tree = proto_tree_add_subtree(tree, tvb, offset, 24, ett_entity_location, NULL, "Entity Location");
- proto_tree_add_item(sub_tree, hf_dis_entity_location_x, tvb, offset, 8, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sub_tree, hf_dis_entity_location_x_double, tvb, offset, 8, ENC_BIG_ENDIAN);
offset += 8;
- proto_tree_add_item(sub_tree, hf_dis_entity_location_y, tvb, offset, 8, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sub_tree, hf_dis_entity_location_y_double, tvb, offset, 8, ENC_BIG_ENDIAN);
offset += 8;
- proto_tree_add_item(sub_tree, hf_dis_entity_location_z, tvb, offset, 8, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sub_tree, hf_dis_entity_location_z_double, tvb, offset, 8, ENC_BIG_ENDIAN);
offset += 8;
sub_tree = proto_tree_add_subtree(tree, tvb, offset, 12, ett_entity_orientation, NULL, "Entity Orientation");
@@ -5213,11 +5216,11 @@ static int dissect_DIS_PARSER_DETONATION_PDU(tvbuff_t *tvb, packet_info *pinfo _
sub_tree = proto_tree_add_subtree(tree, tvb, offset, 12, ett_linear_velocity, NULL, "Location in Entity Coordinates");
- proto_tree_add_item(sub_tree, hf_dis_entity_location_x, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sub_tree, hf_dis_entity_location_x_float, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
- proto_tree_add_item(sub_tree, hf_dis_entity_location_y, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sub_tree, hf_dis_entity_location_y_float, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
- proto_tree_add_item(sub_tree, hf_dis_entity_location_z, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(sub_tree, hf_dis_entity_location_z_float, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
proto_tree_add_item(tree, hf_dis_detonation_result, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -6923,21 +6926,36 @@ void proto_register_dis(void)
FT_FLOAT, BASE_NONE, NULL, 0x0,
NULL, HFILL}
},
- { &hf_dis_entity_location_x,
+ { &hf_dis_entity_location_x_double,
{"X", "dis.entity_location.x",
FT_DOUBLE, BASE_NONE, NULL, 0x0,
NULL, HFILL}
},
- { &hf_dis_entity_location_y,
+ { &hf_dis_entity_location_x_float,
+ {"X", "dis.entity_location.x",
+ FT_FLOAT, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}
+ },
+ { &hf_dis_entity_location_y_double,
{"Y", "dis.entity_location.y",
FT_DOUBLE, BASE_NONE, NULL, 0x0,
NULL, HFILL}
},
- { &hf_dis_entity_location_z,
+ { &hf_dis_entity_location_y_float,
+ {"Y", "dis.entity_location.y",
+ FT_FLOAT, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}
+ },
+ { &hf_dis_entity_location_z_double,
{"Z", "dis.entity_location.z",
FT_DOUBLE, BASE_NONE, NULL, 0x0,
NULL, HFILL}
},
+ { &hf_dis_entity_location_z_float,
+ {"Z", "dis.entity_location.z",
+ FT_FLOAT, BASE_NONE, NULL, 0x0,
+ NULL, HFILL}
+ },
{ &hf_dis_entity_orientation_psi,
{"Psi", "dis.entity_orientation.psi",
FT_FLOAT, BASE_NONE, NULL, 0x0,