Ethereal-dev: [ethereal-dev] Picking up info along the way and making it available later

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: Fri, 26 Mar 1999 23:01:57 +1000
Hi,

I perceive a need to be able to pick up the Source IP and Dest IP in
packet-ip and to pass that along to packet-udp and packet-tcp.

Then in each of these I perceive a need to have access to Source Port and
Dest Port.

I am thinking of defining a structure that includes both of these and
adding the info as needed.  This, however, does not seem very clean as it
may eventually need to define fields for each of the descendent dissect
routines, regardless of whether or not they are needed.

Perhaps I need to build a list of name value pairs? Then I could add just
what is needed along the way. packet-ip could add SIP=a.b.c.d, DIP=e.f.g.h.
packet-tcp and packet-udp could add SPort=xyz, DPort=qrs. And other
routines could add what they felt was necessary.

Any comments?


Regards
-------
Richard Sharpe, sharpe@xxxxxxxxxx, NIC-Handle:RJS96
NS Computer Software and Services P/L, 
Ph: +61-8-8281-0063, FAX: +61-8-8250-2080, 
Samba (Team member), Linux, Apache, Digital UNIX, AIX, C, ...