diff options
author | Graeme Lunt <graeme.lunt@smhs.co.uk> | 2007-06-24 05:28:27 +0000 |
---|---|---|
committer | Graeme Lunt <graeme.lunt@smhs.co.uk> | 2007-06-24 05:28:27 +0000 |
commit | 21209f9b5b09ad035e59cfae9105948299a977d9 (patch) | |
tree | d87e24b882f7314ea4c943717d924e0a9758d4c5 /epan/dissectors/packet-pres.c | |
parent | 124ef666854fdbe1257088dcb175383a087909d9 (diff) |
This patch adds RTSE reassembly. The reassembly is done when
receiving a SES MAJOR SYNC POINT, as this indicates the end of the
COTP DT Data stream. Previous the RTSE dissector was called when
receiving a COTP DT Data fragment with the "last data unit" bit set,
but this does not work with messages fragmented in RTSE. Reassembly
can be turned off in the preferences.
svn path=/trunk/; revision=22176
Diffstat (limited to 'epan/dissectors/packet-pres.c')
-rw-r--r-- | epan/dissectors/packet-pres.c | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/epan/dissectors/packet-pres.c b/epan/dissectors/packet-pres.c index a0f8fc2fb7..5eafbaff27 100644 --- a/epan/dissectors/packet-pres.c +++ b/epan/dissectors/packet-pres.c @@ -1,6 +1,6 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Wireshark dissector compiler */ -/* .\packet-pres.c */ +/* ./packet-pres.c */ /* ../../tools/asn2wrs.py -b -e -p pres -c pres.cnf -s packet-pres-template ISO8823-PRESENTATION.asn */ /* Input file: packet-pres-template.c */ @@ -1503,9 +1503,12 @@ dissect_pres(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) /* first, try to check length */ /* do we have at least 4 bytes */ if (!tvb_bytes_exist(tvb, 0, 4)){ - proto_tree_add_text(parent_tree, tvb, offset, - tvb_reported_length_remaining(tvb,offset),"User data"); - return; /* no, it isn't a presentation PDU */ + session = ((struct SESSION_DATA_STRUCTURE*)(pinfo->private_data)); + if (session && session->spdu_type != SES_MAJOR_SYNC_POINT) { + proto_tree_add_text(parent_tree, tvb, offset, + tvb_reported_length_remaining(tvb,offset),"User data"); + return; /* no, it isn't a presentation PDU */ + } } /* we can't make any additional checking here */ @@ -1519,6 +1522,18 @@ dissect_pres(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) global_tree = parent_tree; global_pinfo = pinfo; + if (session && session->spdu_type == SES_MAJOR_SYNC_POINT) { + /* This is a reassembly initiated in packet-ses */ + char *oid = find_oid_by_pres_ctx_id (pinfo, session->pres_ctx_id); + if (oid) { + call_ber_oid_callback (oid, tvb, offset, pinfo, parent_tree); + } else { + proto_tree_add_text(parent_tree, tvb, offset, + tvb_reported_length_remaining(tvb,offset),"User data"); + } + return; + } + while (tvb_reported_length_remaining(tvb, offset) > 0){ old_offset = offset; offset = dissect_ppdu(tvb, offset, pinfo, parent_tree); @@ -1866,7 +1881,7 @@ void proto_register_pres(void) { "", HFILL }}, /*--- End of included file: packet-pres-hfarr.c ---*/ -#line 290 "packet-pres-template.c" +#line 305 "packet-pres-template.c" }; /* List of subtrees */ @@ -1912,7 +1927,7 @@ void proto_register_pres(void) { &ett_pres_User_session_requirements, /*--- End of included file: packet-pres-ettarr.c ---*/ -#line 296 "packet-pres-template.c" +#line 311 "packet-pres-template.c" }; /* Register protocol */ |