Ethereal-dev: [Ethereal-dev] RE: Obtaining previous dissector information

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Mark Pilant <Mark.Pilant@xxxxxxx>
Date: Wed, 24 Aug 2005 14:22:14 -0400
Hi Guy.

> (You mean "IP payload" - or, perhaps, "IP header" - in that case.)

Yep.  Finger-brain disconnect :-)

> You'd get the source IP address from pinfo->net_src, if it's present 
> (which it should always be, for protocols running atop TCP).

Ahhhh.  I completely overlooked this in packet_info.h; but it has been
a while since I was looking at that particular module.

I'm familiar with the address type, so it won't be a problem. 

> Just out of curiosity, what are those ways?  (Note that the tvbuff
your 
> dissector is handed does *NOT* allow references to bytes before its 
> beginning, so it does *NOT* allow access to headers before your 
> protocol's data.)

Yep.  But that assumes you are using the tvb to try and get at the
information.  You can get to the information by going through the
frame data, but then you have to either make a bunch of assumptions
about the previous payloads or do the work of all the previous payload
dissectors all over.  See, I said it wasn't nice :-) :-)

Thanks.

- Mark