aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ppcap.c
diff options
context:
space:
mode:
authorAndersBroman <anders.broman@ericsson.com>2016-01-12 13:40:13 +0100
committerAnders Broman <a.broman58@gmail.com>2016-01-12 16:50:58 +0000
commit01d2ab3925a1523e85d4c84086bbc939e6eecd70 (patch)
tree172eeed00fa532350c1155746e9d838c932a5bf2 /epan/dissectors/packet-ppcap.c
parentacffba2e5cea8ea943898af9a33c640ea89a14b9 (diff)
[PPCAP] Add dissection of IE SCTP Association.
Change-Id: I48a14291205b14bc1eeade9b363c9e1d68d2eb9b Reviewed-on: https://code.wireshark.org/review/13223 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-ppcap.c')
-rw-r--r--epan/dissectors/packet-ppcap.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/epan/dissectors/packet-ppcap.c b/epan/dissectors/packet-ppcap.c
index a3156edddc..fa59e0543c 100644
--- a/epan/dissectors/packet-ppcap.c
+++ b/epan/dissectors/packet-ppcap.c
@@ -103,6 +103,7 @@ static int hf_ppcap_payload_data = -1;
static int hf_ppcap_local_port = -1;
static int hf_ppcap_remote_port = -1;
static int hf_ppcap_transport_prot = -1;
+static int hf_ppcap_sctp_assoc = -1;
/* Initiliaze the subtree pointers*/
@@ -500,6 +501,18 @@ dissect_ppcap_transport_protocol(tvbuff_t *tvb,proto_tree * ppcap_tree1, int off
static int
dissect_ppcap_sctp_assoc(tvbuff_t *tvb _U_, proto_tree * tree _U_, int offset)
{
+ guint16 length;
+ length = tvb_get_ntohs(tvb, offset);
+
+ proto_tree_add_item(tree, hf_ppcap_length, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset = offset + 2;
+
+ proto_tree_add_item(tree, hf_ppcap_sctp_assoc, tvb, offset, length, ENC_ASCII | ENC_NA);
+
+ if (length % 4)
+ length = length + (4 - (length % 4));
+ offset += length;
+
return offset;
}
@@ -656,6 +669,9 @@ module_t *ppcap_module;
{ &hf_ppcap_transport_prot,
{ "Transport Protocol" , "ppcap.transport_prot", FT_STRING,
BASE_NONE, NULL, 0x0 , NULL, HFILL}},
+ { &hf_ppcap_sctp_assoc,
+ { "SCTP Association ID" , "ppcap.sctp_assoc", FT_STRING,
+ BASE_NONE, NULL, 0x0 , NULL, HFILL } },
};
static gint *ett[]= {