On Wed, May 29, 2002 at 12:49:16PM +0200, Michael Stiller wrote:
> attached is a patch for ethereal 0.9.4 which adds Java RMI protocoll
> dissector capability.
Checked in.
> This is my first dissector for ethereal, so please bear with me ;)
You remembered to update "Makefile.am" *AND* to update "Makefile.nmake"
as well, so you get points for doing that. (Not everybody remembers
that, and those who update "Makefile.am" don't always update
"Makefile.nmake".)
> Comments are very welcome.
There are some unused function arguments and variables, as reported by
GCC:
packet-rmi.c: In function `dissect_ser':
packet-rmi.c:237: warning: unused parameter `pinfo'
packet-rmi.c: At top level:
packet-rmi.c:72: warning: `ett_rmi_protocol' defined but not used
packet-rmi.c:80: warning: `ett_ser_magic' defined but not used
packet-rmi.c:81: warning: `ett_ser_version' defined but not used
"dissect_ser()" should either set the "Protocol" and "Info" columns, or
should mark the "pinfo" argument as unused by doing
static void
dissect_ser(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
Unless "dissect_ser()" creates a subtree under the "hf_ser_magic" and
"hf_ser_version" fields, there's no need for "ett_ser_magic" and
"ett_ser_version"; similarly, unless "dissect_rmi()" creates a subtree
under the "hf_rmi_protocol" field, there's no need for
"ett_rmi_protocol".
There isn't a one-to-one correspondence between hf_ values for fields
and ett_ values for subtrees - you only have ett_ values for protocols
and for fields that *have* subtrees.