On Sun, Oct 22, 2000 at 02:43:01PM -0400, Ed Warnicke wrote:
> I am slightly concerned that at the end of the
> register_all_protocol_handoffs function there are duplicate entries for
>
> {extern void proto_reg_handoff_bxxp (void); proto_reg_handoff_bxxp ();}
> {extern void proto_reg_handoff_diameter (void);
> proto_reg_handoff_diameter ();}
> {extern void proto_reg_handoff_mgcp (void); proto_reg_handoff_mgcp ();}
> {extern void proto_reg_handoff_smtp (void); proto_reg_handoff_smtp ();}
That's because the dissectors in question declare the "reg_handoff"
routines for the protocols, as well as defining them, and the script
that generates "register.c" recognizes both the declaration and the
definition.
I'm not sure why they're declared (if it's to squelch GCC warnings,
why then didn't they declare the register routine?), and I'll remove the
declarations, unless somebody comes up with a reason why the handoff
registration routines for those dissectors *must* be called twice.
> So now I make. Everything compiles fine and links fine and make
> terminates with no complaints over the warning level from the compiler.
>
> I run the newly compiled ethereal. Everything launches fine, no problems.
>
> I bring click on Edit->Protocols and the Protocols dialog comes
> up. It doesn't show mgcp (but it does show bxxp, diameter, and smtp,
> which is why I think the duplication mentioned above is benign).
Protocols show up in the Protocols dialog if they've been registered;
registration is done by the registration routine, not by the handoff
registration routine, and it's the handoff registration routines in
question that are being called twice.
> I close the proto_dlg. I try to enter the string "mgcp" in the
> filter textbox at the button of the window. I get a response
> 'Unable to parse filter string "mgcp"'. Clearly something has gone
> wrong.
>
> So I proceeded to go through this process again with the skeleton code
> provided in the doc/README.developer file and with skeleton code
> generated by the build-dissector.pl script (running make dist-clean
> between attempts). Both yielded the same response.
>
> I'm stuck. What am I doing wrong?
I'm stuck, too, because I don't have a copy of your
"proto_register_mgcp()" routine, and thus can't tell what it's doing
wrong so that the MGCP protocol doesn't get registered.