summaryrefslogtreecommitdiffstats
path: root/plugins/epan/gryphon/packet-gryphon.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/epan/gryphon/packet-gryphon.c')
-rw-r--r--plugins/epan/gryphon/packet-gryphon.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/plugins/epan/gryphon/packet-gryphon.c b/plugins/epan/gryphon/packet-gryphon.c
index 6df68a3..08da00f 100644
--- a/plugins/epan/gryphon/packet-gryphon.c
+++ b/plugins/epan/gryphon/packet-gryphon.c
@@ -1118,6 +1118,7 @@ decode_event(tvbuff_t *tvb, int offset, proto_tree *pt)
}
static int
+// NOLINTNEXTLINE(misc-no-recursion)
decode_misc (tvbuff_t *tvb, int offset, packet_info* pinfo, proto_tree *pt)
{
tvbuff_t *next_tvb;
@@ -2715,6 +2716,7 @@ resp_restore_session(tvbuff_t *tvb, int offset, proto_tree *pt)
}
static int
+// NOLINTNEXTLINE(misc-no-recursion)
cmd_addresp(tvbuff_t *tvb, int offset, packet_info* pinfo, proto_tree *pt)
{
proto_item *item;
@@ -3700,6 +3702,7 @@ get_conversation_data(packet_info* pinfo)
}
static int
+// NOLINTNEXTLINE(misc-no-recursion)
decode_command(tvbuff_t *tvb, packet_info* pinfo, int msglen, int offset, int dst, proto_tree *pt)
{
guint32 cmd;
@@ -3751,6 +3754,7 @@ decode_command(tvbuff_t *tvb, packet_info* pinfo, int msglen, int offset, int ds
ft = proto_tree_add_subtree_format(pt, tvb, offset, msglen, ett_gryphon_command_data, NULL,
"Data: (%d byte%s)", msglen, plurality(msglen, "", "s"));
+ increment_dissection_depth(pinfo);
switch (cmd)
{
case CMD_INIT:
@@ -3958,12 +3962,14 @@ decode_command(tvbuff_t *tvb, packet_info* pinfo, int msglen, int offset, int ds
offset += msglen;
break;
}
+ decrement_dissection_depth(pinfo);
}
return offset;
}
static int
+// NOLINTNEXTLINE(misc-no-recursion)
decode_response(tvbuff_t *tvb, packet_info* pinfo, int offset, int src, proto_tree *pt)
{
int msglen;
@@ -4042,6 +4048,7 @@ decode_response(tvbuff_t *tvb, packet_info* pinfo, int offset, int src, proto_tr
ft = proto_tree_add_subtree_format(pt, tvb, offset, msglen, ett_gryphon_response_data, NULL,
"Data: (%d byte%s)", msglen, plurality(msglen, "", "s"));
+ increment_dissection_depth(pinfo);
switch (cmd)
{
case CMD_GET_CONFIG:
@@ -4191,6 +4198,7 @@ decode_response(tvbuff_t *tvb, packet_info* pinfo, int offset, int src, proto_tr
proto_tree_add_item(ft, hf_gryphon_data, tvb, offset, msglen, ENC_NA);
offset += msglen;
}
+ decrement_dissection_depth(pinfo);
}
return offset;
@@ -4202,6 +4210,7 @@ decode_response(tvbuff_t *tvb, packet_info* pinfo, int offset, int src, proto_tr
* So, this function will decode a packet and return the offset.
*/
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_gryphon_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean is_msgresp_add)
{
proto_tree *gryphon_tree;
@@ -4273,6 +4282,7 @@ dissect_gryphon_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gbo
body_tree = proto_tree_add_subtree(gryphon_tree, tvb, offset, msglen, ett_gryphon_body, NULL, "Body");
+ increment_dissection_depth(pinfo);
switch (frmtyp) {
case GY_FT_CMD:
offset = decode_command(tvb, pinfo, msglen, offset, dest, body_tree);
@@ -4299,6 +4309,7 @@ dissect_gryphon_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gbo
proto_tree_add_item(body_tree, hf_gryphon_data, tvb, offset, msglen, ENC_NA);
break;
}
+ decrement_dissection_depth(pinfo);
/*debug*/
/*i = msgend - offset;*/