aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/epan/gryphon/packet-gryphon.c
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2023-02-21 00:34:05 -0800
committerGuy Harris <gharris@sonic.net>2023-02-21 00:34:05 -0800
commita4b61bc0698874e1f924694a73a3f5b1770c6fef (patch)
tree4f63c048c673a5f257cc6873bf5a1015745945ee /plugins/epan/gryphon/packet-gryphon.c
parente5884912cd5b0d390a7405b75fa787a848bc5c27 (diff)
gryphon: fix handling the ioctl code in a response.
It's not in the response message, it's taken from the request message, so display it with a zero offset and length, so it doesn't match any bytes in the packet. It's a 32-bit field, so make it an FT_UINT32.
Diffstat (limited to 'plugins/epan/gryphon/packet-gryphon.c')
-rw-r--r--plugins/epan/gryphon/packet-gryphon.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/plugins/epan/gryphon/packet-gryphon.c b/plugins/epan/gryphon/packet-gryphon.c
index 86d035b7b6..b3c8e5493d 100644
--- a/plugins/epan/gryphon/packet-gryphon.c
+++ b/plugins/epan/gryphon/packet-gryphon.c
@@ -4003,11 +4003,16 @@ decode_response(tvbuff_t *tvb, packet_info* pinfo, int offset, int src, proto_tr
p_add_proto_data(wmem_file_scope(), pinfo, proto_gryphon, (guint32)tvb_raw_offset(tvb), pkt_info);
}
- /* this is the old original way of displaying */
+ /*
+ * This is the old original way of displaying.
+ *
+ * XXX - is there some reason not to display the context for ioctl
+ * commands, and to display the ioctl code here, rather than in
+ * the part of the tree for the ioctl response?
+ */
proto_tree_add_uint(pt, hf_gryphon_command, tvb, offset, 1, cmd);
if (pkt_info->ioctl_command != 0) {
- /* N.B. Shown in one byte, but ioctl_command is a 4-byte value */
- proto_tree_add_uint(pt, hf_gryphon_cmd_ioctl_context, tvb, offset + 1, 1, pkt_info->ioctl_command);
+ proto_tree_add_uint(pt, hf_gryphon_cmd_ioctl_context, tvb, 0, 0, pkt_info->ioctl_command);
} else {
proto_tree_add_item(pt, hf_gryphon_cmd_context, tvb, offset + 1, 1, ENC_NA);
}
@@ -4379,9 +4384,8 @@ proto_register_gryphon(void)
{ &hf_gryphon_cmd_context,
{ "Context", "gryphon.cmd.context", FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
- /* N.B. Shown in one byte, but ioctl_command is a 4-byte value */
{ &hf_gryphon_cmd_ioctl_context,
- { "IOCTL Response", "gryphon.cmd.ioctl_response", FT_UINT8, BASE_DEC, VALS(ioctls), 0x0,
+ { "IOCTL Response", "gryphon.cmd.ioctl_response", FT_UINT32, BASE_DEC, VALS(ioctls), 0x0,
NULL, HFILL }},
{ &hf_gryphon_data,
{ "Data", "gryphon.data", FT_BYTES, BASE_NONE, NULL, 0x0,