Wireshark-dev: [Wireshark-dev] Packet direction detection from dissector level
From: Daniel Kozar <los.danielos@xxxxxxxxx>
Date: Fri, 12 Feb 2010 02:31:25 +0100
Hello,
I'm attempting to write a dissector of a protocol used by a Polish IM
system called Gadu-Gadu. It's my first "larger" C project, so please
don't expect results very soon, but I'll surely try to do my best. So
far, having read the dissector developer documentation
(README.developer) and the more general Developer's Guide, I've
started writing and instantly stumbled upon a problem.

The problem is - is there any way to know if the packet is being sent
by the client or the server? I've encountered it because every packet
in this protocol has a "type" field in its header, but some values
repeat themselves and mean something else when sent by a server and
something else when sent by a client. I'd be thankful for providing
any solutions on how to solve this.

Another question - is the indentation/tab-width/"tabs as spaces"
coding style strictly enforced? Or is it okay to use your own
(without, obviously, being crazy), preferably with comments from this
-> http://www.wireshark.org/tools/modelines.html <- included?

Thank you very much in advance,
D.K.