On 29 May 2007 18:07:50 -0700, Mark Atwood <[EMAIL PROTECTED]> wrote:
> I want to create a row in the APPLICATION-MIB::applTable
>
> The way to do that seems to be, ultimately,
> to generate an agentx-IndexAllocate-PDU,
> which is done by agentx_register_index(),
> which is called by register_index(),
> which is called by register_int_index(),
>
> which as near as I can tell, is never called by anything anywhere
> in the 5.4 code.
>
> What is the Right Way to do this?  Do I want to call
> register_int_index() in my own subagent code?

Yes - that is the correct approach for implementing a table that
will shared across several subagents.
   It's less necessary if the table is fully contained within a
single subagent, since this subagent can control which index
values are selected.

None of the MIB modules in the Net-SNMP agent code try
to implement such shared tables, so it doesn't surprise me
that there aren't any examples of this approach.
  You should also be aware that this code won't have seen
particularly widespread use, so it may not be as robust as
some other areas of the agent.


> If I do, where and when do I do it?

You'd use this call immediately before registering a row in the
table, to decide what index value to register it with.
  So it would typically be used in the 'load()' function (or similar)
where the contents of the table are set up.

> I'm hoping to use the MFD template from mib2c, as well.

Robert's more familiar with that template than I am, but I'd
expect this code to appear in the 'countainer_load' routine.

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