* Fix name of Irene in AUTHORS.

* Add Varun Notibala to AUTHORS.
* Add support for NR-SACK and fix stability problems.

svn path=/trunk/; revision=28642
This commit is contained in:
Michael Tüxen 2009-06-05 13:33:18 +00:00
parent 63ec29238c
commit 2f5d2bb8a3
7 changed files with 858 additions and 255 deletions

View File

@ -2257,7 +2257,7 @@ Jeff Connelly <shellreef+mp2p [AT] gmail.com> {
MANOLITO support
}
Irene Rüngle <i.ruengeler [AT] fh-muenster.de {
Irene Rüngler <i.ruengeler [AT] fh-muenster.de {
SCTP analysis
Support PPID and SCTP port based selection in Decode as
}
@ -2870,6 +2870,10 @@ Alexis La Goutte <alexis.lagoutte [AT] gmail.com> {
CAPWAP dissector
}
Varun Notibala <nbvarun [AT] gmail.com {
SCTP NR-SACK support
}
and by:
Pavel Roskin <proski [AT] gnu.org>

View File

@ -24,6 +24,7 @@
*
* Reassembly added 2006 by Robin Seggelmann
* TSN Tracking by Luis E. G. Ontanon (Feb 2007)
* Copyright 2009, Varun Notibala <nbvarun [AT] gmail.com>
*
* $Id$
*
@ -123,6 +124,25 @@ static int hf_sack_chunk_gap_block_end_tsn = -1;
static int hf_sack_chunk_number_tsns_gap_acked = -1;
static int hf_sack_chunk_duplicate_tsn = -1;
static int hf_nr_sack_chunk_ns = -1;
static int hf_nr_sack_chunk_cumulative_tsn_ack = -1;
static int hf_nr_sack_chunk_adv_rec_window_credit = -1;
static int hf_nr_sack_chunk_number_of_gap_blocks = -1;
static int hf_nr_sack_chunk_number_of_nr_gap_blocks = -1;
static int hf_nr_sack_chunk_number_of_dup_tsns = -1;
static int hf_nr_sack_chunk_reserved = -1;
static int hf_nr_sack_chunk_gap_block_start = -1;
static int hf_nr_sack_chunk_gap_block_end = -1;
static int hf_nr_sack_chunk_gap_block_start_tsn = -1;
static int hf_nr_sack_chunk_gap_block_end_tsn = -1;
static int hf_nr_sack_chunk_number_tsns_gap_acked = -1;
static int hf_nr_sack_chunk_nr_gap_block_start = -1;
static int hf_nr_sack_chunk_nr_gap_block_end = -1;
static int hf_nr_sack_chunk_nr_gap_block_start_tsn = -1;
static int hf_nr_sack_chunk_nr_gap_block_end_tsn = -1;
static int hf_nr_sack_chunk_number_tsns_nr_gap_acked = -1;
static int hf_nr_sack_chunk_duplicate_tsn = -1;
static int hf_shutdown_chunk_cumulative_tsn_ack = -1;
static int hf_cookie = -1;
static int hf_cwr_chunk_lowest_tsn = -1;
@ -221,6 +241,7 @@ static gint ett_sctp_chunk_cause = -1;
static gint ett_sctp_chunk_type = -1;
static gint ett_sctp_data_chunk_flags = -1;
static gint ett_sctp_sack_chunk_flags = -1;
static gint ett_sctp_nr_sack_chunk_flags = -1;
static gint ett_sctp_abort_chunk_flags = -1;
static gint ett_sctp_shutdown_complete_chunk_flags = -1;
static gint ett_sctp_pktdrop_chunk_flags = -1;
@ -228,6 +249,12 @@ static gint ett_sctp_parameter_type= -1;
static gint ett_sctp_sack_chunk_gap_block = -1;
static gint ett_sctp_sack_chunk_gap_block_start = -1;
static gint ett_sctp_sack_chunk_gap_block_end = -1;
static gint ett_sctp_nr_sack_chunk_gap_block = -1;
static gint ett_sctp_nr_sack_chunk_gap_block_start = -1;
static gint ett_sctp_nr_sack_chunk_gap_block_end = -1;
static gint ett_sctp_nr_sack_chunk_nr_gap_block = -1;
static gint ett_sctp_nr_sack_chunk_nr_gap_block_start = -1;
static gint ett_sctp_nr_sack_chunk_nr_gap_block_end = -1;
static gint ett_sctp_unrecognized_parameter_parameter = -1;
static gint ett_sctp_fragments = -1;
@ -260,6 +287,7 @@ static gboolean enable_ulp_dissection = TRUE;
#define SCTP_CWR_CHUNK_ID 13
#define SCTP_SHUTDOWN_COMPLETE_CHUNK_ID 14
#define SCTP_AUTH_CHUNK_ID 15
#define SCTP_NR_SACK_CHUNK_ID 16
#define SCTP_ASCONF_ACK_CHUNK_ID 0x80
#define SCTP_PKTDROP_CHUNK_ID 0x81
#define SCTP_STREAM_RESET_CHUNK_ID 0x82
@ -285,6 +313,7 @@ static const value_string chunk_type_values[] = {
{ SCTP_SHUTDOWN_COMPLETE_CHUNK_ID, "SHUTDOWN_COMPLETE" },
{ SCTP_STREAM_RESET_CHUNK_ID, "STREAM_RESET" },
{ SCTP_AUTH_CHUNK_ID, "AUTH" },
{ SCTP_NR_SACK_CHUNK_ID, "NR-SACK" },
{ SCTP_FORWARD_TSN_CHUNK_ID, "FORWARD_TSN" },
{ SCTP_ASCONF_ACK_CHUNK_ID, "ASCONF_ACK" },
{ SCTP_PKTDROP_CHUNK_ID, "PKTDROP" },
@ -2949,6 +2978,179 @@ dissect_sack_chunk(packet_info* pinfo, tvbuff_t *chunk_tvb, proto_tree *chunk_tr
number_of_gap_blocks, number_of_dup_tsns);
}
/* NE: Dissect nr-sack chunk */
#define SCTP_NR_SACK_CHUNK_NS_BIT 0x01
#define NR_SACK_CHUNK_CUMULATIVE_TSN_ACK_LENGTH 4
#define NR_SACK_CHUNK_ADV_REC_WINDOW_CREDIT_LENGTH 4
#define NR_SACK_CHUNK_NUMBER_OF_GAP_BLOCKS_LENGTH 2
#define NR_SACK_CHUNK_NUMBER_OF_NR_GAP_BLOCKS_LENGTH 2
#define NR_SACK_CHUNK_NUMBER_OF_DUP_TSNS_LENGTH 2
#define NR_SACK_CHUNK_RESERVED_LENGTH 2
#define NR_SACK_CHUNK_GAP_BLOCK_LENGTH 4
#define NR_SACK_CHUNK_GAP_BLOCK_START_LENGTH 2
#define NR_SACK_CHUNK_GAP_BLOCK_END_LENGTH 2
#define NR_SACK_CHUNK_NR_GAP_BLOCK_LENGTH 4
#define NR_SACK_CHUNK_NR_GAP_BLOCK_START_LENGTH 2
#define NR_SACK_CHUNK_NR_GAP_BLOCK_END_LENGTH 2
#define NR_SACK_CHUNK_DUP_TSN_LENGTH 4
#define NR_SACK_CHUNK_CUMULATIVE_TSN_ACK_OFFSET (CHUNK_VALUE_OFFSET + 0)
#define NR_SACK_CHUNK_ADV_REC_WINDOW_CREDIT_OFFSET (NR_SACK_CHUNK_CUMULATIVE_TSN_ACK_OFFSET + \
NR_SACK_CHUNK_CUMULATIVE_TSN_ACK_LENGTH)
#define NR_SACK_CHUNK_NUMBER_OF_GAP_BLOCKS_OFFSET (NR_SACK_CHUNK_ADV_REC_WINDOW_CREDIT_OFFSET + \
NR_SACK_CHUNK_ADV_REC_WINDOW_CREDIT_LENGTH)
#define NR_SACK_CHUNK_NUMBER_OF_NR_GAP_BLOCKS_OFFSET (NR_SACK_CHUNK_NUMBER_OF_GAP_BLOCKS_OFFSET + \
NR_SACK_CHUNK_NUMBER_OF_GAP_BLOCKS_LENGTH)
#define NR_SACK_CHUNK_NUMBER_OF_DUP_TSNS_OFFSET (NR_SACK_CHUNK_NUMBER_OF_NR_GAP_BLOCKS_OFFSET + \
NR_SACK_CHUNK_NUMBER_OF_NR_GAP_BLOCKS_LENGTH)
#define NR_SACK_CHUNK_RESERVED_OFFSET (NR_SACK_CHUNK_NUMBER_OF_DUP_TSNS_OFFSET + \
NR_SACK_CHUNK_NUMBER_OF_DUP_TSNS_LENGTH)
#define NR_SACK_CHUNK_GAP_BLOCK_OFFSET (NR_SACK_CHUNK_RESERVED_OFFSET + \
NR_SACK_CHUNK_RESERVED_LENGTH)
static void
dissect_nr_sack_chunk(packet_info* pinfo, tvbuff_t *chunk_tvb, proto_tree *chunk_tree, proto_item *chunk_item, proto_item *flags_item, sctp_half_assoc_t* ha)
{
guint16 number_of_gap_blocks, number_of_dup_tsns;
guint16 number_of_nr_gap_blocks;
guint16 gap_block_number, nr_gap_block_number, dup_tsn_number, start, end;
gint gap_block_offset, nr_gap_block_offset, dup_tsn_offset;
guint32 cum_tsn_ack;
proto_item *block_item;
proto_tree *block_tree;
proto_tree *flags_tree;
proto_item *ctsa_item;
proto_item *num_of_gap_blocks;
proto_tree *acks_tree;
guint32 tsns_gap_acked = 0;
guint32 tsns_nr_gap_acked = 0;
flags_tree = proto_item_add_subtree(flags_item, ett_sctp_nr_sack_chunk_flags);
proto_tree_add_item(flags_tree, hf_nr_sack_chunk_ns, chunk_tvb, CHUNK_FLAGS_OFFSET, CHUNK_FLAGS_LENGTH, NETWORK_BYTE_ORDER);
ctsa_item = proto_tree_add_item(chunk_tree, hf_nr_sack_chunk_cumulative_tsn_ack, chunk_tvb, NR_SACK_CHUNK_CUMULATIVE_TSN_ACK_OFFSET, NR_SACK_CHUNK_CUMULATIVE_TSN_ACK_LENGTH, NETWORK_BYTE_ORDER);
proto_tree_add_item(chunk_tree, hf_nr_sack_chunk_adv_rec_window_credit, chunk_tvb, NR_SACK_CHUNK_ADV_REC_WINDOW_CREDIT_OFFSET, NR_SACK_CHUNK_ADV_REC_WINDOW_CREDIT_LENGTH, NETWORK_BYTE_ORDER);
num_of_gap_blocks = proto_tree_add_item(chunk_tree, hf_nr_sack_chunk_number_of_gap_blocks, chunk_tvb, NR_SACK_CHUNK_NUMBER_OF_GAP_BLOCKS_OFFSET, NR_SACK_CHUNK_NUMBER_OF_GAP_BLOCKS_LENGTH, NETWORK_BYTE_ORDER);
proto_tree_add_item(chunk_tree, hf_nr_sack_chunk_number_of_nr_gap_blocks, chunk_tvb, NR_SACK_CHUNK_NUMBER_OF_NR_GAP_BLOCKS_OFFSET, NR_SACK_CHUNK_NUMBER_OF_NR_GAP_BLOCKS_LENGTH, NETWORK_BYTE_ORDER);
proto_tree_add_item(chunk_tree, hf_nr_sack_chunk_number_of_dup_tsns, chunk_tvb, NR_SACK_CHUNK_NUMBER_OF_DUP_TSNS_OFFSET, NR_SACK_CHUNK_NUMBER_OF_DUP_TSNS_LENGTH, NETWORK_BYTE_ORDER);
proto_tree_add_item(chunk_tree, hf_nr_sack_chunk_reserved, chunk_tvb, NR_SACK_CHUNK_RESERVED_OFFSET, NR_SACK_CHUNK_RESERVED_LENGTH, NETWORK_BYTE_ORDER);
number_of_gap_blocks = tvb_get_ntohs(chunk_tvb, NR_SACK_CHUNK_NUMBER_OF_GAP_BLOCKS_OFFSET);
gap_block_offset = NR_SACK_CHUNK_GAP_BLOCK_OFFSET;
cum_tsn_ack = tvb_get_ntohl(chunk_tvb, NR_SACK_CHUNK_CUMULATIVE_TSN_ACK_OFFSET);
acks_tree = proto_item_add_subtree(ctsa_item,ett_sctp_ack);
sctp_ack_block(pinfo, ha, chunk_tvb, acks_tree, NULL, cum_tsn_ack);
for(gap_block_number = 1; gap_block_number <= number_of_gap_blocks; gap_block_number++) {
proto_item *pi;
proto_tree *pt;
guint32 tsn_start;
start = tvb_get_ntohs(chunk_tvb, gap_block_offset);
end = tvb_get_ntohs(chunk_tvb, gap_block_offset + NR_SACK_CHUNK_GAP_BLOCK_START_LENGTH);
tsn_start = cum_tsn_ack + start;
block_item = proto_tree_add_text(chunk_tree, chunk_tvb, gap_block_offset, NR_SACK_CHUNK_GAP_BLOCK_LENGTH, "Gap Acknowledgement for TSN %u to %u", cum_tsn_ack + start, cum_tsn_ack + end);
block_tree = proto_item_add_subtree(block_item, ett_sctp_nr_sack_chunk_gap_block);
pi = proto_tree_add_item(block_tree, hf_nr_sack_chunk_gap_block_start, chunk_tvb, gap_block_offset, NR_SACK_CHUNK_GAP_BLOCK_START_LENGTH, NETWORK_BYTE_ORDER);
pt = proto_item_add_subtree(pi, ett_sctp_nr_sack_chunk_gap_block_start);
pi = proto_tree_add_uint(pt, hf_nr_sack_chunk_gap_block_start_tsn,
chunk_tvb, gap_block_offset,NR_SACK_CHUNK_GAP_BLOCK_START_LENGTH, cum_tsn_ack + start);
PROTO_ITEM_SET_GENERATED(pi);
pi = proto_tree_add_item(block_tree, hf_nr_sack_chunk_gap_block_end, chunk_tvb, gap_block_offset + NR_SACK_CHUNK_GAP_BLOCK_START_LENGTH, NR_SACK_CHUNK_GAP_BLOCK_END_LENGTH, NETWORK_BYTE_ORDER);
pt = proto_item_add_subtree(pi, ett_sctp_nr_sack_chunk_gap_block_end);
pi = proto_tree_add_uint(pt, hf_nr_sack_chunk_gap_block_end_tsn, chunk_tvb,
gap_block_offset + NR_SACK_CHUNK_GAP_BLOCK_START_LENGTH, NR_SACK_CHUNK_GAP_BLOCK_END_LENGTH, cum_tsn_ack + end);
PROTO_ITEM_SET_GENERATED(pi);
sctp_ack_block(pinfo, ha, chunk_tvb, block_tree, &tsn_start, cum_tsn_ack + end);
gap_block_offset += NR_SACK_CHUNK_GAP_BLOCK_LENGTH;
tsns_gap_acked += (end - start) + 1;
}
if (tsns_gap_acked) {
proto_item *pi;
pi = proto_tree_add_uint(chunk_tree, hf_nr_sack_chunk_number_tsns_gap_acked, chunk_tvb, 0, 0, tsns_gap_acked);
PROTO_ITEM_SET_GENERATED(pi);
/* If there are a huge number of GAP ACKs, warn the user. 100 is a random
* number: it could be tuned.
*/
if (tsns_gap_acked > 100)
expert_add_info_format(pinfo, pi, PI_SEQUENCE, PI_WARN, "More than 100 TSNs were gap-acknowledged in this NR-SACK");
}
/* NE: handle the nr-sack chunk's nr-gap blocks */
number_of_nr_gap_blocks = tvb_get_ntohs(chunk_tvb, NR_SACK_CHUNK_NUMBER_OF_NR_GAP_BLOCKS_OFFSET);
nr_gap_block_offset = gap_block_offset;
for(nr_gap_block_number = 1; nr_gap_block_number <= number_of_nr_gap_blocks; nr_gap_block_number++) {
proto_item *pi;
proto_tree *pt;
guint32 tsn_start;
start = tvb_get_ntohs(chunk_tvb, nr_gap_block_offset);
end = tvb_get_ntohs(chunk_tvb, nr_gap_block_offset + NR_SACK_CHUNK_NR_GAP_BLOCK_START_LENGTH);
tsn_start = cum_tsn_ack + start;
block_item = proto_tree_add_text(chunk_tree, chunk_tvb, nr_gap_block_offset, NR_SACK_CHUNK_NR_GAP_BLOCK_LENGTH, "NR-Gap Acknowledgement for TSN %u to %u", cum_tsn_ack + start, cum_tsn_ack + end);
block_tree = proto_item_add_subtree(block_item, ett_sctp_nr_sack_chunk_nr_gap_block);
pi = proto_tree_add_item(block_tree, hf_nr_sack_chunk_nr_gap_block_start, chunk_tvb, nr_gap_block_offset, NR_SACK_CHUNK_NR_GAP_BLOCK_START_LENGTH, NETWORK_BYTE_ORDER);
pt = proto_item_add_subtree(pi, ett_sctp_nr_sack_chunk_nr_gap_block_start);
pi = proto_tree_add_uint(pt, hf_nr_sack_chunk_nr_gap_block_start_tsn,
chunk_tvb, nr_gap_block_offset, NR_SACK_CHUNK_NR_GAP_BLOCK_START_LENGTH, cum_tsn_ack + start);
PROTO_ITEM_SET_GENERATED(pi);
pi = proto_tree_add_item(block_tree, hf_nr_sack_chunk_nr_gap_block_end, chunk_tvb, nr_gap_block_offset + NR_SACK_CHUNK_NR_GAP_BLOCK_START_LENGTH, NR_SACK_CHUNK_NR_GAP_BLOCK_END_LENGTH, NETWORK_BYTE_ORDER);
pt = proto_item_add_subtree(pi, ett_sctp_nr_sack_chunk_nr_gap_block_end);
pi = proto_tree_add_uint(pt, hf_nr_sack_chunk_nr_gap_block_end_tsn, chunk_tvb,
nr_gap_block_offset + NR_SACK_CHUNK_NR_GAP_BLOCK_START_LENGTH, NR_SACK_CHUNK_NR_GAP_BLOCK_END_LENGTH, cum_tsn_ack + end);
PROTO_ITEM_SET_GENERATED(pi);
/* sctp_ack_block(pinfo, ha, chunk_tvb, block_tree, &tsn_start, cum_tsn_ack + end); */
nr_gap_block_offset += NR_SACK_CHUNK_NR_GAP_BLOCK_LENGTH;
tsns_nr_gap_acked += (end - start) + 1;
}
if (tsns_nr_gap_acked) {
proto_item *pi;
pi = proto_tree_add_uint(chunk_tree, hf_nr_sack_chunk_number_tsns_nr_gap_acked, chunk_tvb, 0, 0, tsns_nr_gap_acked);
PROTO_ITEM_SET_GENERATED(pi);
/* If there are a huge number of GAP ACKs, warn the user. 100 is a random
* number: it could be tuned.
*/
if (tsns_nr_gap_acked > 100)
expert_add_info_format(pinfo, pi, PI_SEQUENCE, PI_WARN, "More than 100 TSNs were nr-gap-acknowledged in this NR-SACK");
}
/* handle the duplicate TSNs */
number_of_dup_tsns = tvb_get_ntohs(chunk_tvb, NR_SACK_CHUNK_NUMBER_OF_DUP_TSNS_OFFSET);
dup_tsn_offset = NR_SACK_CHUNK_GAP_BLOCK_OFFSET + number_of_gap_blocks * NR_SACK_CHUNK_GAP_BLOCK_LENGTH
+ number_of_nr_gap_blocks * NR_SACK_CHUNK_NR_GAP_BLOCK_LENGTH;
for(dup_tsn_number = 1; dup_tsn_number <= number_of_dup_tsns; dup_tsn_number++) {
proto_tree_add_item(chunk_tree, hf_sack_chunk_duplicate_tsn, chunk_tvb, dup_tsn_offset, NR_SACK_CHUNK_DUP_TSN_LENGTH, NETWORK_BYTE_ORDER);
dup_tsn_offset += NR_SACK_CHUNK_DUP_TSN_LENGTH;
}
proto_item_append_text(chunk_item, " (Cumulative TSN: %u, a_rwnd: %u, gaps: %u, nr-gaps: %u, duplicate TSNs: %u)",
tvb_get_ntohl(chunk_tvb, NR_SACK_CHUNK_CUMULATIVE_TSN_ACK_OFFSET),
tvb_get_ntohl(chunk_tvb, NR_SACK_CHUNK_ADV_REC_WINDOW_CREDIT_OFFSET),
number_of_gap_blocks, number_of_nr_gap_blocks, number_of_dup_tsns);
}
#define HEARTBEAT_CHUNK_INFO_OFFSET CHUNK_VALUE_OFFSET
static void
@ -3414,6 +3616,9 @@ dissect_sctp_chunk(tvbuff_t *chunk_tvb,
case SCTP_AUTH_CHUNK_ID:
dissect_auth_chunk(chunk_tvb, length, chunk_tree, chunk_item);
break;
case SCTP_NR_SACK_CHUNK_ID:
dissect_nr_sack_chunk(pinfo, chunk_tvb, chunk_tree, chunk_item, flags_item, ha);
break;
case SCTP_ASCONF_ACK_CHUNK_ID:
dissect_asconf_ack_chunk(chunk_tvb, length, pinfo, chunk_tree, chunk_item);
break;
@ -3688,122 +3893,140 @@ proto_register_sctp(void)
/* Setup list of header fields */
static hf_register_info hf[] = {
{ &hf_source_port, { "Source port", "sctp.srcport", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_destination_port, { "Destination port", "sctp.dstport", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_port, { "Port", "sctp.port", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_verification_tag, { "Verification tag", "sctp.verification_tag", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL } },
{ &hf_checksum, { "Checksum", "sctp.checksum", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL } },
{ &hf_checksum_bad, { "Bad checksum", "sctp.checksum_bad", FT_BOOLEAN, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_chunk_type, { "Chunk type", "sctp.chunk_type", FT_UINT8, BASE_DEC, VALS(chunk_type_values), 0x0, "", HFILL } },
{ &hf_chunk_flags, { "Chunk flags", "sctp.chunk_flags", FT_UINT8, BASE_HEX, NULL, 0x0, "", HFILL } },
{ &hf_chunk_bit_1, { "Bit", "sctp.chunk_bit_1", FT_BOOLEAN, 8, TFS(&sctp_chunk_bit_1_value), SCTP_CHUNK_BIT_1, "", HFILL } },
{ &hf_chunk_bit_2, { "Bit", "sctp.chunk_bit_2", FT_BOOLEAN, 8, TFS(&sctp_chunk_bit_2_value), SCTP_CHUNK_BIT_2, "", HFILL } },
{ &hf_chunk_length, { "Chunk length", "sctp.chunk_length", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_chunk_padding, { "Chunk padding", "sctp.chunk_padding", FT_BYTES, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_chunk_value, { "Chunk value", "sctp.chunk_value", FT_BYTES, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_cookie, { "Cookie", "sctp.cookie", FT_BYTES, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_initiate_tag, { "Initiate tag", "sctp.initiate_tag", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL } },
{ &hf_init_chunk_initiate_tag, { "Initiate tag", "sctp.init_initiate_tag", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL } },
{ &hf_init_chunk_adv_rec_window_credit, { "Advertised receiver window credit (a_rwnd)", "sctp.init_credit", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_init_chunk_number_of_outbound_streams, { "Number of outbound streams", "sctp.init_nr_out_streams", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_init_chunk_number_of_inbound_streams, { "Number of inbound streams", "sctp.init_nr_in_streams", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_init_chunk_initial_tsn, { "Initial TSN", "sctp.init_initial_tsn", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_initack_chunk_initiate_tag, { "Initiate tag", "sctp.initack_initiate_tag", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL } },
{ &hf_initack_chunk_adv_rec_window_credit, { "Advertised receiver window credit (a_rwnd)", "sctp.initack_credit", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_initack_chunk_number_of_outbound_streams, { "Number of outbound streams", "sctp.initack_nr_out_streams", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_initack_chunk_number_of_inbound_streams, { "Number of inbound streams", "sctp.initack_nr_in_streams", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_initack_chunk_initial_tsn, { "Initial TSN", "sctp.initack_initial_tsn", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_cumulative_tsn_ack, { "Cumulative TSN Ack", "sctp.cumulative_tsn_ack", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_data_chunk_tsn, { "TSN", "sctp.data_tsn", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_data_chunk_stream_id, { "Stream Identifier", "sctp.data_sid", FT_UINT16, BASE_HEX, NULL, 0x0, "", HFILL } },
{ &hf_data_chunk_stream_seq_number, { "Stream sequence number", "sctp.data_ssn", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_data_chunk_payload_proto_id, { "Payload protocol identifier", "sctp.data_payload_proto_id", FT_UINT32, BASE_DEC, VALS(sctp_payload_proto_id_values), 0x0, "", HFILL } },
{ &hf_data_chunk_e_bit, { "E-Bit", "sctp.data_e_bit", FT_BOOLEAN, 8, TFS(&sctp_data_chunk_e_bit_value), SCTP_DATA_CHUNK_E_BIT, "", HFILL } },
{ &hf_data_chunk_b_bit, { "B-Bit", "sctp.data_b_bit", FT_BOOLEAN, 8, TFS(&sctp_data_chunk_b_bit_value), SCTP_DATA_CHUNK_B_BIT, "", HFILL } },
{ &hf_data_chunk_u_bit, { "U-Bit", "sctp.data_u_bit", FT_BOOLEAN, 8, TFS(&sctp_data_chunk_u_bit_value), SCTP_DATA_CHUNK_U_BIT, "", HFILL } },
{ &hf_data_chunk_i_bit, { "I-Bit", "sctp.data_i_bit", FT_BOOLEAN, 8, TFS(&sctp_data_chunk_i_bit_value), SCTP_DATA_CHUNK_I_BIT, "", HFILL } },
{ &hf_sack_chunk_ns, { "Nounce sum", "sctp.sack_nounce_sum", FT_UINT8, BASE_DEC, NULL, SCTP_SACK_CHUNK_NS_BIT, "", HFILL } },
{ &hf_sack_chunk_cumulative_tsn_ack, { "Cumulative TSN ACK", "sctp.sack_cumulative_tsn_ack", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_sack_chunk_adv_rec_window_credit, { "Advertised receiver window credit (a_rwnd)", "sctp.sack_a_rwnd", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_sack_chunk_number_of_gap_blocks, { "Number of gap acknowledgement blocks", "sctp.sack_number_of_gap_blocks", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_sack_chunk_number_of_dup_tsns, { "Number of duplicated TSNs", "sctp.sack_number_of_duplicated_tsns", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_sack_chunk_gap_block_start, { "Start", "sctp.sack_gap_block_start", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_sack_chunk_gap_block_start_tsn, { "Start TSN", "sctp.sack_gap_block_start_tsn", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_sack_chunk_gap_block_end, { "End", "sctp.sack_gap_block_end", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_sack_chunk_gap_block_end_tsn, { "End TSN", "sctp.sack_gap_block_end_tsn", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_sack_chunk_number_tsns_gap_acked, { "Number of TSNs in gap acknowledgement blocks","sctp.sack_number_of_tsns_gap_acked", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_sack_chunk_duplicate_tsn, { "Duplicate TSN", "sctp.sack_duplicate_tsn", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_shutdown_chunk_cumulative_tsn_ack, { "Cumulative TSN Ack", "sctp.shutdown_cumulative_tsn_ack", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_ecne_chunk_lowest_tsn, { "Lowest TSN", "sctp.ecne_lowest_tsn", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_cwr_chunk_lowest_tsn, { "Lowest TSN", "sctp.cwr_lowest_tsn", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_shutdown_complete_chunk_t_bit, { "T-Bit", "sctp.shutdown_complete_t_bit", FT_BOOLEAN, 8, TFS(&sctp_shutdown_complete_chunk_t_bit_value), SCTP_SHUTDOWN_COMPLETE_CHUNK_T_BIT, "", HFILL } },
{ &hf_abort_chunk_t_bit, { "T-Bit", "sctp.abort_t_bit", FT_BOOLEAN, 8, TFS(&sctp_shutdown_complete_chunk_t_bit_value), SCTP_ABORT_CHUNK_T_BIT, "", HFILL } },
{ &hf_forward_tsn_chunk_tsn, { "New cumulative TSN", "sctp.forward_tsn_tsn", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_forward_tsn_chunk_sid, { "Stream identifier", "sctp.forward_tsn_sid", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_forward_tsn_chunk_ssn, { "Stream sequence number", "sctp.forward_tsn_ssn", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_parameter_type, { "Parameter type", "sctp.parameter_type", FT_UINT16, BASE_HEX, VALS(parameter_identifier_values), 0x0, "", HFILL } },
{ &hf_parameter_length, { "Parameter length", "sctp.parameter_length", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_parameter_value, { "Parameter value", "sctp.parameter_value", FT_BYTES, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_parameter_padding, { "Parameter padding", "sctp.parameter_padding", FT_BYTES, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_parameter_bit_1, { "Bit", "sctp.parameter_bit_1", FT_BOOLEAN, 16, TFS(&sctp_parameter_bit_1_value), SCTP_PARAMETER_BIT_1, "", HFILL } },
{ &hf_parameter_bit_2, { "Bit", "sctp.parameter_bit_2", FT_BOOLEAN, 16, TFS(&sctp_parameter_bit_2_value), SCTP_PARAMETER_BIT_2, "", HFILL } },
{ &hf_ipv4_address, { "IP Version 4 address", "sctp.parameter_ipv4_address", FT_IPv4, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_ipv6_address, { "IP Version 6 address", "sctp.parameter_ipv6_address", FT_IPv6, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_heartbeat_info, { "Heartbeat information", "sctp.parameter_heartbeat_information", FT_BYTES, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_state_cookie, { "State cookie", "sctp.parameter_state_cookie", FT_BYTES, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_cookie_preservative_increment, { "Suggested Cookie life-span increment (msec)", "sctp.parameter_cookie_preservative_incr", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_hostname, { "Hostname", "sctp.parameter_hostname", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_supported_address_type, { "Supported address type", "sctp.parameter_supported_addres_type", FT_UINT16, BASE_DEC, VALS(address_types_values), 0x0, "", HFILL } },
{ &hf_stream_reset_req_seq_nr, { "Stream reset request sequence number", "sctp.parameter_stream_reset_request_sequence_number", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_stream_reset_rsp_seq_nr, { "Stream reset response sequence number", "sctp.parameter_stream_reset_response_sequence_number", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_senders_last_assigned_tsn, { "Senders last assigned TSN", "sctp.parameter_senders_last_assigned_tsn", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_senders_next_tsn, { "Senders next TSN", "sctp.parameter_senders_next_tsn", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_receivers_next_tsn, { "Receivers next TSN", "sctp.parameter_receivers_next_tsn", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_stream_reset_rsp_result, { "Result", "sctp.parameter_stream_reset_response_result", FT_UINT32, BASE_DEC, VALS(stream_reset_result_values), 0x0, "", HFILL } },
{ &hf_stream_reset_sid, { "Stream Identifier", "sctp.parameter_stream_reset_sid", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_asconf_serial, { "Serial number", "sctp.asconf_serial_number", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL } },
{ &hf_asconf_ack_serial, { "Serial number", "sctp.asconf_ack_serial_number", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL } },
{ &hf_correlation_id, { "Correlation_id", "sctp.correlation_id", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL } },
{ &hf_adap_indication, { "Indication", "sctp.adapation_layer_indication", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL } },
{ &hf_random_number, { "Random number", "sctp.random_number", FT_BYTES, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_chunks_to_auth, { "Chunk type", "sctp.chunk_type_to_auth", FT_UINT8, BASE_DEC, VALS(chunk_type_values), 0x0, "", HFILL } },
{ &hf_hmac_id, { "HMAC identifier", "sctp.hmac_id", FT_UINT16, BASE_DEC, VALS(hmac_id_values), 0x0, "", HFILL } },
{ &hf_hmac, { "HMAC", "sctp.hmac", FT_BYTES, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_shared_key_id, { "Shared key identifier", "sctp.shared_key_id", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_supported_chunk_type, { "Supported chunk type", "sctp.supported_chunk_type", FT_UINT8, BASE_DEC, VALS(chunk_type_values), 0x0, "", HFILL } },
{ &hf_cause_code, { "Cause code", "sctp.cause_code", FT_UINT16, BASE_HEX, VALS(cause_code_values), 0x0, "", HFILL } },
{ &hf_cause_length, { "Cause length", "sctp.cause_length", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_cause_info, { "Cause information", "sctp.cause_information", FT_BYTES, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_cause_padding, { "Cause padding", "sctp.cause_padding", FT_BYTES, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_cause_stream_identifier, { "Stream identifier", "sctp.cause_stream_identifier", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_cause_reserved, { "Reserved", "sctp.cause_reserved", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_cause_number_of_missing_parameters, { "Number of missing parameters", "sctp.cause_nr_of_missing_parameters", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_cause_missing_parameter_type, { "Missing parameter type", "sctp.cause_missing_parameter_type", FT_UINT16, BASE_HEX, VALS(parameter_identifier_values), 0x0, "", HFILL } },
{ &hf_cause_measure_of_staleness, { "Measure of staleness in usec", "sctp.cause_measure_of_staleness", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_cause_tsn, { "TSN", "sctp.cause_tsn", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_pktdrop_chunk_m_bit, { "M-Bit", "sctp.pckdrop_m_bit", FT_BOOLEAN, 8, TFS(&sctp_pktdropk_m_bit_value), SCTP_PKTDROP_CHUNK_M_BIT, "", HFILL } },
{ &hf_pktdrop_chunk_b_bit, { "B-Bit", "sctp.pckdrop_b_bit", FT_BOOLEAN, 8, TFS(&sctp_pktdropk_b_bit_value), SCTP_PKTDROP_CHUNK_B_BIT, "", HFILL } },
{ &hf_pktdrop_chunk_t_bit, { "T-Bit", "sctp.pckdrop_t_bit", FT_BOOLEAN, 8, TFS(&sctp_pktdropk_t_bit_value), SCTP_PKTDROP_CHUNK_T_BIT, "", HFILL } },
{ &hf_pktdrop_chunk_bandwidth, { "Bandwidth", "sctp.pktdrop_bandwidth", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_pktdrop_chunk_queuesize, { "Queuesize", "sctp.pktdrop_queuesize", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_pktdrop_chunk_truncated_length, { "Truncated length", "sctp.pktdrop_truncated_length", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_pktdrop_chunk_reserved, { "Reserved", "sctp.pktdrop_reserved", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_pktdrop_chunk_data_field, { "Data field", "sctp.pktdrop_datafield", FT_BYTES, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_source_port, { "Source port", "sctp.srcport", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_destination_port, { "Destination port", "sctp.dstport", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_port, { "Port", "sctp.port", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_verification_tag, { "Verification tag", "sctp.verification_tag", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL } },
{ &hf_checksum, { "Checksum", "sctp.checksum", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL } },
{ &hf_checksum_bad, { "Bad checksum", "sctp.checksum_bad", FT_BOOLEAN, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_chunk_type, { "Chunk type", "sctp.chunk_type", FT_UINT8, BASE_DEC, VALS(chunk_type_values), 0x0, "", HFILL } },
{ &hf_chunk_flags, { "Chunk flags", "sctp.chunk_flags", FT_UINT8, BASE_HEX, NULL, 0x0, "", HFILL } },
{ &hf_chunk_bit_1, { "Bit", "sctp.chunk_bit_1", FT_BOOLEAN, 8, TFS(&sctp_chunk_bit_1_value), SCTP_CHUNK_BIT_1, "", HFILL } },
{ &hf_chunk_bit_2, { "Bit", "sctp.chunk_bit_2", FT_BOOLEAN, 8, TFS(&sctp_chunk_bit_2_value), SCTP_CHUNK_BIT_2, "", HFILL } },
{ &hf_chunk_length, { "Chunk length", "sctp.chunk_length", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_chunk_padding, { "Chunk padding", "sctp.chunk_padding", FT_BYTES, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_chunk_value, { "Chunk value", "sctp.chunk_value", FT_BYTES, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_cookie, { "Cookie", "sctp.cookie", FT_BYTES, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_initiate_tag, { "Initiate tag", "sctp.initiate_tag", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL } },
{ &hf_init_chunk_initiate_tag, { "Initiate tag", "sctp.init_initiate_tag", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL } },
{ &hf_init_chunk_adv_rec_window_credit, { "Advertised receiver window credit (a_rwnd)", "sctp.init_credit", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_init_chunk_number_of_outbound_streams, { "Number of outbound streams", "sctp.init_nr_out_streams", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_init_chunk_number_of_inbound_streams, { "Number of inbound streams", "sctp.init_nr_in_streams", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_init_chunk_initial_tsn, { "Initial TSN", "sctp.init_initial_tsn", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_initack_chunk_initiate_tag, { "Initiate tag", "sctp.initack_initiate_tag", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL } },
{ &hf_initack_chunk_adv_rec_window_credit, { "Advertised receiver window credit (a_rwnd)", "sctp.initack_credit", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_initack_chunk_number_of_outbound_streams, { "Number of outbound streams", "sctp.initack_nr_out_streams", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_initack_chunk_number_of_inbound_streams, { "Number of inbound streams", "sctp.initack_nr_in_streams", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_initack_chunk_initial_tsn, { "Initial TSN", "sctp.initack_initial_tsn", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_cumulative_tsn_ack, { "Cumulative TSN Ack", "sctp.cumulative_tsn_ack", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_data_chunk_tsn, { "TSN", "sctp.data_tsn", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_data_chunk_stream_id, { "Stream Identifier", "sctp.data_sid", FT_UINT16, BASE_HEX, NULL, 0x0, "", HFILL } },
{ &hf_data_chunk_stream_seq_number, { "Stream sequence number", "sctp.data_ssn", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_data_chunk_payload_proto_id, { "Payload protocol identifier", "sctp.data_payload_proto_id", FT_UINT32, BASE_DEC, VALS(sctp_payload_proto_id_values), 0x0, "", HFILL } },
{ &hf_data_chunk_e_bit, { "E-Bit", "sctp.data_e_bit", FT_BOOLEAN, 8, TFS(&sctp_data_chunk_e_bit_value), SCTP_DATA_CHUNK_E_BIT, "", HFILL } },
{ &hf_data_chunk_b_bit, { "B-Bit", "sctp.data_b_bit", FT_BOOLEAN, 8, TFS(&sctp_data_chunk_b_bit_value), SCTP_DATA_CHUNK_B_BIT, "", HFILL } },
{ &hf_data_chunk_u_bit, { "U-Bit", "sctp.data_u_bit", FT_BOOLEAN, 8, TFS(&sctp_data_chunk_u_bit_value), SCTP_DATA_CHUNK_U_BIT, "", HFILL } },
{ &hf_data_chunk_i_bit, { "I-Bit", "sctp.data_i_bit", FT_BOOLEAN, 8, TFS(&sctp_data_chunk_i_bit_value), SCTP_DATA_CHUNK_I_BIT, "", HFILL } },
{ &hf_sack_chunk_ns, { "Nounce sum", "sctp.sack_nounce_sum", FT_UINT8, BASE_DEC, NULL, SCTP_SACK_CHUNK_NS_BIT, "", HFILL } },
{ &hf_sack_chunk_cumulative_tsn_ack, { "Cumulative TSN ACK", "sctp.sack_cumulative_tsn_ack", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_sack_chunk_adv_rec_window_credit, { "Advertised receiver window credit (a_rwnd)", "sctp.sack_a_rwnd", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_sack_chunk_number_of_gap_blocks, { "Number of gap acknowledgement blocks", "sctp.sack_number_of_gap_blocks", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_sack_chunk_number_of_dup_tsns, { "Number of duplicated TSNs", "sctp.sack_number_of_duplicated_tsns", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_sack_chunk_gap_block_start, { "Start", "sctp.sack_gap_block_start", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_sack_chunk_gap_block_start_tsn, { "Start TSN", "sctp.sack_gap_block_start_tsn", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_sack_chunk_gap_block_end, { "End", "sctp.sack_gap_block_end", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_sack_chunk_gap_block_end_tsn, { "End TSN", "sctp.sack_gap_block_end_tsn", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_sack_chunk_number_tsns_gap_acked, { "Number of TSNs in gap acknowledgement blocks", "sctp.sack_number_of_tsns_gap_acked", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_sack_chunk_duplicate_tsn, { "Duplicate TSN", "sctp.sack_duplicate_tsn", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_nr_sack_chunk_ns, { "Nounce sum", "sctp.nr_sack_nounce_sum", FT_UINT8, BASE_DEC, NULL, SCTP_NR_SACK_CHUNK_NS_BIT, "", HFILL } },
{ &hf_nr_sack_chunk_cumulative_tsn_ack, { "Cumulative TSN ACK", "sctp.nr_sack_cumulative_tsn_ack", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_nr_sack_chunk_adv_rec_window_credit, { "Advertised receiver window credit (a_rwnd)", "sctp.nr_sack_a_rwnd", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_nr_sack_chunk_number_of_gap_blocks, { "Number of gap acknowledgement blocks", "sctp.nr_sack_number_of_gap_blocks", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_nr_sack_chunk_number_of_nr_gap_blocks, { "Number of nr-gap acknowledgement blocks", "sctp.nr_sack_number_of_nr_gap_blocks", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_nr_sack_chunk_number_of_dup_tsns, { "Number of duplicated TSNs", "sctp.nr_sack_number_of_duplicated_tsns", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_nr_sack_chunk_reserved, { "Reserved", "sctp.nr_sack_reserved", FT_UINT16, BASE_HEX, NULL, 0x0, "", HFILL } },
{ &hf_nr_sack_chunk_gap_block_start, { "Start", "sctp.nr_sack_gap_block_start", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_nr_sack_chunk_gap_block_start_tsn, { "Start TSN", "sctp.nr_sack_gap_block_start_tsn", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_nr_sack_chunk_gap_block_end, { "End", "sctp.nr_sack_gap_block_end", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_nr_sack_chunk_gap_block_end_tsn, { "End TSN", "sctp.nr_sack_gap_block_end_tsn", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_nr_sack_chunk_number_tsns_gap_acked, { "Number of TSNs in gap acknowledgement blocks", "sctp.nr_sack_number_of_tsns_gap_acked", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_nr_sack_chunk_nr_gap_block_start, { "Start", "sctp.nr_sack_nr_gap_block_start", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_nr_sack_chunk_nr_gap_block_start_tsn, { "Start TSN", "sctp.nr_sack_nr_gap_block_start_tsn", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_nr_sack_chunk_nr_gap_block_end, { "End", "sctp.nr_sack_nr_gap_block_end", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_nr_sack_chunk_nr_gap_block_end_tsn, { "End TSN", "sctp.nr_sack_nr_gap_block_end_tsn", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_nr_sack_chunk_number_tsns_nr_gap_acked, { "Number of TSNs in nr-gap acknowledgement blocks","sctp.nr_sack_number_of_tsns_nr_gap_acked", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_nr_sack_chunk_duplicate_tsn, { "Duplicate TSN", "sctp.nr_sack_duplicate_tsn", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_shutdown_chunk_cumulative_tsn_ack, { "Cumulative TSN Ack", "sctp.shutdown_cumulative_tsn_ack", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_ecne_chunk_lowest_tsn, { "Lowest TSN", "sctp.ecne_lowest_tsn", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_cwr_chunk_lowest_tsn, { "Lowest TSN", "sctp.cwr_lowest_tsn", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_shutdown_complete_chunk_t_bit, { "T-Bit", "sctp.shutdown_complete_t_bit", FT_BOOLEAN, 8, TFS(&sctp_shutdown_complete_chunk_t_bit_value), SCTP_SHUTDOWN_COMPLETE_CHUNK_T_BIT, "", HFILL } },
{ &hf_abort_chunk_t_bit, { "T-Bit", "sctp.abort_t_bit", FT_BOOLEAN, 8, TFS(&sctp_shutdown_complete_chunk_t_bit_value), SCTP_ABORT_CHUNK_T_BIT, "", HFILL } },
{ &hf_forward_tsn_chunk_tsn, { "New cumulative TSN", "sctp.forward_tsn_tsn", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_forward_tsn_chunk_sid, { "Stream identifier", "sctp.forward_tsn_sid", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_forward_tsn_chunk_ssn, { "Stream sequence number", "sctp.forward_tsn_ssn", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_parameter_type, { "Parameter type", "sctp.parameter_type", FT_UINT16, BASE_HEX, VALS(parameter_identifier_values), 0x0, "", HFILL } },
{ &hf_parameter_length, { "Parameter length", "sctp.parameter_length", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_parameter_value, { "Parameter value", "sctp.parameter_value", FT_BYTES, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_parameter_padding, { "Parameter padding", "sctp.parameter_padding", FT_BYTES, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_parameter_bit_1, { "Bit", "sctp.parameter_bit_1", FT_BOOLEAN, 16, TFS(&sctp_parameter_bit_1_value), SCTP_PARAMETER_BIT_1, "", HFILL } },
{ &hf_parameter_bit_2, { "Bit", "sctp.parameter_bit_2", FT_BOOLEAN, 16, TFS(&sctp_parameter_bit_2_value), SCTP_PARAMETER_BIT_2, "", HFILL } },
{ &hf_ipv4_address, { "IP Version 4 address", "sctp.parameter_ipv4_address", FT_IPv4, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_ipv6_address, { "IP Version 6 address", "sctp.parameter_ipv6_address", FT_IPv6, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_heartbeat_info, { "Heartbeat information", "sctp.parameter_heartbeat_information", FT_BYTES, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_state_cookie, { "State cookie", "sctp.parameter_state_cookie", FT_BYTES, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_cookie_preservative_increment, { "Suggested Cookie life-span increment (msec)", "sctp.parameter_cookie_preservative_incr", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_hostname, { "Hostname", "sctp.parameter_hostname", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_supported_address_type, { "Supported address type", "sctp.parameter_supported_addres_type", FT_UINT16, BASE_DEC, VALS(address_types_values), 0x0, "", HFILL } },
{ &hf_stream_reset_req_seq_nr, { "Stream reset request sequence number", "sctp.parameter_stream_reset_request_sequence_number", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_stream_reset_rsp_seq_nr, { "Stream reset response sequence number", "sctp.parameter_stream_reset_response_sequence_number", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_senders_last_assigned_tsn, { "Senders last assigned TSN", "sctp.parameter_senders_last_assigned_tsn", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_senders_next_tsn, { "Senders next TSN", "sctp.parameter_senders_next_tsn", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_receivers_next_tsn, { "Receivers next TSN", "sctp.parameter_receivers_next_tsn", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_stream_reset_rsp_result, { "Result", "sctp.parameter_stream_reset_response_result", FT_UINT32, BASE_DEC, VALS(stream_reset_result_values), 0x0, "", HFILL } },
{ &hf_stream_reset_sid, { "Stream Identifier", "sctp.parameter_stream_reset_sid", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_asconf_serial, { "Serial number", "sctp.asconf_serial_number", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL } },
{ &hf_asconf_ack_serial, { "Serial number", "sctp.asconf_ack_serial_number", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL } },
{ &hf_correlation_id, { "Correlation_id", "sctp.correlation_id", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL } },
{ &hf_adap_indication, { "Indication", "sctp.adapation_layer_indication", FT_UINT32, BASE_HEX, NULL, 0x0, "", HFILL } },
{ &hf_random_number, { "Random number", "sctp.random_number", FT_BYTES, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_chunks_to_auth, { "Chunk type", "sctp.chunk_type_to_auth", FT_UINT8, BASE_DEC, VALS(chunk_type_values), 0x0, "", HFILL } },
{ &hf_hmac_id, { "HMAC identifier", "sctp.hmac_id", FT_UINT16, BASE_DEC, VALS(hmac_id_values), 0x0, "", HFILL } },
{ &hf_hmac, { "HMAC", "sctp.hmac", FT_BYTES, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_shared_key_id, { "Shared key identifier", "sctp.shared_key_id", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_supported_chunk_type, { "Supported chunk type", "sctp.supported_chunk_type", FT_UINT8, BASE_DEC, VALS(chunk_type_values), 0x0, "", HFILL } },
{ &hf_cause_code, { "Cause code", "sctp.cause_code", FT_UINT16, BASE_HEX, VALS(cause_code_values), 0x0, "", HFILL } },
{ &hf_cause_length, { "Cause length", "sctp.cause_length", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_cause_info, { "Cause information", "sctp.cause_information", FT_BYTES, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_cause_padding, { "Cause padding", "sctp.cause_padding", FT_BYTES, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_cause_stream_identifier, { "Stream identifier", "sctp.cause_stream_identifier", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_cause_reserved, { "Reserved", "sctp.cause_reserved", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_cause_number_of_missing_parameters, { "Number of missing parameters", "sctp.cause_nr_of_missing_parameters", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_cause_missing_parameter_type, { "Missing parameter type", "sctp.cause_missing_parameter_type", FT_UINT16, BASE_HEX, VALS(parameter_identifier_values), 0x0, "", HFILL } },
{ &hf_cause_measure_of_staleness, { "Measure of staleness in usec", "sctp.cause_measure_of_staleness", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_cause_tsn, { "TSN", "sctp.cause_tsn", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_pktdrop_chunk_m_bit, { "M-Bit", "sctp.pckdrop_m_bit", FT_BOOLEAN, 8, TFS(&sctp_pktdropk_m_bit_value), SCTP_PKTDROP_CHUNK_M_BIT, "", HFILL } },
{ &hf_pktdrop_chunk_b_bit, { "B-Bit", "sctp.pckdrop_b_bit", FT_BOOLEAN, 8, TFS(&sctp_pktdropk_b_bit_value), SCTP_PKTDROP_CHUNK_B_BIT, "", HFILL } },
{ &hf_pktdrop_chunk_t_bit, { "T-Bit", "sctp.pckdrop_t_bit", FT_BOOLEAN, 8, TFS(&sctp_pktdropk_t_bit_value), SCTP_PKTDROP_CHUNK_T_BIT, "", HFILL } },
{ &hf_pktdrop_chunk_bandwidth, { "Bandwidth", "sctp.pktdrop_bandwidth", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_pktdrop_chunk_queuesize, { "Queuesize", "sctp.pktdrop_queuesize", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_pktdrop_chunk_truncated_length, { "Truncated length", "sctp.pktdrop_truncated_length", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_pktdrop_chunk_reserved, { "Reserved", "sctp.pktdrop_reserved", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_pktdrop_chunk_data_field, { "Data field", "sctp.pktdrop_datafield", FT_BYTES, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_sctp_fragment, { "SCTP Fragment", "sctp.fragment", FT_FRAMENUM, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_sctp_fragments, { "Reassembled SCTP Fragments", "sctp.fragments", FT_NONE, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_sctp_reassembled_in, { "Reassembled Message in frame", "sctp.reassembled_in", FT_FRAMENUM, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_sctp_duplicate, { "Fragment already seen in frame", "sctp.duplicate", FT_FRAMENUM, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_sctp_fragment, { "SCTP Fragment", "sctp.fragment", FT_FRAMENUM, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_sctp_fragments, { "Reassembled SCTP Fragments", "sctp.fragments", FT_NONE, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_sctp_reassembled_in, { "Reassembled Message in frame", "sctp.reassembled_in", FT_FRAMENUM, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_sctp_duplicate, { "Fragment already seen in frame", "sctp.duplicate", FT_FRAMENUM, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_sctp_rtt, { "The RTT to ACK the chunk was", "sctp.rtt", FT_RELATIVE_TIME, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_sctp_rto, { "Retransmitted after", "sctp.retransmission_time", FT_RELATIVE_TIME, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_sctp_retransmission, { "This TSN is a retransmission of one in frame","sctp.retransmission", FT_FRAMENUM, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_sctp_retransmitted, { "This TSN is retransmitted in frame", "sctp.retransmitted", FT_FRAMENUM, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_sctp_retransmitted_count, { "TSN was retransmitted this many times", "sctp.retransmitted_count", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_sctp_acked, { "This chunk is acked in frame", "sctp.acked", FT_FRAMENUM, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_sctp_ack_tsn, { "Acknowledges TSN", "sctp.ack", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_sctp_ack_frame, { "Chunk acknowledged in frame", "sctp.ack_frame", FT_FRAMENUM, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_sctp_retransmitted_after_ack, { "Chunk was acked prior to retransmission", "sctp.retransmitted_after_ack", FT_FRAMENUM, BASE_NONE, NULL, 0x0, "", HFILL } }
{ &hf_sctp_rtt, { "The RTT to ACK the chunk was", "sctp.rtt", FT_RELATIVE_TIME, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_sctp_rto, { "Retransmitted after", "sctp.retransmission_time", FT_RELATIVE_TIME, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_sctp_retransmission, { "This TSN is a retransmission of one in frame", "sctp.retransmission", FT_FRAMENUM, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_sctp_retransmitted, { "This TSN is retransmitted in frame", "sctp.retransmitted", FT_FRAMENUM, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_sctp_retransmitted_count, { "TSN was retransmitted this many times", "sctp.retransmitted_count", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_sctp_acked, { "This chunk is acked in frame", "sctp.acked", FT_FRAMENUM, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_sctp_ack_tsn, { "Acknowledges TSN", "sctp.ack", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL } },
{ &hf_sctp_ack_frame, { "Chunk acknowledged in frame", "sctp.ack_frame", FT_FRAMENUM, BASE_NONE, NULL, 0x0, "", HFILL } },
{ &hf_sctp_retransmitted_after_ack, { "Chunk was acked prior to retransmission", "sctp.retransmitted_after_ack", FT_FRAMENUM, BASE_NONE, NULL, 0x0, "", HFILL } }
};
@ -3816,6 +4039,7 @@ proto_register_sctp(void)
&ett_sctp_chunk_type,
&ett_sctp_data_chunk_flags,
&ett_sctp_sack_chunk_flags,
&ett_sctp_nr_sack_chunk_flags,
&ett_sctp_abort_chunk_flags,
&ett_sctp_shutdown_complete_chunk_flags,
&ett_sctp_pktdrop_chunk_flags,
@ -3823,6 +4047,12 @@ proto_register_sctp(void)
&ett_sctp_sack_chunk_gap_block,
&ett_sctp_sack_chunk_gap_block_start,
&ett_sctp_sack_chunk_gap_block_end,
&ett_sctp_nr_sack_chunk_gap_block,
&ett_sctp_nr_sack_chunk_gap_block_start,
&ett_sctp_nr_sack_chunk_gap_block_end,
&ett_sctp_nr_sack_chunk_nr_gap_block,
&ett_sctp_nr_sack_chunk_nr_gap_block_start,
&ett_sctp_nr_sack_chunk_nr_gap_block_end,
&ett_sctp_unrecognized_parameter_parameter,
&ett_sctp_fragments,
&ett_sctp_fragment,

View File

@ -1,6 +1,7 @@
/* sctp_chunk_stat.c
* SCTP chunk counter for Wireshark
* Copyright 2005 Oleg Terletsky oleg.terletsky@comverse.com
* Copyright 2005 Oleg Terletsky <oleg.terletsky [AT] comverse.com>
* Copyright 2009 Varun Notibala <nbvarun [AT] gmail.com>
*
* $Id$
*
@ -100,7 +101,8 @@ typedef struct _sctp_info sctp_into_t;
#define SCTP_ECNE_CHUNK_ID 12
#define SCTP_CWR_CHUNK_ID 13
#define SCTP_SHUTDOWN_COMPLETE_CHUNK_ID 14
#define SCTP_AUTH_CHUNK_ID 0x16
#define SCTP_AUTH_CHUNK_ID 15
#define SCTP_NR_SACK_CHUNK_ID 16
#define SCTP_ASCONF_ACK_CHUNK_ID 0x80
#define SCTP_PKTDROP_CHUNK_ID 0x81
#define SCTP_FORWARD_TSN_CHUNK_ID 0xC0
@ -208,10 +210,10 @@ sctpstat_draw(void *phs)
{
sctpstat_t *hs=(sctpstat_t *)phs;
sctp_ep_t* list = hs->ep_list, *tmp=0;
char *str[14];
char *str[15];
int i=0;
for(i=0;i<14;i++) {
for(i=0;i<15;i++) {
str[i]=g_malloc(sizeof(char[256]));
}
/* Now print Message and Reason Counter Table */
@ -235,6 +237,7 @@ sctpstat_draw(void *phs)
g_snprintf(str[11], sizeof(char[256]),"%u", tmp->chunk_count[SCTP_COOKIE_ACK_CHUNK_ID]);
g_snprintf(str[12], sizeof(char[256]),"%u", tmp->chunk_count[SCTP_ABORT_CHUNK_ID]);
g_snprintf(str[13], sizeof(char[256]),"%u", tmp->chunk_count[SCTP_ERROR_CHUNK_ID]);
g_snprintf(str[14], sizeof(char[256]),"%u", tmp->chunk_count[SCTP_NR_SACK_CHUNK_ID]);
gtk_clist_append(hs->table, str);
}
@ -274,7 +277,8 @@ static const gchar *titles[]={
"COOKIE",
"COOKIE_ACK",
"ABORT",
"ERROR" };
"ERROR",
"NR_SACK" };
static void
sctpstat_init(const char *optarg, void *userdata _U_)
@ -308,7 +312,7 @@ sctpstat_init(const char *optarg, void *userdata _U_)
/* init a scrolled window*/
hs->scrolled_window = scrolled_window_new(NULL, NULL);
hs->table = create_stat_table(hs->scrolled_window, hs->vbox, 14, titles);
hs->table = create_stat_table(hs->scrolled_window, hs->vbox, 15, titles);
error_string=register_tap_listener("sctp", hs, filter,
sctpstat_reset,

View File

@ -1,5 +1,6 @@
/*
* Copyright 2004, Irene Ruengeler <i.ruengeler [AT] fh-muenster.de>
* Copyright 2009, Varun Notibala <nbvarun [AT] gmail.com>
*
* $Id$
*
@ -58,7 +59,12 @@ enum chunk_types {
SHUTDOWN_ACK = 8,
SCTP_ERROR = 9,
COOKIE_ECHO = 10,
COOKIE_ACK = 11
COOKIE_ACK = 11,
ECNE = 12,
CWR = 13,
SHUT_COMPLETE = 14,
AUTH = 15,
NR_SACK = 16
};
enum
{
@ -75,6 +81,11 @@ enum
ERROR_COLUMN,
COOKIE_ECHO_COLUMN,
COOKIE_ACK_COLUMN,
ECNE_COLUMN,
CWR_COLUMN,
SHUT_COMPLETE_COLUMN,
AUTH_COLUMN,
NR_SACK_COLUMN,
OTHERS_COLUMN,
N_COLUMN /* The number of columns */
};
@ -89,25 +100,30 @@ GtkWidget* create_list(void)
GtkTreeViewColumn *column;
GtkCellRenderer *renderer;
GtkTreeSortable *sortable;
GtkTreeView *list_view;
GtkTreeSelection *selection;
GtkTreeView *list_view;
GtkTreeSelection *selection;
/* Create the store */
list_store = gtk_list_store_new(N_COLUMN, /* Total number of columns XXX */
G_TYPE_STRING, /* IP Address */
G_TYPE_INT, /* DATA */
G_TYPE_INT, /* INIT */
G_TYPE_INT, /* INIT_ACK */
G_TYPE_INT, /* SACK */
G_TYPE_INT, /* HEARTBEAT */
G_TYPE_INT, /* HEARTBEAT_ACK */
G_TYPE_INT, /* ABORT */
G_TYPE_INT, /* SHUTDOWN */
G_TYPE_INT, /* SHUTDOWN_ACK */
G_TYPE_INT, /* ERROR */
G_TYPE_INT, /* COOKIE_ECHO */
G_TYPE_INT, /* COOKIE_ACK */
G_TYPE_INT); /* Others */
/* Create the store */
list_store = gtk_list_store_new(N_COLUMN, /* Total number of columns XXX */
G_TYPE_STRING, /* IP Address */
G_TYPE_INT, /* DATA */
G_TYPE_INT, /* INIT */
G_TYPE_INT, /* INIT_ACK */
G_TYPE_INT, /* SACK */
G_TYPE_INT, /* HEARTBEAT */
G_TYPE_INT, /* HEARTBEAT_ACK */
G_TYPE_INT, /* ABORT */
G_TYPE_INT, /* SHUTDOWN */
G_TYPE_INT, /* SHUTDOWN_ACK */
G_TYPE_INT, /* ERROR */
G_TYPE_INT, /* COOKIE_ECHO */
G_TYPE_INT, /* COOKIE_ACK */
G_TYPE_INT, /* ECNE */
G_TYPE_INT, /* CWR */
G_TYPE_INT, /* SHUT_COMPLETE */
G_TYPE_INT, /* AUTH */
G_TYPE_INT, /* NR_SACK */
G_TYPE_INT); /* Others */
/* Create a view */
list = gtk_tree_view_new_with_model (GTK_TREE_MODEL (list_store));
@ -127,11 +143,11 @@ GtkWidget* create_list(void)
g_object_unref (G_OBJECT (list_store));
/*
* Create the first column packet, associating the "text" attribute of the
* Create the first column packet, associating the "text" attribute of the
* cell_renderer to the first column of the model
*/
/* 1:st column */
renderer = gtk_cell_renderer_text_new ();
*/
/* 1:st column */
renderer = gtk_cell_renderer_text_new ();
column = gtk_tree_view_column_new_with_attributes ("IP Address", renderer,
"text", IP_ADDR_COLUMN,
NULL);
@ -152,7 +168,7 @@ GtkWidget* create_list(void)
gtk_tree_view_column_set_sort_column_id(column, DATA_COLUMN);
gtk_tree_view_column_set_resizable(column, TRUE);
gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED);
gtk_tree_view_column_set_min_width(column, 50);
gtk_tree_view_column_set_min_width(column, 70);
gtk_tree_view_append_column (list_view, column);
/* 3:d column... */
@ -163,7 +179,7 @@ GtkWidget* create_list(void)
gtk_tree_view_column_set_sort_column_id(column, INIT_COLUMN);
gtk_tree_view_column_set_resizable(column, TRUE);
gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED);
gtk_tree_view_column_set_min_width(column, 50);
gtk_tree_view_column_set_min_width(column, 70);
gtk_tree_view_append_column (list_view, column);
/* 4:th column... */
@ -174,10 +190,10 @@ GtkWidget* create_list(void)
gtk_tree_view_column_set_sort_column_id(column, INIT_ACK_COLUMN);
gtk_tree_view_column_set_resizable(column, TRUE);
gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED);
gtk_tree_view_column_set_min_width(column, 50);
gtk_tree_view_column_set_min_width(column, 80);
gtk_tree_view_append_column (list_view, column);
/* 5:th column... */
/* 5:th column... */
renderer = gtk_cell_renderer_text_new ();
column = gtk_tree_view_column_new_with_attributes ("SACK", renderer,
"text", SACK_COLUMN,
@ -185,7 +201,7 @@ GtkWidget* create_list(void)
gtk_tree_view_column_set_sort_column_id(column, SACK_COLUMN);
gtk_tree_view_column_set_resizable(column, TRUE);
gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED);
gtk_tree_view_column_set_min_width(column, 35);
gtk_tree_view_column_set_min_width(column, 70);
gtk_tree_view_append_column (list_view, column);
/* 6:th column... */
@ -196,7 +212,7 @@ GtkWidget* create_list(void)
gtk_tree_view_column_set_sort_column_id(column, HEARTBEAT_COLUMN);
gtk_tree_view_column_set_resizable(column, TRUE);
gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED);
gtk_tree_view_column_set_min_width(column, 60);
gtk_tree_view_column_set_min_width(column, 80);
gtk_tree_view_append_column (list_view, column);
/* 7:th column... */
@ -207,7 +223,7 @@ GtkWidget* create_list(void)
gtk_tree_view_column_set_sort_column_id(column, HEARTBEAT_ACK_COLUMN);
gtk_tree_view_column_set_resizable(column, TRUE);
gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED);
gtk_tree_view_column_set_min_width(column, 90);
gtk_tree_view_column_set_min_width(column, 120);
gtk_tree_view_append_column (list_view, column);
/* 8:th column... */
@ -218,7 +234,7 @@ GtkWidget* create_list(void)
gtk_tree_view_column_set_sort_column_id(column, ABORT_COLUMN);
gtk_tree_view_column_set_resizable(column, TRUE);
gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED);
gtk_tree_view_column_set_min_width(column, 40);
gtk_tree_view_column_set_min_width(column, 70);
gtk_tree_view_append_column (list_view, column);
@ -230,7 +246,7 @@ GtkWidget* create_list(void)
gtk_tree_view_column_set_sort_column_id(column, SHUTDOWN_COLUMN);
gtk_tree_view_column_set_resizable(column, TRUE);
gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED);
gtk_tree_view_column_set_min_width(column, 65);
gtk_tree_view_column_set_min_width(column, 70);
gtk_tree_view_append_column (list_view, column);
/* 10:th column... */
@ -241,7 +257,7 @@ GtkWidget* create_list(void)
gtk_tree_view_column_set_sort_column_id(column, SHUTDOWN_ACK_COLUMN);
gtk_tree_view_column_set_resizable(column, TRUE);
gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED);
gtk_tree_view_column_set_min_width(column, 90);
gtk_tree_view_column_set_min_width(column, 120);
gtk_tree_view_append_column (list_view, column);
/* 11:th column... */
@ -252,7 +268,7 @@ GtkWidget* create_list(void)
gtk_tree_view_column_set_sort_column_id(column, ERROR_COLUMN);
gtk_tree_view_column_set_resizable(column, TRUE);
gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED);
gtk_tree_view_column_set_min_width(column, 40);
gtk_tree_view_column_set_min_width(column, 70);
gtk_tree_view_append_column (list_view, column);
/* 12:th column... */
@ -263,7 +279,7 @@ GtkWidget* create_list(void)
gtk_tree_view_column_set_sort_column_id(column, COOKIE_ECHO_COLUMN);
gtk_tree_view_column_set_resizable(column, TRUE);
gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED);
gtk_tree_view_column_set_min_width(column, 80);
gtk_tree_view_column_set_min_width(column, 120);
gtk_tree_view_append_column (list_view, column);
/* 13:th column... */
@ -274,21 +290,76 @@ GtkWidget* create_list(void)
gtk_tree_view_column_set_sort_column_id(column, COOKIE_ACK_COLUMN);
gtk_tree_view_column_set_resizable(column, TRUE);
gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED);
gtk_tree_view_column_set_min_width(column, 80);
gtk_tree_view_column_set_min_width(column, 120);
gtk_tree_view_append_column (list_view, column);
/* 14:th column... */
renderer = gtk_cell_renderer_text_new ();
column = gtk_tree_view_column_new_with_attributes ("ECNE", renderer,
"text", ECNE_COLUMN,
NULL);
gtk_tree_view_column_set_sort_column_id(column, ECNE_COLUMN);
gtk_tree_view_column_set_resizable(column, TRUE);
gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED);
gtk_tree_view_column_set_min_width(column, 70);
gtk_tree_view_append_column (list_view, column);
/* 15:th column... */
renderer = gtk_cell_renderer_text_new ();
column = gtk_tree_view_column_new_with_attributes ("CWR", renderer,
"text", CWR_COLUMN,
NULL);
gtk_tree_view_column_set_sort_column_id(column, CWR_COLUMN);
gtk_tree_view_column_set_resizable(column, TRUE);
gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED);
gtk_tree_view_column_set_min_width(column, 70);
gtk_tree_view_append_column (list_view, column);
/* 16:th column... */
renderer = gtk_cell_renderer_text_new ();
column = gtk_tree_view_column_new_with_attributes ("SHUT_COMPLETE", renderer,
"text", SHUT_COMPLETE_COLUMN,
NULL);
gtk_tree_view_column_set_sort_column_id(column, SHUT_COMPLETE_COLUMN);
gtk_tree_view_column_set_resizable(column, TRUE);
gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED);
gtk_tree_view_column_set_min_width(column, 140);
gtk_tree_view_append_column (list_view, column);
/* 17:th column... */
renderer = gtk_cell_renderer_text_new ();
column = gtk_tree_view_column_new_with_attributes ("AUTH", renderer,
"text", AUTH_COLUMN,
NULL);
gtk_tree_view_column_set_sort_column_id(column, AUTH_COLUMN);
gtk_tree_view_column_set_resizable(column, TRUE);
gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED);
gtk_tree_view_column_set_min_width(column, 80);
gtk_tree_view_append_column (list_view, column);
/* 18:th column... */
renderer = gtk_cell_renderer_text_new ();
column = gtk_tree_view_column_new_with_attributes ("NR_SACK", renderer,
"text", NR_SACK_COLUMN,
NULL);
gtk_tree_view_column_set_sort_column_id(column, NR_SACK_COLUMN);
gtk_tree_view_column_set_resizable(column, TRUE);
gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED);
gtk_tree_view_column_set_min_width(column, 100);
gtk_tree_view_append_column (list_view, column);
/* 19:th column... */
renderer = gtk_cell_renderer_text_new ();
column = gtk_tree_view_column_new_with_attributes ("Others", renderer,
"text", OTHERS_COLUMN,
NULL);
gtk_tree_view_column_set_sort_column_id(column, OTHERS_COLUMN);
gtk_tree_view_column_set_resizable(column, TRUE);
gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED);
gtk_tree_view_column_set_min_width(column, 35);
gtk_tree_view_column_set_min_width(column, 70);
gtk_tree_view_append_column (list_view, column);
/* Now enable the sorting of each column */
/* Now enable the sorting of each column */
gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(list_view), TRUE);
gtk_tree_view_set_headers_clickable(GTK_TREE_VIEW(list_view), TRUE);
@ -318,6 +389,11 @@ static const char *chunk_name(int type)
CASE(SCTP_ERROR);
CASE(COOKIE_ECHO);
CASE(COOKIE_ACK);
CASE(ECNE);
CASE(CWR);
CASE(SHUT_COMPLETE);
CASE(AUTH);
CASE(NR_SACK);
}
return s;
}
@ -353,41 +429,43 @@ on_destroy(GtkObject *object _U_, gpointer user_data)
static void add_to_clist(sctp_addr_chunk* sac)
{
GtkListStore *list_store = NULL;
GtkTreeIter iter;
gchar field[1][MAX_ADDRESS_LEN];
GtkTreeIter iter;
gchar field[1][MAX_ADDRESS_LEN];
list_store = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW (clist))); /* Get store */
if (sac->addr->type==AT_IPv4)
{
g_snprintf(field[0], MAX_ADDRESS_LEN, "%s", ip_to_str((const guint8 *)(sac->addr->data)));
}
else if (sac->addr->type==AT_IPv6)
{
g_snprintf(field[0], MAX_ADDRESS_LEN, "%s", ip6_to_str((const struct e_in6_addr *)(sac->addr->data)));
}
list_store = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW (clist))); /* Get store */
if (sac->addr->type==AT_IPv4) {
g_snprintf(field[0], MAX_ADDRESS_LEN, "%s", ip_to_str((const guint8 *)(sac->addr->data)));
} else if (sac->addr->type==AT_IPv6) {
g_snprintf(field[0], MAX_ADDRESS_LEN, "%s", ip6_to_str((const struct e_in6_addr *)(sac->addr->data)));
}
#if GTK_CHECK_VERSION(2,6,0)
gtk_list_store_insert_with_values( list_store , &iter, G_MAXINT,
gtk_list_store_insert_with_values( list_store , &iter, G_MAXINT,
#else
gtk_list_store_append (list_store, &iter);
gtk_list_store_set (list_store, &iter,
gtk_list_store_append (list_store, &iter);
gtk_list_store_set (list_store, &iter,
#endif
IP_ADDR_COLUMN, field[0],
DATA_COLUMN, sac->addr_count[0],
INIT_COLUMN, sac->addr_count[1],
INIT_ACK_COLUMN, sac->addr_count[2],
SACK_COLUMN, sac->addr_count[3],
HEARTBEAT_COLUMN, sac->addr_count[4],
HEARTBEAT_ACK_COLUMN,sac->addr_count[5],
ABORT_COLUMN, sac->addr_count[6],
SHUTDOWN_COLUMN, sac->addr_count[7],
SHUTDOWN_ACK_COLUMN, sac->addr_count[8],
ERROR_COLUMN, sac->addr_count[9],
COOKIE_ECHO_COLUMN, sac->addr_count[10],
COOKIE_ACK_COLUMN, sac->addr_count[11],
OTHERS_COLUMN, sac->addr_count[12],
-1);
IP_ADDR_COLUMN, field[0],
DATA_COLUMN, sac->addr_count[0],
INIT_COLUMN, sac->addr_count[1],
INIT_ACK_COLUMN, sac->addr_count[2],
SACK_COLUMN, sac->addr_count[3],
HEARTBEAT_COLUMN, sac->addr_count[4],
HEARTBEAT_ACK_COLUMN, sac->addr_count[5],
ABORT_COLUMN, sac->addr_count[6],
SHUTDOWN_COLUMN, sac->addr_count[7],
SHUTDOWN_ACK_COLUMN, sac->addr_count[8],
ERROR_COLUMN, sac->addr_count[9],
COOKIE_ECHO_COLUMN, sac->addr_count[10],
COOKIE_ACK_COLUMN, sac->addr_count[11],
ECNE_COLUMN, sac->addr_count[12],
CWR_COLUMN, sac->addr_count[13],
SHUT_COMPLETE_COLUMN, sac->addr_count[14],
AUTH_COLUMN, sac->addr_count[15],
NR_SACK_COLUMN, sac->addr_count[16],
OTHERS_COLUMN, sac->addr_count[17],
-1);
}
void sctp_chunk_stat_dlg_update(struct sctp_udata* udata, unsigned int direction)
@ -466,7 +544,7 @@ gtk_sctpstat_dlg(struct sctp_udata *u_data, unsigned int direction)
io->window=NULL;
u_data->io=io;
u_data->io->window= gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_default_size(GTK_WINDOW(u_data->io->window), 600, 300);
gtk_window_set_default_size(GTK_WINDOW(u_data->io->window), 850, 200);
gtk_window_set_position (GTK_WINDOW (u_data->io->window), GTK_WIN_POS_CENTER);
path_window_set_title(u_data, direction);
g_signal_connect(u_data->io->window, "destroy", G_CALLBACK(chunk_dlg_destroy), u_data);
@ -531,7 +609,7 @@ static void sctp_chunk_dlg(struct sctp_udata *u_data)
u_data->io=io;
u_data->io->window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_position (GTK_WINDOW (u_data->io->window), GTK_WIN_POS_CENTER);
gtk_widget_set_size_request(u_data->io->window, 500, 400);
gtk_widget_set_size_request(u_data->io->window, 500, 650);
g_signal_connect(u_data->io->window, "destroy", G_CALLBACK(on_destroy), u_data);
/* Container for each row of widgets */
@ -592,15 +670,15 @@ static void sctp_chunk_dlg(struct sctp_udata *u_data)
label = gtk_label_new("Others");
gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, row, row+1);
g_snprintf(label_txt, 10, "%u", selected_stream->chunk_count[12]);
g_snprintf(label_txt, 10, "%u", selected_stream->chunk_count[OTHER_CHUNKS_INDEX]);
label = gtk_label_new(label_txt);
gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
gtk_table_attach_defaults(GTK_TABLE(table), label, 1, 2, row, row+1);
g_snprintf(label_txt, 10, "%u", selected_stream->ep1_chunk_count[12]);
g_snprintf(label_txt, 10, "%u", selected_stream->ep1_chunk_count[OTHER_CHUNKS_INDEX]);
label = gtk_label_new(label_txt);
gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
gtk_table_attach_defaults(GTK_TABLE(table), label, 2, 3, row, row+1);
g_snprintf(label_txt, 10, "%u", selected_stream->ep2_chunk_count[12]);
g_snprintf(label_txt, 10, "%u", selected_stream->ep2_chunk_count[OTHER_CHUNKS_INDEX]);
label = gtk_label_new(label_txt);
gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
gtk_table_attach_defaults(GTK_TABLE(table), label, 3, 4, row, row+1);

View File

@ -1,5 +1,6 @@
/*
* Copyright 2004, Irene Ruengeler <i.ruengeler [AT] fh-muenster.de>
* Copyright 2009, Varun Notibala <nbvarun [AT] gmail.com>
*
* $Id$
*
@ -65,6 +66,15 @@
#define SUB_32(a, b) a-b
#define POINT_SIZE 3
GtkWidget * sack_bt;
/*
* Global variables that help in redrawing graph
* for SACK and NRSACK
*/
guint8 gIsSackChunkPresent = 0;
guint8 gIsNRSackChunkPresent = 0;
struct chunk_header {
guint8 type;
guint8 flags;
@ -108,6 +118,18 @@ struct sack_chunk_header {
struct gaps gaps[1];
};
struct nr_sack_chunk_header {
guint8 type;
guint8 flags;
guint16 length;
guint32 cum_tsn_ack;
guint32 a_rwnd;
guint16 nr_of_gaps;
guint16 nr_of_nr_gaps;
guint16 nr_of_dups;
guint16 reserved;
struct gaps gaps[1];
};
static gboolean label_set = FALSE;
static guint32 max_tsn=0, min_tsn=0;
@ -179,6 +201,7 @@ static void draw_sack_graph(struct sctp_udata *u_data)
if (type == SCTP_SACK_CHUNK_ID)
{
gIsSackChunkPresent = 1;
sack_header =(struct sack_chunk_header *)tlist->data;
nr=g_ntohs(sack_header->nr_of_gaps);
tsnumber = g_ntohl(sack_header->cum_tsn_ack);
@ -234,8 +257,8 @@ static void draw_sack_graph(struct sctp_udata *u_data)
POINT_SIZE, POINT_SIZE,0, (64*360) );
}
}
tlist = g_list_next(tlist);
}
tlist = g_list_next(tlist);
}
list = g_list_previous(list);
}
@ -243,6 +266,175 @@ static void draw_sack_graph(struct sctp_udata *u_data)
g_object_unref(G_OBJECT(green_gc));
}
/*
* This function plots the NR_SACK gap ack and
* nr gap acks.
* Red dot - Cumulative TSN ack
* Green dot - Gap ack
* Blue circle - NR Gap ack
*/
static void draw_nr_sack_graph(struct sctp_udata *u_data)
{
tsn_t *sack;
GList *list=NULL, *tlist;
guint16 gap_start=0, gap_end=0, i, j, numberOf_gaps, numberOf_nr_gaps;
guint8 type;
guint32 tsnumber;
gint xvalue, yvalue;
GdkColor red_color = {0, 65535, 0, 0};
GdkColor blue_color = {0, 0, 0, 65535};
GdkColor green_color = {0, 0, 65535, 0};
GdkGC *red_gc, *blue_gc, *green_gc;
struct nr_sack_chunk_header *nr_sack_header;
struct gaps *nr_gap;
guint32 max_num, diff;
/* This holds the sum of gap acks and nr gap acks */
guint16 total_gaps = 0;
red_gc = gdk_gc_new(u_data->io->draw_area->window);
gdk_gc_set_rgb_fg_color(red_gc, &red_color);
blue_gc = gdk_gc_new(u_data->io->draw_area->window);
gdk_gc_set_rgb_fg_color(blue_gc, &blue_color);
green_gc = gdk_gc_new(u_data->io->draw_area->window);
gdk_gc_set_rgb_fg_color(green_gc, &green_color);
if (u_data->dir==2)
{
list = g_list_last(u_data->assoc->sack2);
if (u_data->io->tmp==FALSE)
{
min_tsn=u_data->assoc->min_tsn2;
max_tsn=u_data->assoc->max_tsn2;
}
else
{
min_tsn=u_data->assoc->min_tsn2+u_data->io->tmp_min_tsn2;
max_tsn=u_data->assoc->min_tsn2+u_data->io->tmp_max_tsn2;
}
}
else if (u_data->dir==1)
{
list = g_list_last(u_data->assoc->sack1);
if (u_data->io->tmp==FALSE)
{
min_tsn=u_data->assoc->min_tsn1;
max_tsn=u_data->assoc->max_tsn1;
}
else
{
min_tsn=u_data->assoc->min_tsn1+u_data->io->tmp_min_tsn1;
max_tsn=u_data->assoc->min_tsn1+u_data->io->tmp_max_tsn1;
}
}
while (list)
{
sack = (tsn_t*) (list->data);
tlist = g_list_first(sack->tsns);
while (tlist)
{
type = ((struct chunk_header *)tlist->data)->type;
/*
* The tlist->data is memcpy ied to the appropriate structure
* They entire raw tvb bytes are copied on to one of the *_chunk_header
* structures in sctp_stat.c
*/
if (type == SCTP_NR_SACK_CHUNK_ID)
{
gIsNRSackChunkPresent = 1;
nr_sack_header =(struct nr_sack_chunk_header *)tlist->data;
numberOf_nr_gaps=g_ntohs(nr_sack_header->nr_of_nr_gaps);
numberOf_gaps=g_ntohs(nr_sack_header->nr_of_gaps);
tsnumber = g_ntohl(nr_sack_header->cum_tsn_ack);
total_gaps = numberOf_gaps + numberOf_nr_gaps;
if (sack->secs>=u_data->io->x1_tmp_sec)
{
/* If the number of nr_gaps is greater than 0 */
if ( total_gaps > 0 )
{
nr_gap = &nr_sack_header->gaps[0];
for ( i=0; i < total_gaps; i++ )
{
gap_start=g_ntohs(nr_gap->start);
gap_end = g_ntohs(nr_gap->end);
max_num= gap_end + tsnumber;
for ( j = gap_start; j <= gap_end; j++)
{
if (u_data->io->uoff)
diff = sack->secs - u_data->io->min_x;
else
diff=sack->secs*1000000+sack->usecs-u_data->io->min_x;
xvalue = (guint32)(LEFT_BORDER+u_data->io->offset+u_data->io->x_interval*diff);
yvalue = (guint32)(u_data->io->pixmap_height-BOTTOM_BORDER-POINT_SIZE-u_data->io->offset-((SUB_32(j+tsnumber,min_tsn))*u_data->io->y_interval));
if (xvalue >= LEFT_BORDER+u_data->io->offset &&
xvalue <= u_data->io->pixmap_width-RIGHT_BORDER+u_data->io->offset &&
yvalue >= TOP_BORDER-u_data->io->offset &&
yvalue <= u_data->io->pixmap_height-BOTTOM_BORDER-u_data->io->offset)
{
/* Check if this is an GAP ACK or NR GAP ACK */
if ( i >= numberOf_gaps)
{
/* This is a nr gap ack */
gdk_draw_arc(u_data->io->pixmap,blue_gc,FALSE,
xvalue,
yvalue,
POINT_SIZE , POINT_SIZE,0, (64*360) );
/* All NR GAP Acks are also gap acks, so plot these as
* gap acks - green dot.
* These will be shown as points with a green dot - GAP ACK
* surrounded by a blue circle - NR GAP ack
*/
gdk_draw_arc(u_data->io->pixmap, green_gc, TRUE,
xvalue,
yvalue,
POINT_SIZE , POINT_SIZE,0, (64*360) );
}
else
{
/* This is just a gap ack */
gdk_draw_arc(u_data->io->pixmap, green_gc, TRUE,
xvalue,
yvalue,
POINT_SIZE , POINT_SIZE,0, (64*360) );
}
}
}
if (i < total_gaps-1)
nr_gap++;
}
}
else
max_num=tsnumber;
if (tsnumber>=min_tsn)
{
if (u_data->io->uoff)
diff = sack->secs - u_data->io->min_x;
else
diff=sack->secs*1000000+sack->usecs-u_data->io->min_x;
xvalue = (guint32)(LEFT_BORDER+u_data->io->offset+u_data->io->x_interval*diff);
yvalue = (guint32)(u_data->io->pixmap_height-BOTTOM_BORDER-POINT_SIZE -u_data->io->offset-((SUB_32(tsnumber,min_tsn))*u_data->io->y_interval));
if (xvalue >= LEFT_BORDER+u_data->io->offset &&
xvalue <= u_data->io->pixmap_width-RIGHT_BORDER+u_data->io->offset &&
yvalue >= TOP_BORDER-u_data->io->offset &&
yvalue <= u_data->io->pixmap_height-BOTTOM_BORDER-u_data->io->offset)
gdk_draw_arc(u_data->io->pixmap,red_gc,TRUE,
xvalue,
yvalue,
POINT_SIZE, POINT_SIZE,0, (64*360) );
}
}
}
tlist = g_list_next(tlist);
}
list = g_list_previous(list);
}
g_object_unref(G_OBJECT(red_gc));
g_object_unref(G_OBJECT(blue_gc));
g_object_unref(G_OBJECT(green_gc));
}
static void draw_tsn_graph(struct sctp_udata *u_data)
{
@ -614,6 +806,25 @@ static void sctp_graph_draw(struct sctp_udata *u_data)
simple_dialog(ESD_TYPE_INFO, ESD_BTN_OK, "No Data Chunks sent");
}
/* This function is used to change the title
* in the graph dialogue to NR_SACK or SACK based on the
* association
* If an association has both SAKC and NR_SACK PDU's
* a warning is popped
*/
void updateLabels()
{
if (gIsSackChunkPresent && gIsNRSackChunkPresent)
{
simple_dialog(ESD_TYPE_INFO, ESD_BTN_OK, "This data set contains both SACK and NR SACK PDUs.");
gtk_button_set_label( (GtkButton*) sack_bt, "Show both Sack and NR Sack");
}
else if (gIsSackChunkPresent)
gtk_button_set_label( (GtkButton*) sack_bt, "Show Only Sack");
else
/* gIsNRSackChunkPresent will be true here */
gtk_button_set_label( (GtkButton*) sack_bt, "Show Only NR Sack");
}
static void sctp_graph_redraw(struct sctp_udata *u_data)
{
@ -625,18 +836,36 @@ sctp_graph_t *ios;
switch (u_data->io->graph_type)
{
case 0:
/* Show both TSN and SACK information
* Reset the global sack variable
* for sack and nr sack cases
*/
gIsSackChunkPresent = 0;
gIsNRSackChunkPresent = 0;
draw_sack_graph(u_data);
draw_nr_sack_graph(u_data);
draw_tsn_graph(u_data);
break;
case 1:
/* Show only TSN */
draw_tsn_graph(u_data);
break;
case 2:
/* Show only SACK information
* Reset the global sack variable
* for sack and nr sack cases
*/
gIsSackChunkPresent = 0;
gIsNRSackChunkPresent = 0;
draw_sack_graph(u_data);
draw_nr_sack_graph(u_data);
break;
}
ios=(sctp_graph_t *)g_object_get_data(G_OBJECT(u_data->io->draw_area), "sctp_graph_t");
/* Updates the sack / nr sack buttons */
updateLabels();
ios=(sctp_graph_t *)g_object_get_data(G_OBJECT(u_data->io->draw_area), "sctp_graph_t");
if(!ios){
exit(10);
}
@ -1113,7 +1342,7 @@ static void init_sctp_graph_window(struct sctp_udata *u_data)
{
GtkWidget *vbox;
GtkWidget *hbox;
GtkWidget *bt_close, *sack_bt, *tsn_bt, *both_bt, *zoomin_bt;
GtkWidget *bt_close, *tsn_bt, *both_bt, *zoomin_bt;
GtkTooltips *tooltip_in, *tooltip_out;
/* create the main window */
@ -1137,14 +1366,12 @@ static void init_sctp_graph_window(struct sctp_udata *u_data)
gtk_box_set_spacing(GTK_BOX (hbox), 0);
gtk_box_set_child_packing(GTK_BOX(vbox), hbox, FALSE, FALSE, 0, GTK_PACK_START);
gtk_widget_show(hbox);
sack_bt = gtk_button_new_with_label ("Show Sacks");
sack_bt = gtk_button_new_with_label ("Show Only Sacks");
gtk_box_pack_start(GTK_BOX(hbox), sack_bt, FALSE, FALSE, 0);
gtk_widget_show(sack_bt);
g_signal_connect(sack_bt, "clicked", G_CALLBACK(on_sack_bt), u_data);
tsn_bt = gtk_button_new_with_label ("Show TSNs");
tsn_bt = gtk_button_new_with_label ("Show Only TSNs");
gtk_box_pack_start(GTK_BOX(hbox), tsn_bt, FALSE, FALSE, 0);
gtk_widget_show(tsn_bt);
g_signal_connect(tsn_bt, "clicked", G_CALLBACK(on_tsn_bt), u_data);

View File

@ -56,6 +56,8 @@
#define SCTP_ECNE_CHUNK_ID 12
#define SCTP_CWR_CHUNK_ID 13
#define SCTP_SHUTDOWN_COMPLETE_CHUNK_ID 14
#define SCTP_AUTH_CHUNK_ID 15
#define SCTP_NR_SACK_CHUNK_ID 16
#define SCTP_FORWARD_TSN_CHUNK_ID 192
#define SCTP_ASCONF_ACK_CHUNK_ID 0x80
#define SCTP_PKTDROP_CHUNK_ID 0X81
@ -119,6 +121,8 @@ static const value_string chunk_type_values[] = {
{ SCTP_PKTDROP_CHUNK_ID, "PKTDROP" },
{ SCTP_ASCONF_CHUNK_ID, "ASCONF" },
{ SCTP_IETF_EXT, "IETF_EXTENSION" },
{ SCTP_NR_SACK_CHUNK_ID, "NR_SACK" },
{ SCTP_AUTH_CHUNK_ID, "AUTH" },
{ 0, NULL } };
@ -469,8 +473,11 @@ static sctp_assoc_info_t * add_chunk_count(address * vadd, sctp_assoc_info_t * i
{
v = (address *) (ch->addr);
if (ADDRESSES_EQUAL(vadd, v))
{
ch->addr_count[type]++;
{
if (type <= UPPER_BOUND_CHUNK_TYPE)
ch->addr_count[type]++;
else
ch->addr_count[OTHER_CHUNKS_INDEX]++;
return info;
}
else
@ -489,11 +496,15 @@ static sctp_assoc_info_t * add_chunk_count(address * vadd, sctp_assoc_info_t * i
dat = g_malloc(vadd->len);
memcpy(dat, vadd->data, vadd->len);
ch->addr->data = dat;
for (i=0; i<13; i++)
for (i=0; i < NUM_CHUNKS; i++)
ch->addr_count[i] = 0;
ch->addr_count[type]++;
info->addr_chunk_count = g_list_append(info->addr_chunk_count, ch);
if (type <= UPPER_BOUND_CHUNK_TYPE)
ch->addr_count[type]++;
else
ch->addr_count[OTHER_CHUNKS_INDEX]++;
info->addr_chunk_count = g_list_append(info->addr_chunk_count, ch);
return info;
}
@ -545,6 +556,7 @@ packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , const v
struct tsn_sort *tsn_s;
guint8* addr = NULL;
int i;
guint8 index = 0;
sctp_allassocs_info_t *assoc_info=NULL;
assoc_info = &sctp_tapinfo_struct;
@ -682,7 +694,8 @@ packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , const v
if (((tvb_get_guint8(sctp_info->tvb[0],0)) == SCTP_INIT_CHUNK_ID) ||
((tvb_get_guint8(sctp_info->tvb[0],0)) == SCTP_INIT_ACK_CHUNK_ID) ||
((tvb_get_guint8(sctp_info->tvb[0],0)) == SCTP_DATA_CHUNK_ID) ||
((tvb_get_guint8(sctp_info->tvb[0],0)) == SCTP_SACK_CHUNK_ID))
((tvb_get_guint8(sctp_info->tvb[0],0)) == SCTP_SACK_CHUNK_ID) ||
((tvb_get_guint8(sctp_info->tvb[0],0)) == SCTP_NR_SACK_CHUNK_ID))
{
tsn = g_malloc(sizeof(tsn_t));
sack = g_malloc(sizeof(tsn_t));
@ -709,7 +722,8 @@ packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , const v
sack->secs=tsn->secs = (guint32)pinfo->fd->rel_ts.secs;
sack->usecs=tsn->usecs = (guint32)pinfo->fd->rel_ts.nsecs/1000;
if (((tvb_get_guint8(sctp_info->tvb[0],0)) == SCTP_DATA_CHUNK_ID) ||
((tvb_get_guint8(sctp_info->tvb[0],0)) == SCTP_SACK_CHUNK_ID))
((tvb_get_guint8(sctp_info->tvb[0],0)) == SCTP_SACK_CHUNK_ID) ||
((tvb_get_guint8(sctp_info->tvb[0],0)) == SCTP_NR_SACK_CHUNK_ID))
{
if (tsn->secs < info->min_secs)
{
@ -768,16 +782,22 @@ packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , const v
info->initack_dir = 1;
info->initack = TRUE;
}
info->chunk_count[tvb_get_guint8(sctp_info->tvb[0],0)]++;
info->ep1_chunk_count[tvb_get_guint8(sctp_info->tvb[0],0)]++;
info = add_chunk_count(&tmp_info.src, info, 1, tvb_get_guint8(sctp_info->tvb[0],0));
index = tvb_get_guint8(sctp_info->tvb[0],0);
if (index > UPPER_BOUND_CHUNK_TYPE)
index = OTHER_CHUNKS_INDEX;
info->chunk_count[index]++;
info->ep1_chunk_count[index]++;
info = add_chunk_count(&tmp_info.src, info, 1, index);
}
else
{
if (((tvb_get_guint8(sctp_info->tvb[0],0)) != SCTP_INIT_CHUNK_ID) &&
((tvb_get_guint8(sctp_info->tvb[0],0)) != SCTP_INIT_ACK_CHUNK_ID) &&
((tvb_get_guint8(sctp_info->tvb[0],0)) != SCTP_DATA_CHUNK_ID) &&
((tvb_get_guint8(sctp_info->tvb[0],0)) != SCTP_SACK_CHUNK_ID))
((tvb_get_guint8(sctp_info->tvb[0],0)) != SCTP_SACK_CHUNK_ID) &&
((tvb_get_guint8(sctp_info->tvb[0],0)) != SCTP_NR_SACK_CHUNK_ID))
{
tsn = g_malloc(sizeof(tsn_t));
sack = g_malloc(sizeof(tsn_t));
@ -788,18 +808,14 @@ packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , const v
}
for (chunk_number = 0; chunk_number < sctp_info->number_of_tvbs; chunk_number++)
{
if ((tvb_get_guint8(sctp_info->tvb[chunk_number],0)) < 12)
{
info->chunk_count[tvb_get_guint8(sctp_info->tvb[0],0)]++;
info->ep1_chunk_count[tvb_get_guint8(sctp_info->tvb[0],0)]++;
info = add_chunk_count(&tmp_info.src, info, 1, tvb_get_guint8(sctp_info->tvb[0],0));
}
else
{
info->chunk_count[12]++;
info->ep1_chunk_count[12]++;
info = add_chunk_count(&tmp_info.src, info, 1, 12);
}
index = tvb_get_guint8(sctp_info->tvb[0],0);
if ( index > UPPER_BOUND_CHUNK_TYPE )
index = OTHER_CHUNKS_INDEX;
info->chunk_count[index]++;
info->ep1_chunk_count[index]++;
info = add_chunk_count(&tmp_info.src, info, 1, index);
if (tvb_get_guint8(sctp_info->tvb[chunk_number],0) == SCTP_DATA_CHUNK_ID)
{
length = tvb_get_ntohs(sctp_info->tvb[chunk_number], CHUNK_LENGTH_OFFSET)-DATA_CHUNK_HEADER_LENGTH;
@ -832,7 +848,8 @@ packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , const v
g_ptr_array_add(info->sort_tsn1, tsn_s);
info->n_array_tsn1++;
}
if (tvb_get_guint8(sctp_info->tvb[chunk_number],0) == SCTP_SACK_CHUNK_ID)
if ((tvb_get_guint8(sctp_info->tvb[chunk_number],0) == SCTP_SACK_CHUNK_ID) ||
(tvb_get_guint8(sctp_info->tvb[chunk_number],0) == SCTP_NR_SACK_CHUNK_ID) )
{
tsnumber = tvb_get_ntohl((sctp_info->tvb)[chunk_number], SACK_CHUNK_CUMULATIVE_TSN_ACK_OFFSET);
if (tsnumber < info->min_tsn2)
@ -905,7 +922,8 @@ packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , const v
if (((tvb_get_guint8(sctp_info->tvb[0],0)) == SCTP_INIT_CHUNK_ID) ||
((tvb_get_guint8(sctp_info->tvb[0],0)) == SCTP_INIT_ACK_CHUNK_ID) ||
((tvb_get_guint8(sctp_info->tvb[0],0)) == SCTP_DATA_CHUNK_ID) ||
((tvb_get_guint8(sctp_info->tvb[0],0)) == SCTP_SACK_CHUNK_ID))
((tvb_get_guint8(sctp_info->tvb[0],0)) == SCTP_SACK_CHUNK_ID) ||
((tvb_get_guint8(sctp_info->tvb[0],0)) == SCTP_NR_SACK_CHUNK_ID))
{
tsn = g_malloc(sizeof(tsn_t));
@ -933,7 +951,8 @@ packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , const v
sack->secs=tsn->secs = (guint32)pinfo->fd->rel_ts.secs;
sack->usecs=tsn->usecs = (guint32)pinfo->fd->rel_ts.nsecs/1000;
if (((tvb_get_guint8(sctp_info->tvb[0],0)) == SCTP_DATA_CHUNK_ID) ||
((tvb_get_guint8(sctp_info->tvb[0],0)) == SCTP_SACK_CHUNK_ID))
((tvb_get_guint8(sctp_info->tvb[0],0)) == SCTP_SACK_CHUNK_ID) ||
((tvb_get_guint8(sctp_info->tvb[0],0)) == SCTP_NR_SACK_CHUNK_ID))
{
if (tsn->secs < info->min_secs)
{
@ -1006,12 +1025,16 @@ packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , const v
/*info->initack_dir=1;*/
info->tsn1 = g_list_prepend(info->tsn1, tsn);
}
info->chunk_count[tvb_get_guint8(sctp_info->tvb[0],0)]++;
index = tvb_get_guint8(sctp_info->tvb[0],0);
if (index > UPPER_BOUND_CHUNK_TYPE)
index = OTHER_CHUNKS_INDEX;
info->chunk_count[index]++;
if (info->direction == 1)
info->ep1_chunk_count[tvb_get_guint8(sctp_info->tvb[0],0)]++;
info->ep1_chunk_count[index]++;
else
info->ep2_chunk_count[tvb_get_guint8(sctp_info->tvb[0],0)]++;
info = add_chunk_count(&tmp_info.src, info, info->direction, tvb_get_guint8(sctp_info->tvb[0],0));
info->ep2_chunk_count[index]++;
info = add_chunk_count(&tmp_info.src, info, info->direction, index);
for (chunk_number = 1; chunk_number < sctp_info->number_of_tvbs; chunk_number++)
{
type = tvb_get_ntohs(sctp_info->tvb[chunk_number],0);
@ -1049,7 +1072,8 @@ packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , const v
{
if (((tvb_get_guint8(sctp_info->tvb[0],0)) != SCTP_INIT_ACK_CHUNK_ID) &&
((tvb_get_guint8(sctp_info->tvb[0],0)) != SCTP_DATA_CHUNK_ID) &&
((tvb_get_guint8(sctp_info->tvb[0],0)) != SCTP_SACK_CHUNK_ID))
((tvb_get_guint8(sctp_info->tvb[0],0)) != SCTP_SACK_CHUNK_ID) &&
((tvb_get_guint8(sctp_info->tvb[0],0)) != SCTP_NR_SACK_CHUNK_ID))
{
sack = g_malloc(sizeof(tsn_t));
sack->tsns = NULL;
@ -1060,24 +1084,17 @@ packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , const v
}
for (chunk_number = 0; chunk_number < sctp_info->number_of_tvbs; chunk_number++)
{
if ((tvb_get_guint8(sctp_info->tvb[chunk_number],0)) < 12)
{
info->chunk_count[tvb_get_guint8(sctp_info->tvb[chunk_number],0)]++;
if (info->direction == 1)
info->ep1_chunk_count[tvb_get_guint8(sctp_info->tvb[chunk_number],0)]++;
else
info->ep2_chunk_count[tvb_get_guint8(sctp_info->tvb[chunk_number],0)]++;
info = add_chunk_count(&tmp_info.src, info,info->direction, tvb_get_guint8(sctp_info->tvb[chunk_number],0));
}
index = tvb_get_guint8(sctp_info->tvb[chunk_number],0);
if (index > UPPER_BOUND_CHUNK_TYPE)
index = OTHER_CHUNKS_INDEX;
info->chunk_count[index]++;
if (info->direction == 1)
info->ep1_chunk_count[index]++;
else
{
info->chunk_count[12]++;
if (info->direction == 1)
info->ep1_chunk_count[12]++;
else
info->ep2_chunk_count[12]++;
info = add_chunk_count(&tmp_info.src, info, info->direction,12);
}
info->ep2_chunk_count[index]++;
info = add_chunk_count(&tmp_info.src, info,info->direction, index);
if ((tvb_get_guint8(sctp_info->tvb[chunk_number],0)) == SCTP_DATA_CHUNK_ID)
{
tsnumber = tvb_get_ntohl((sctp_info->tvb)[chunk_number], DATA_CHUNK_TSN_OFFSET);
@ -1151,7 +1168,8 @@ packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , const v
info->n_array_tsn2++;
}
}
else if (tvb_get_guint8(sctp_info->tvb[chunk_number],0) == SCTP_SACK_CHUNK_ID)
else if ((tvb_get_guint8(sctp_info->tvb[chunk_number],0) == SCTP_SACK_CHUNK_ID) ||
(tvb_get_guint8(sctp_info->tvb[chunk_number],0) == SCTP_NR_SACK_CHUNK_ID))
{
tsnumber = tvb_get_ntohl((sctp_info->tvb)[chunk_number], SACK_CHUNK_CUMULATIVE_TSN_ACK_OFFSET);
length = tvb_get_ntohs(sctp_info->tvb[chunk_number], CHUNK_LENGTH_OFFSET);

View File

@ -46,6 +46,7 @@
#define SCTP_ERROR_CHUNK_ID 9
#define SCTP_COOKIE_ECHO_CHUNK_ID 10
#define SCTP_COOKIE_ACK_CHUNK_ID 11
#define SCTP_NR_SACK_CHUNK_ID 16
#define CHUNK_TYPE_LENGTH 1
#define CHUNK_FLAGS_LENGTH 1
@ -85,7 +86,40 @@
DATA_CHUNK_STREAM_SEQ_NUMBER_LENGTH + \
DATA_CHUNK_PAYLOAD_PROTOCOL_ID_LENGTH)
#define MAX_ADDRESS_LEN 47
#define NUM_CHUNKS 13
/*
* The NUM_CHUNKS field is used as the bound on the size of
* counter arrays that store the sctp chunk counts for each
* "Chunk Type" in a given association.
* UPPER_BOUND_CHUNK_TYPE variable is the upper bound on the
* "Chunk Type" field of an SCTP PDU, which will be
* interpreted by the current version of wireshark for
* displaying statistical information.
* As per RFC 4960 Chunk Types 0 to 14 are in use.
* Chunk Type 15 is AUTHENTICATION CHUNK defined in RFC 4895
* The Chunk Type 16 is to be assigned to Non Renagable Sacks
* This version of wireshark will interpret chunk types from 0
* to 16 and information corresponding to all chunk types
* > 16 are summed up and stored as "other" chunks at
* an index of 17 in appropriate data structures.
*/
#define UPPER_BOUND_CHUNK_TYPE 16
/* The below value is 18 */
#define NUM_CHUNKS UPPER_BOUND_CHUNK_TYPE+2
/* This variable is used as an index into arrays
* which store the cumulative information corresponding
* all chunks with Chunk Type greater > 16
* The value for the below variable is 17
*/
#define OTHER_CHUNKS_INDEX NUM_CHUNKS-1
/* VNB */
/* This variable stores the maximum chunk type value
* that can be associated with a sctp chunk.
*/
#define MAX_SCTP_CHUNK_TYPE 256
typedef struct _tsn {
guint32 frame_number;
@ -132,7 +166,11 @@ struct tsn_sort{
typedef struct _sctp_addr_chunk {
guint32 direction;
address* addr;
guint32 addr_count[13];
/* The array is initialized to MAX_SCTP_CHUNK_TYPE
* so that there is no memory overwrite
* when accessed using sctp chunk type as index.
*/
guint32 addr_count[MAX_SCTP_CHUNK_TYPE];
} sctp_addr_chunk;
typedef struct _sctp_assoc_info {
@ -199,9 +237,13 @@ typedef struct _sctp_assoc_info {
GList *sack2;
gboolean check_address;
GList* error_info_list;
guint32 chunk_count[NUM_CHUNKS];
guint32 ep1_chunk_count[NUM_CHUNKS];
guint32 ep2_chunk_count[NUM_CHUNKS];
/* The array is initialized to MAX_SCTP_CHUNK_TYPE
* so that there is no memory overwrite
* when accessed using sctp chunk type as index.
*/
guint32 chunk_count[MAX_SCTP_CHUNK_TYPE];
guint32 ep1_chunk_count[MAX_SCTP_CHUNK_TYPE];
guint32 ep2_chunk_count[MAX_SCTP_CHUNK_TYPE];
GList* addr_chunk_count;
} sctp_assoc_info_t;