Ethereal-dev: [ethereal-dev] Suggestion for changing gtk/main.c

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

Date: Tue, 29 Feb 2000 12:54:53 +0100
Hi

Currently (ie the stable 0.8.3 version) gtk/main.c contains the following procedure
static void
ethereal_proto_init(void) {
  init_dissect_rpc();
  proto_init();
  init_dissect_udp();
  dfilter_init();
#ifdef HAVE_PLUGINS
  init_plugins();
#endif
}

Doesn't it make more sense to do all the init_dissect_protocol BEFORE 
proto_init()? In the case of UDP messages this enables new dissectors to 
register themselves in the hash using udp_hash_add (provided that this 
function is added to packet.h or something like that) and it would avoid
adding every new protocol to packet-udp.c. Just add 
udp_hash_add(MY_PORT_NUMBER, MY_DISSECTOR) to 
proto_register_PROTOCOL!

I could'nt find any references to this in the list archive, so.....

-- 
Andreas Sikkema
andreas.sikkema@xxxxxxxxxxx
"HTML needs a rant tag" -  Alan Cox