Ethereal-dev: Re: [ethereal-dev] Automatically generating "proto_register_XXX()" calls

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

From: Guy Harris <guy@xxxxxxxxxx>
Date: Tue, 19 Oct 1999 23:34:26 -0700 (PDT)
I checked the changes in (I changed "init.c" and "init.h" to
"register.c" and "register.h", and changed the name of the function in
"init.c" - "register" is what a protocol does when Ethereal starts,
"init[ialize]" is what it does every time you read in a new capture
file).

This means that:

	the file containing a dissector's "register" routine must be
	added to "DISSECTOR_SOURCES" in "Makefile.am";

	the "register" routine must have a name of the form
	"proto_register_XXX";
  
  	the "register" routine must take no argument, and return no
	value;

	the "register" routine's name must appear in the source file
	either at the beginning of the line, or preceded only by "void "
	at the beginning of the line (that'd typically be the
	definition) - other white space shouldn't cause a problem, e.g.:

void proto_register_xyzp(void) {

	...

}

and

void
proto_register_xyzp( void )
{

	...

}

	and so on should work.