Hello.
I found an oddity. Given the trivial mib module zzz.c:
--- zzz.c ----
#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
#include <net-snmp/agent/net-snmp-agent-includes.h>
#include <net-snmp/agent/agent_callbacks.h>
oid theOID[] = { 2, 3, 4, 5, 6 ,7 ,8 ,9, 10, 11, 12 };
void init_zzz(void)
{
register_sysORTable(theOID, sizeof(theOID)/sizeof(oid), "Test registration");
}
void shutdown_zzz(void)
{
unregister_sysORTable(theOID, sizeof(theOID)/sizeof(oid));
}
--- EOF ---
If it is part of the main agent then theOID do show up in sysORTable but
if it is part of a subagent then it will not be there.
The reson for the difference is that the agentx subagent module only
registers the SNMPD_CALLBACK_*REG_SYSOR callbacks once there is a
successfull connection to a master agent and that typically happen after
the call to init_zzz has completed.
The question that rise from this is how to handle sysORTable in
subagents, the obvious way seems to be that sysORTable entries are
automatically reregistered just like mib registrations are.
/MF
-------------------------------------------------------------------------
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