MibProxy based on table index

Frank Fock Frank.Fock____t-online.de
Tue Oct 24 19:04:25 CEST 2000


Chris Paulsen wrote:

> I'm trying to develop a  variant of the sample proxy agent for v1 and v2c
> agents that goes to a different sub-agent based on the index into a table.
> Only get and get-next requests are allowed on the sub-agents. Each subagent
> would be bound to provide certain rows from the table. Is this possible?
>

Yes, if you can determine the subagent to ask by the index only.

>
> If anyone has any suggestions as to what MibProxy methods I would need to
> override I would be very grateful?

The method you mentioned below will do it.

>
> I was thinking of the following:
>
> 1. Derive class from MibProxy which takes additional parameters in the
> constructor consisting of a map of the index portion of Oid and the
> corresponding source.
>

OK.

>
> 2. Override get_request and find_succ so that they set the internal
> 'source' for the MibProxy objects to the one specific for a given index.
> Call the base class (MibProxy) methods get_request and find_succ from the
> derived class.

Good idea, but be careful with GETNEXT requests. How do you
handle the transition from one subagent to the other? That may be
difficult, depending on how the indexes can be distinguished.

>
> Does this sound like it should work and make sense? Does anyone have a more
> elegant idea?

It does.

Best regards,
Frank

--
Frank Fock - AGENT++
Email: frank____fock.de
Fax: +49 7195 177108





More information about the AGENTPP mailing list