Ethereal-dev: Re: [ethereal-dev] TCP/UDP protcol dissector lookups

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

Date: Wed, 1 Mar 2000 10:05:26 +0100
> > I have worked up the attached code as a lookup routine for the TCP and UPD
> > port based dissectors. Please review it and make comments.

> It looks as if it could be the promised generalization of the UDP
> hashing routines in "packet-udp.c".

Nice, I needed the TCP part!

The TCP / UDP dissectors only watch ports, right? Is there a way to add host/port combinations in 
the hash? I suppose this would add some more logic to it, but not that much. Just a check for the 
existence of a host in the hash, if it's not 0 compare with the current host, if this matches that 
protocol should handle the frame. And off course a couple of additional parameters here and 
there.

BTW
In NetMon dissectors, if a frame is encountered a protocol is asked (based on the port) whether it's 
capable of dissecting _that_ particular frame or not. Depending on this answer the dissecting routine 
receives the frame or not. How does Ethereal handle this situation?

-- 
Andreas Sikkema
andreas.sikkema@xxxxxxxxxxx
"HTML needs a rant tag" -  Alan Cox