On 21/04/07, Magnus Fromreide <[EMAIL PROTECTED]> wrote:
> How comes that dlmod uses deinit_foo to deregister snmp module foo on
> unload but the master agent uses shutdown_foo?

Hysterical raisins.
Both of these date a long way back, so it's unlikely that any of us
can remember the reasoning involved.

The shutdown_xxx handling was introduced in September 1998,
in SVN revision 1609  (configure, et al)
The deinit_xxx handling was introduced at roughly the same time
(July 1998) in SVN revision 1440, right from the very first version of
the dlmod module (originally under mibgroup/misc).

I suspect that shutdown_xxx support was probably added before
the development team had recognised the similarities with the
dlmod handling (which was a third-party-provided patch).
And by the time the difference became apparent, it was too
late to do anything about it.



> Which one should I put in my mib modules?
>
> Is this a reasonable deinit_foo?
>
> void deinit_foo() { shutdown_foo(); }

Yes - that seems sensible to me.
shutdown is probably the more important,
but this sort of double-wrapping should be OK.

Dave

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to