Yes I am using older v4 UCD-style module API and hard coded the
different context name for two instances of same OID while filling
register pdu for testing purpose.

>> By using the above technique can I support multiple instance of same

OID by
>> passing context name .....


>Yes


>> ..... to "var_ipForwardSingle" function...?


>Probably not.



My whole idea depends on using same call back function (var_*) to
retrieve data for multiple instances. Because of mib instances will be
created dynamically I can't keep different var_* functions. Only
registration can be done dynamically on same oid along with different
context (Instance ID).

To achieve this what I am thinking is to drag the context (Instance ID)
sent by master agent to subagent up to var_* functions and use that for
retrieving values.


-----Original Message-----
From: dave.shield@googlemail.com [mailto:dave.shield@googlemail.com] On
Behalf Of Dave Shield
Sent: Tuesday, August 29, 2006 9:32 PM
To: Jayaprakasha Guddenahalli Naganna
Cc: net-snmp-coders@lists.sourceforge.net
Subject: Re: registering same oid twice with different context and
single (same)callback function (var_*) from one agentx subagent

On 29/08/06, Jayaprakasha Guddenahalli Naganna
wrote:
> I am able to register same oid twice with different context and single
> (same) callback function (var_*) from one agentx subagent.


Correct.
That's the purpose of the context field.


> By using the above technique can I support multiple instance of same

OID by
> passing context name .....


Yes

> ..... to "var_ipForwardSingle" function...?


Probably not.
That sounds as if you're using the older v4 UCD-style module API.
I don't believe that API supports the use of contexts.

Have a look at the newer v5 handler-based modules. That API should
support non-default contexts, *without* needing to change the API
itself (which would not be acceptable).



> Will this be an efficient and valid solution with respect to all
> circumstances? Is there any drawback with above solution?


There is no way that we would contemplate changing an established API.
But the newer v5 approach should support this OK.

Dave





-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=...057&dat=121642
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders