Yeah, I just found that. I would feel stupid except for the fact that we
don't have any documentation on the data structures. Maybe that's a good
thing because a developer can't trust any of the code that isn't under his
control; or maybe that's a bad thing because people like me ask stupid
questions.
I guess the bottom line is that the data structures available to developers
should be documented and have standard calls (macros) to access the data.
Jeff Foster
jfoste@xxxxxxxxxxxx
PS. Thanks for the reply.
-----Original Message-----
From: Guy Harris [mailto:guy@xxxxxxxxxx]
Sent: Tuesday, February 15, 2000 4:01 PM
To: Jeff Foster
Cc: ethereal-dev@xxxxxxxx
Subject: Re: [ethereal-dev] Need IP address & port info
> Is the IP information available in a higher level dissector ?
Yes.
> Would it be possible to store the
> IP addresses and ports in a global variable so higher dissectors can get
to
> them ?
It's so possible that it's already been done.
Check out the "pi" global variable, which is a "packet_info" structure;
it has source and destination addresses in the "src" and "dst" structure
members, and source and destination port numbers in "srcport" and
"destport".