Hi,
Some idle thoughts ...
I was thinking it woul be nice to change the way
we do dissector initalisation.
ie: lets add some sequencing to allow for phased
start of dissectors. What does this mean?
Well currently we can register an initalisation
routine via eg:
/* register init routine */
register_init_routine( &giop_init); /* any init stuff */
I have seen in some dissector (eg: RPC stuff, and GIOP)
that to ensure that some data structures were initialised
before say its sub dissectors, then they have hijacked
and built data structs inside eg:
void proto_register_giop (void) {
/*
* Init the giop user module hash tables here, as giop users
* will populate it via register_giop_user_module BEFORE my
* own giop_init() is called.
*/
etc..
Would it be useful to say have the following protoype
/* register init routine */
register_init_routine( &giop_init, int start_sequence);
where start_sequence ranges from say 0 - 9 for example.
The default would be 5 (99% of dissectors). But RPC and
others could do
register_init_routine( &giop_init, 3);
This would guarantee being called before the remaining dissectors.
So, I could always destroy and create stuff in start sequence 3,
and be ready for my subdissectors in their start_sequence = 5.
Comments ??
/Frank..
--
EUS/SV/Z Frank Singleton ASO Americas BSS
Office : +1 972 583 3251 ECN 800 33251
Mobile : +1 214 228 0874 Amateur Radio: VK3FCS/KM5WS
Email : frank.singleton@xxxxxxxxxxxx
Hardware: HP Omnibook 4150 running Redhat Linux 7.1 (2.4.3-12 kernel).