On Mon, 08 Jan 2007 10:40:51 +0100 Thomas wrote:
TA> Starting with the 5.4 release cycle there have been some (more) spurious
TA> discussions about library layering and dependencies. I've been trying to
TA> summarize the issue(s) here:
TA>
TA> http://www.net-snmp.org/wiki/index.php/Library_layering
Thomas,
First of all, thanks for taking the initiative and the excellent summary.
> agent -> mibs
> - make_tempfile mibgroup/util_funcs.c
> mibgroup/utilities/execute.c:run_shell_command()
> -Move to agent lib? Duplicate?
I agree that moving it to the agent library should work. I'd even be ok with
moving it to the core net-snmp library.
> - init_{module} mibgroup/* + mibgroup/mib_modules_inits.h
> mib_modules.c:init_mib_modules()
> - shutdown_{module} mibgroup/* + mibgroup/mib_modules_shutdown.h
> mib_modules.c:_shutdown_mib_modules()
I think these and the bulk of the others can be fixed pretty simply, with 2
changes:
1) for each library, add a new function: init_libX_callbacks(). These functions
are called before existing init routines.
2) change current dependency function calls to callback calls. eg:
- init_mib_modules();
+ snmp_call_callbacks(SNMP_CALLBACK_APPLICATION, /* or LIBRARY? */
+ INIT_MIB_MODULES, NULL);
> netsnmp_init_helpers helpers/all_helpers.c snmp_vars.c:init_agent()
I think the callback fix will work here too, but also wouldn't be terribly
opposed to merging libagent and libhelpers.
> netsnmp_bulk_to_next_fix_requests helpers/bulk_to_next.c
> mibgroup/agentx/master.c:agentx_got_response() ?
> netsnmp_get_bulk_to_next_handler helpers/bulk_to_next.c
> agent_handler.c:netsnmp_register_handler() ?
These last two might be a little trickier.. I'd have to think about it some
more...
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders