summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-sctp.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--epan/dissectors/packet-sctp.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/epan/dissectors/packet-sctp.c b/epan/dissectors/packet-sctp.c
index f9f72a13..76348743 100644
--- a/epan/dissectors/packet-sctp.c
+++ b/epan/dissectors/packet-sctp.c
@@ -1404,6 +1404,7 @@ dissect_state_cookie_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tr
}
static void
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_unrecognized_parameters_parameter(tvbuff_t *parameter_tvb, packet_info *pinfo, proto_tree *parameter_tree)
{
/* FIXME: Does it contain one or more parameters? */
@@ -1717,6 +1718,7 @@ dissect_forward_tsn_supported_parameter(tvbuff_t *parameter_tvb _U_)
#define ADDRESS_PARAMETER_OFFSET (CORRELATION_ID_OFFSET + CORRELATION_ID_LENGTH)
static void
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_add_ip_address_parameter(tvbuff_t *parameter_tvb, packet_info *pinfo, proto_tree *parameter_tree, proto_item *parameter_item)
{
guint16 address_length;
@@ -1734,6 +1736,7 @@ dissect_add_ip_address_parameter(tvbuff_t *parameter_tvb, packet_info *pinfo, pr
}
static void
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_del_ip_address_parameter(tvbuff_t *parameter_tvb, packet_info *pinfo, proto_tree *parameter_tree, proto_item *parameter_item)
{
guint16 address_length;
@@ -1753,6 +1756,7 @@ dissect_del_ip_address_parameter(tvbuff_t *parameter_tvb, packet_info *pinfo, pr
#define ERROR_CAUSE_IND_CASUES_OFFSET (CORRELATION_ID_OFFSET + CORRELATION_ID_LENGTH)
static void
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_error_cause_indication_parameter(tvbuff_t *parameter_tvb, packet_info *pinfo, proto_tree *parameter_tree)
{
guint16 causes_length;
@@ -1767,6 +1771,7 @@ dissect_error_cause_indication_parameter(tvbuff_t *parameter_tvb, packet_info *p
}
static void
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_set_primary_address_parameter(tvbuff_t *parameter_tvb, packet_info *pinfo, proto_tree *parameter_tree, proto_item *parameter_item)
{
guint16 address_length;
@@ -1886,6 +1891,7 @@ static const true_false_string sctp_parameter_bit_2_value = {
};
static void
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_parameter(tvbuff_t *parameter_tvb, packet_info *pinfo,
proto_tree *chunk_tree, proto_item *additional_item,
gboolean dissecting_init_init_ack_chunk,
@@ -1928,6 +1934,7 @@ dissect_parameter(tvbuff_t *parameter_tvb, packet_info *pinfo,
parameter_tree = NULL;
}
+ increment_dissection_depth(pinfo);
switch(type) {
case HEARTBEAT_INFO_PARAMETER_ID:
dissect_heartbeat_info_parameter(parameter_tvb, parameter_tree, parameter_item);
@@ -2014,6 +2021,7 @@ dissect_parameter(tvbuff_t *parameter_tvb, packet_info *pinfo,
dissect_unknown_parameter(parameter_tvb, parameter_tree, parameter_item);
break;
}
+ decrement_dissection_depth(pinfo);
if (padding_length > 0) {
proto_tree_add_item(parameter_tree, hf_parameter_padding, parameter_tvb, PARAMETER_HEADER_OFFSET + length, padding_length, ENC_NA);
@@ -2021,6 +2029,7 @@ dissect_parameter(tvbuff_t *parameter_tvb, packet_info *pinfo,
}
static void
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_parameters(tvbuff_t *parameters_tvb, packet_info *pinfo, proto_tree *tree, proto_item *additional_item, gboolean dissecting_init_init_ack_chunk)
{
gint offset, length, total_length, remaining_length;
@@ -2122,6 +2131,7 @@ dissect_out_of_resource_cause(tvbuff_t *cause_tvb _U_)
}
static void
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_unresolvable_address_cause(tvbuff_t *cause_tvb, packet_info *pinfo, proto_tree *cause_tree, proto_item *cause_item)
{
guint16 parameter_length;
@@ -2138,6 +2148,7 @@ static gboolean
dissect_sctp_chunk(tvbuff_t *chunk_tvb, packet_info *pinfo, proto_tree *tree, proto_tree *sctp_tree, sctp_half_assoc_t *assoc, gboolean useinfo);
static void
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_unrecognized_chunk_type_cause(tvbuff_t *cause_tvb, packet_info *pinfo, proto_tree *cause_tree, proto_item *cause_item)
{
guint16 chunk_length;
@@ -2159,6 +2170,7 @@ dissect_invalid_mandatory_parameter_cause(tvbuff_t *cause_tvb _U_)
}
static void
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_unrecognized_parameters_cause(tvbuff_t *cause_tvb, packet_info *pinfo, proto_tree *cause_tree)
{
guint16 cause_info_length;
@@ -2188,6 +2200,7 @@ dissect_cookie_received_while_shutting_down_cause(tvbuff_t *cause_tvb _U_)
}
static void
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_restart_with_new_address_cause(tvbuff_t *cause_tvb, packet_info *pinfo, proto_tree *cause_tree, proto_item *cause_item)
{
guint16 cause_info_length;
@@ -2223,6 +2236,7 @@ dissect_protocol_violation_cause(tvbuff_t *cause_tvb, proto_tree *cause_tree)
}
static void
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_delete_last_address_cause(tvbuff_t *cause_tvb, packet_info *pinfo, proto_tree *cause_tree, proto_item *cause_item)
{
guint16 cause_info_length;
@@ -2238,6 +2252,7 @@ dissect_delete_last_address_cause(tvbuff_t *cause_tvb, packet_info *pinfo, proto
}
static void
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_resource_outage_cause(tvbuff_t *cause_tvb, packet_info *pinfo, proto_tree *cause_tree)
{
guint16 cause_info_length;
@@ -2251,6 +2266,7 @@ dissect_resource_outage_cause(tvbuff_t *cause_tvb, packet_info *pinfo, proto_tre
}
static void
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_delete_source_address_cause(tvbuff_t *cause_tvb, packet_info *pinfo, proto_tree *cause_tree, proto_item *cause_item)
{
guint16 cause_info_length;
@@ -2266,6 +2282,7 @@ dissect_delete_source_address_cause(tvbuff_t *cause_tvb, packet_info *pinfo, pro
}
static void
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_request_refused_cause(tvbuff_t *cause_tvb, packet_info *pinfo, proto_tree *cause_tree)
{
guint16 cause_info_length;
@@ -2339,6 +2356,7 @@ static const value_string cause_code_values[] = {
static void
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_error_cause(tvbuff_t *cause_tvb, packet_info *pinfo, proto_tree *chunk_tree)
{
guint16 code, length, padding_length;
@@ -2356,6 +2374,7 @@ dissect_error_cause(tvbuff_t *cause_tvb, packet_info *pinfo, proto_tree *chunk_t
proto_tree_add_item(cause_tree, hf_cause_length, cause_tvb, CAUSE_LENGTH_OFFSET, CAUSE_LENGTH_LENGTH, ENC_BIG_ENDIAN);
/* XXX - add expert info if length is bogus? */
+ increment_dissection_depth(pinfo);
switch(code) {
case INVALID_STREAM_IDENTIFIER:
dissect_invalid_stream_identifier_cause(cause_tvb, cause_tree, cause_item);
@@ -2415,12 +2434,14 @@ dissect_error_cause(tvbuff_t *cause_tvb, packet_info *pinfo, proto_tree *chunk_t
dissect_unknown_cause(cause_tvb, cause_tree, cause_item);
break;
}
+ decrement_dissection_depth(pinfo);
if (padding_length > 0)
proto_tree_add_item(cause_tree, hf_cause_padding, cause_tvb, CAUSE_HEADER_OFFSET + length, padding_length, ENC_NA);
}
static void
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_error_causes(tvbuff_t *causes_tvb, packet_info *pinfo, proto_tree *tree)
{
gint offset, length, total_length, remaining_length;
@@ -3587,6 +3608,7 @@ dissect_data_chunk(tvbuff_t *chunk_tvb,
INIT_CHUNK_INITIAL_TSN_LENGTH )
static void
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_init_chunk(tvbuff_t *chunk_tvb, guint16 chunk_length, packet_info *pinfo, proto_tree *chunk_tree, proto_item *chunk_item)
{
tvbuff_t *parameters_tvb;
@@ -3621,6 +3643,7 @@ dissect_init_chunk(tvbuff_t *chunk_tvb, guint16 chunk_length, packet_info *pinfo
}
static void
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_init_ack_chunk(tvbuff_t *chunk_tvb, guint16 chunk_length, packet_info *pinfo, proto_tree *chunk_tree, proto_item *chunk_item)
{
tvbuff_t *parameters_tvb;
@@ -3998,6 +4021,7 @@ dissect_nr_sack_chunk(packet_info *pinfo, tvbuff_t *chunk_tvb, proto_tree *chunk
#define HEARTBEAT_CHUNK_INFO_OFFSET CHUNK_VALUE_OFFSET
static void
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_heartbeat_chunk(tvbuff_t *chunk_tvb, guint16 chunk_length, packet_info *pinfo, proto_tree *chunk_tree, proto_item *chunk_item)
{
tvbuff_t *parameter_tvb;
@@ -4015,6 +4039,7 @@ dissect_heartbeat_chunk(tvbuff_t *chunk_tvb, guint16 chunk_length, packet_info *
#define HEARTBEAT_ACK_CHUNK_INFO_OFFSET CHUNK_VALUE_OFFSET
static void
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_heartbeat_ack_chunk(tvbuff_t *chunk_tvb, guint16 chunk_length, packet_info *pinfo, proto_tree *chunk_tree, proto_item *chunk_item)
{
tvbuff_t *parameter_tvb;
@@ -4033,6 +4058,7 @@ dissect_heartbeat_ack_chunk(tvbuff_t *chunk_tvb, guint16 chunk_length, packet_in
#define SCTP_ABORT_CHUNK_T_BIT 0x01
static void
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_abort_chunk(tvbuff_t *chunk_tvb, guint16 chunk_length, packet_info *pinfo, proto_tree *chunk_tree, proto_item *flags_item)
{
tvbuff_t *causes_tvb;
@@ -4071,6 +4097,7 @@ dissect_shutdown_ack_chunk(tvbuff_t *chunk_tvb _U_)
#define ERROR_CAUSE_IND_CAUSES_OFFSET CHUNK_VALUE_OFFSET
static void
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_error_chunk(tvbuff_t *chunk_tvb, guint16 chunk_length, packet_info *pinfo, proto_tree *chunk_tree)
{
tvbuff_t *causes_tvb;
@@ -4231,6 +4258,7 @@ dissect_i_forward_tsn_chunk(tvbuff_t *chunk_tvb, guint16 chunk_length, proto_tre
#define RE_CONFIG_PARAMETERS_OFFSET CHUNK_HEADER_LENGTH
static void
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_re_config_chunk(tvbuff_t *chunk_tvb, guint16 chunk_length, packet_info *pinfo, proto_tree *chunk_tree, proto_item *chunk_item _U_)
{
tvbuff_t *parameters_tvb;
@@ -4264,6 +4292,7 @@ dissect_auth_chunk(tvbuff_t *chunk_tvb, guint16 chunk_length, proto_tree *chunk_
#define ASCONF_CHUNK_PARAMETERS_OFFSET (SEQUENCE_NUMBER_OFFSET + SCTP_SEQUENCE_NUMBER_LENGTH)
static void
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_asconf_chunk(tvbuff_t *chunk_tvb, guint16 chunk_length, packet_info *pinfo, proto_tree *chunk_tree, proto_item *chunk_item)
{
tvbuff_t *parameters_tvb;
@@ -4287,6 +4316,7 @@ dissect_asconf_chunk(tvbuff_t *chunk_tvb, guint16 chunk_length, packet_info *pin
#define ASCONF_ACK_CHUNK_PARAMETERS_OFFSET (SEQUENCE_NUMBER_OFFSET + SCTP_SEQUENCE_NUMBER_LENGTH)
static void
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_asconf_ack_chunk(tvbuff_t *chunk_tvb, guint16 chunk_length, packet_info *pinfo, proto_tree *chunk_tree, proto_item *chunk_item)
{
tvbuff_t *parameters_tvb;
@@ -4344,6 +4374,7 @@ static const true_false_string sctp_pktdropk_t_bit_value = {
};
static void
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_pktdrop_chunk(tvbuff_t *chunk_tvb, guint16 chunk_length, packet_info *pinfo, proto_tree *chunk_tree, proto_item *chunk_item, proto_item *flags_item)
{
tvbuff_t *data_field_tvb;
@@ -4427,6 +4458,7 @@ static const true_false_string sctp_chunk_bit_2_value = {
static gboolean
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_sctp_chunk(tvbuff_t *chunk_tvb,
packet_info *pinfo,
proto_tree *tree,
@@ -4492,6 +4524,7 @@ dissect_sctp_chunk(tvbuff_t *chunk_tvb,
*/
/* now dissect the chunk value */
+ increment_dissection_depth(pinfo);
switch(type) {
case SCTP_DATA_CHUNK_ID:
result = dissect_data_chunk(chunk_tvb, length, pinfo, tree, chunk_tree, chunk_item, flags_item, ha, FALSE);
@@ -4574,6 +4607,7 @@ dissect_sctp_chunk(tvbuff_t *chunk_tvb,
dissect_unknown_chunk(chunk_tvb, length, type, chunk_tree, chunk_item);
break;
}
+ decrement_dissection_depth(pinfo);
if (padding_length > 0)
proto_tree_add_item(chunk_tree, hf_chunk_padding, chunk_tvb, CHUNK_HEADER_OFFSET + length, padding_length, ENC_NA);
@@ -4585,6 +4619,7 @@ dissect_sctp_chunk(tvbuff_t *chunk_tvb,
}
static void
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_sctp_chunks(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *sctp_item, proto_tree *sctp_tree, sctp_half_assoc_t *ha, gboolean encapsulated)
{
tvbuff_t *chunk_tvb;
@@ -4679,6 +4714,7 @@ dissect_sctp_chunks(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_i
}
static void
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_sctp_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean encapsulated)
{
guint32 checksum = 0, calculated_crc32c = 0, calculated_adler32 = 0;