I think it will not work correctly in call_pres_dissector routine because in
case of local "session" we have address of address in call_pres_dissector
routine.
Have a look :
call_pres_dissector(tvbuff_t *tvb, int offset, guint16 param_len,
packet_info *pinfo, proto_tree *tree, proto_tree *param_tree,
struct SESSION_DATA_STRUCTURE *session) <- it is already address of
structure
....
/* save type of session pdu. We'll need it in the presentation dissector
*/
saved_private_data = pinfo->private_data;
pinfo->private_data = &session; address of address.Really, we
don't need this.
But this line has to be :
pinfo->private_data = session;
I've attached patch.
From: Guy Harris <guy@xxxxxxxxxxxx>
To: Sid Sid <ysidelnikov@xxxxxxxxxxx>
CC: ethereal-dev@xxxxxxxxxxxx
Subject: Re: [Ethereal-dev] Path for session
dissector (packet-ses.c/packet-ses.h).
Date: Fri, 9 Jan 2004 15:19:25 -0800
On Jan 9, 2004, at 12:06 AM, Sid Sid wrote:
Patch for session dissector:
Checked in, with "session" made local to "dissect_ses()" and passed by
reference to subroutines, and with "pinfo->private_data" restored rather
than set to null when the presentation dissector returns.
_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail
--- packet-ses_1_6.c 2004-01-12 14:15:50.420004000 -0300
+++ packet-ses.c 2004-01-12 14:00:51.820004000 -0300
@@ -292,7 +292,7 @@
{
/* save type of session pdu. We'll need it in the presentation
dissector */
saved_private_data = pinfo->private_data;
- pinfo->private_data = &session;
+ pinfo->private_data = session;
call_dissector(pres_handle, next_tvb, pinfo, tree);
pinfo->private_data = saved_private_data;
}