aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/pres
diff options
context:
space:
mode:
authorGraeme Lunt <graeme.lunt@smhs.co.uk>2007-06-24 05:28:27 +0000
committerGraeme Lunt <graeme.lunt@smhs.co.uk>2007-06-24 05:28:27 +0000
commit21209f9b5b09ad035e59cfae9105948299a977d9 (patch)
treed87e24b882f7314ea4c943717d924e0a9758d4c5 /asn1/pres
parent124ef666854fdbe1257088dcb175383a087909d9 (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 'asn1/pres')
-rw-r--r--asn1/pres/packet-pres-template.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/asn1/pres/packet-pres-template.c b/asn1/pres/packet-pres-template.c
index aede2abbba..ec5fd270ec 100644
--- a/asn1/pres/packet-pres-template.c
+++ b/asn1/pres/packet-pres-template.c
@@ -232,9 +232,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 */
@@ -248,6 +251,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);