summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-someip.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--epan/dissectors/packet-someip.c34
1 files changed, 22 insertions, 12 deletions
diff --git a/epan/dissectors/packet-someip.c b/epan/dissectors/packet-someip.c
index 97cc36cc..b6cc40eb 100644
--- a/epan/dissectors/packet-someip.c
+++ b/epan/dissectors/packet-someip.c
@@ -2962,6 +2962,7 @@ dissect_someip_payload_string(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
}
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_someip_payload_struct(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint offset_orig, guint32 id, gchar *name, gint wtlv_offset) {
someip_payload_parameter_struct_t *config = NULL;
@@ -3021,6 +3022,7 @@ dissect_someip_payload_struct(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
}
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_someip_payload_typedef(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint offset, guint32 id, gchar *name _U_, int *hf_id, gint wtlv_offset) {
someip_payload_parameter_typedef_t *config = NULL;
@@ -3075,6 +3077,7 @@ dissect_someip_payload_array_dim_length(tvbuff_t *tvb, packet_info *pinfo, proto
/* returns bytes parsed, length needs to be gint to encode "non-existing" as -1 */
static gint
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_someip_payload_array_payload(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint offset_orig, gint length, gint lower_limit, gint upper_limit,
someip_parameter_array_t *config) {
tvbuff_t *subtvb = NULL;
@@ -3123,6 +3126,7 @@ dissect_someip_payload_array_payload(tvbuff_t *tvb, packet_info *pinfo, proto_tr
}
static gint
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_someip_payload_array_dim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint offset_orig, gint length, gint lower_limit, gint upper_limit, someip_parameter_array_t *config, guint current_dim, gchar *name, guint32 length_of_length) {
proto_item *ti = NULL;
proto_tree *subtree = NULL;
@@ -3171,6 +3175,7 @@ dissect_someip_payload_array_dim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
}
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_someip_payload_array(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint offset_orig, guint32 id, gchar *name, gint wtlv_offset) {
someip_parameter_array_t *config = NULL;
@@ -3222,6 +3227,7 @@ dissect_someip_payload_array(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
}
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_someip_payload_union(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint offset_orig, guint32 id, gchar *name, gint wtlv_offset) {
someip_parameter_union_t *config = NULL;
someip_parameter_union_item_t *item = NULL;
@@ -3301,9 +3307,11 @@ dissect_someip_payload_union(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
}
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_someip_payload_parameter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint offset, guint8 data_type, guint32 idref, gchar *name, int *hf_id_ptr, gint wtlv_offset) {
gint bytes_parsed = 0;
+ increment_dissection_depth(pinfo);
switch (data_type) {
case SOMEIP_PAYLOAD_PARAMETER_DATA_TYPE_TYPEDEF:
bytes_parsed = dissect_someip_payload_typedef(tvb, pinfo, tree, offset, idref, name, hf_id_ptr, wtlv_offset);
@@ -3331,6 +3339,7 @@ dissect_someip_payload_parameter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
col_append_str(pinfo->cinfo, COL_INFO, " [SOME/IP: Payload Config Error]");
break;
}
+ decrement_dissection_depth(pinfo);
return bytes_parsed;
}
@@ -3412,6 +3421,7 @@ static int dissect_someip_payload_peek_length_of_length(proto_tree *tree, packet
}
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_someip_payload_parameters(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint offset, someip_payload_parameter_item_t *items, guint32 num_of_items, gboolean wtlv) {
someip_payload_parameter_item_t *item;
@@ -3513,17 +3523,6 @@ dissect_someip_payload(tvbuff_t* tvb, packet_info* pinfo, proto_item *ti, guint1
proto_tree *tree = NULL;
- /* TAP */
- if (have_tap_listener(tap_someip_messages)) {
- someip_messages_tap_t *data = wmem_alloc(pinfo->pool, sizeof(someip_messages_tap_t));
- data->service_id = serviceid;
- data->method_id = methodid;
- data->interface_version = version;
- data->message_type = msgtype;
-
- tap_queue_packet(tap_someip_messages, pinfo, data);
- }
-
length = tvb_captured_length_remaining(tvb, 0);
tree = proto_item_add_subtree(ti, ett_someip_payload);
paramlist = get_parameter_config(serviceid, methodid, version, msgtype);
@@ -3738,7 +3737,18 @@ dissect_someip_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
subtvb = tvb_new_subset_length(tvb, SOMEIP_HDR_LEN, someip_payload_length);
}
- if (subtvb!=NULL) {
+ if (subtvb != NULL) {
+ /* TAP */
+ if (have_tap_listener(tap_someip_messages)) {
+ someip_messages_tap_t *stats_data = wmem_alloc(pinfo->pool, sizeof(someip_messages_tap_t));
+ stats_data->service_id = (guint16)someip_serviceid;
+ stats_data->method_id = (guint16)someip_methodid;
+ stats_data->interface_version = (guint8)version;
+ stats_data->message_type = (guint8)(~SOMEIP_MSGTYPE_TP_MASK) & msgtype;
+
+ tap_queue_packet(tap_someip_messages, pinfo, stats_data);
+ }
+
tvb_length = tvb_captured_length_remaining(subtvb, 0);
if (tvb_length > 0) {
tmp = dissector_try_uint_new(someip_dissector_table, someip_messageid, subtvb, pinfo, tree, FALSE, &someip_data);