I would like to add support for unloading protocol domains (and protocols)
At the moment I see several roadblocks.

1/ there is no net_rm_domain() to match net_add_domain().

to make one we need the following changes:

2/ there is in struct  domain {}:
        void    (*dom_init)             /* initialize domain data structures */
                __P((void));

It needs to be matched by an equivalent
destructor to undo any work that may have been done in the init.

3/ In turn the struct protosw {}
has an entry:
        void    (*pr_init) __P((void)); /* initialization hook */

that needs a matching destructor.

I would like to add these two destructors (de-initialisors?)
comments?

In addition the networking structures are susceptible to 
items being removed while they are being traversed.
e.g. a domain being removed while a socket is being created
would be a problem as the lookup code traverses the domain list,
however it would be senseless to guard this with a strictly
single-iser mutex. A reader/writer mutex is needed.

Any movement on those, and any thoughts on the topic in general?

In the case of my netgraph sockets,
I can actually remove the netgraph domain on the fly because I
KNOW that I don't use the initialisers, and my Module removal code
can do all the things that would be needed to be done in the case
where there would be such initialisers. Maybe this is the general case
and de-initialisers are not needed? (e.g. it knows if there are any
netgraph sockets open and can refuse to unload).


-- 
      __--_|\  Julian Elischer
     /       \ [EMAIL PROTECTED]
    (   OZ    ) World tour 2000
---> X_.---._/  from Perth, presently in:  Budapest
            v




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to