Ethereal-dev: Re: [ethereal-dev] Keeping state and name tables

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

From: Richard Sharpe <sharpe@xxxxxxxxxx>
Date: Mon, 04 Oct 1999 09:08:31 +0900
At 09:30 AM 10/5/99 -0400, "Gilbert Ramirez Jr." <gram@xxxxxxxxxx> wrote:
>On Mon, Oct 04, 1999 at 08:32:35AM +0900, Richard Sharpe wrote:
>> 
>> And, for a packet, in any dissect module, I think I need to be able to
>> retrieve information from lower layers for use in storing state information
>> in the hash table.
>> 
>> So, in dissect_smb, I want to do something like:
>> 
>>    src_ip = get_src_ip(packet);
>>    dst_ip = get_dst_ip(packet);
>>    src_port = get_src_port(packet);
>>    dst_port = get_dst_port(packet);

>Or, we could have the higher-layer protocols "import" the info by
>walking the proto_tree. The higher-layer protocol has the proto_tree. All
>it needs is the registration ID of the field it's looking for, like
>hf_ip_src and hf_ip_dst.

Hmmm, this looks interesting ... Now that we have this info in the tree.

How do we look it up?

>--gilbert 
>

Regards
-------
Richard Sharpe, sharpe@xxxxxxxxxx, Master Linux Administrator :-),
Samba (Team member, www.samba.org), Ethereal (Team member, www.zing.org)
Co-author, SAMS Teach Yourself Samba in 24 Hours
Author: First Australian 5-day, intensive, hands-on Linux SysAdmin course