context and multiple mib-instances

jan-ivar.nymo____4tel.no jan-ivar.nymo____4tel.no
Tue Feb 15 21:47:15 CET 2000


I'm using the agent to manage some net-close software applications. The
connection between
the agent and the apps is through unix-sockets. I do process control through
a small
control-table mib that looks something like this:

   processkey | processtype | status | managementport | PID | PPID | ..|
RowStatus

So, to start a new process I create a new row in the control table, set
processkey and
processtype and activates the row. The agent will then start a process of
"processtype" and
fill in the rest of the columns in the particular row. 
In the instrumentation of the mibs for the processtypes then, it would be
nice to
be able to do something like this;
  port = get_mport_from_control_table( req->contextName ); //contextName as
processkey
  val = get_value_from_process( oid, port );

Here a context will be connected to an entire mib-module, and not a
particular mib-entry,
and the context do not need to bee predefined and hardcoded in the agent.
But ofcourse,
I do not know the snmp specifications - so I may bee far out here :-)

Best regards
jan-ivar



-----Original Message-----
From: Frank.Fock____t-online.de [mailto:Frank.Fock____t-online.de]
Sent: 15. februar 2000 20:13
To: agentpp-dl____fock.de
Subject: Re: context and multiple mib-instances



jan-ivar.nymo____4tel.no wrote:

> how can I use the snmpv3 context(name) to differ between multiple
> mib-instances in an agent?

Currently, you have to instantiate a Mib instance for each context and
add instances of the appropriate MibEntries to it. Then you have to
dispatch the requests in the main loop of your agent to the different
MIB instances.

>
> It would be perfect if I could use the context as key in a routingtable
that
> describes what route
> to take to find a specific instance of a mib-variable. But, what I can see
> from the examples in
> agent++, allowed context's have to be predefined when initializing the
> security constructs.
>

For the next release (3.4) I would like to change the Mib class as follows:

* add a new method Mib::add(const OctetStr& context, MibEntryPtr)
* change the (protected) lookup methods like "find_..." to recognize
contexts.

Any suggestions?

Best regards,
Frank



More information about the AGENTPP mailing list