On Mon, 2008-06-23 at 14:02 +0200, Goran wrote:
> Hi
>
> Is it possible to register to the sysORTable from within a subagent?
Yes.
> It works when I register to the sysORTable when compiling the
> nstAgentModuleObject.c into the Agent. If I register to sysORTable
> from the example subagent (nstAgentSubagentObject.c and
> example-demon.c) nothing ends up in the sysORTable. This is compiled
> on an Ubuntu system.
>
> This is the code i've added to nstAgentModuleObject.c and
> nstAgentSubagentObject.c:
In what function? If it is in the init_ function it might be that you
need Net-SNMP 5.5 (Current trunk)
> extern int register_sysORTable(oid *, size_t, const char *);
> extern int unregister_sysORTable(oid *, size_t);
>
> static oid sysORTable_reg[] = { 1, 3, 6, 1, 2, 1, 10, 999 };
> static size_t sysORTable_reglen = 8;
>
> register_sysORTable(sysORTable_reg, sysORTable_reglen,
> "Test registration from
> agent/subagent");
>
>
> Doesn't the sysORtable registration work from within a subagent or is
> it broke?
It do work but there is breakage in pre-5.5 versions - it won't work
from the init_ method and it won't reregister on reconnection.
/MF
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders