The reason the tap system works the way it does with the queue and push
functions are because I
wanted the taps only to be called when the dissectors were called when the
packets were first read.
This was a design mistake.

Since there are valid reasons to have tap listeners to be called whenever a
dissector is called and not
only when the pacekt is read the first time, I think the tap system should
be changed slightly.

Instead of waiting until all dissectors have returned until the tap
listeners are called
I think the tap listeners should be called immediately from the dissectors.
That would remove the need to do the rotating struct trick in dissect_tcp().
This would also get rid of the list handling in tap.c since the list would
become obsolete.

It would also allow tap listeners to be called everytime a dissector is
called. Thus allowing all of
TCP seq/ack analysis to become a tap listener. Cleaning up packet-tcp.c a
bit.

See the current flaw as a design bug.


I think the tap system should be changed so that
register_tap_listener()
takes an extra parameter that describes when the _packet() callback should
be called.

TAP_READ_FIRST   would mean the current behaviour
TAP_READ_NOT_FIRST would mean every time the dissector is invoked EXCEPT the
one above.
TAP_READ_ALWAYS  would mean that the callback would be called every single
time that dissector
is invoked.



I will do this change as soon as the next release is out. I dont want to
change it soo close to the new release.





Reply via email to