Hi Dave,

            Can you please answer to my doubts?

Thanks and Regards

-JP

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jayaprakasha Guddenahalli Naganna
Sent: Tuesday, August 29, 2006 6:49 PM
To: [email protected]
Subject: registering same oid twice with different context and single (same)callback function (var_*) from one agentx subagent

 

Hi all,

 

I am able to register same oid twice with different context and single (same) callback function (var_*) from one agentx subagent.

 

To walk through those OID I have used snmp v3 with contexts.

 

I am successfully able to walk through the OID using two different contexts. (Didn’t got the result when I used different context name. This is OK)

 

Example,

From subagent I registered

  1. .1.3.6.1.2.1.4.24.1 OID with context = “abc”
  2. .1.3.6.1.2.1.4.24.1 OID with context = “def”        

 

For both the mib registration I have used common get callback function called “var_ipForwardSingle”.

Both snmpget –n “abc” and snmpget –n “def” were showing proper value. (for both the query “var_ipForwardSingle” function was called)

 

I also debug the code to check what context is being passed to subagent when snmpget issued with different context and found that subagent is receiving proper contexts.

 

 

By using the above technique can I support multiple instance of same OID by passing context name to “var_ipForwardSingle” function…? (This requires agentx functions to be modified by adding context parameter)

 

For example,

If the user creates two ospfv3 instances subagent will register ospfV3 mib twice with different context (ospf id). To query the values user has to pass the proper context (ospf id).

  1. Snmpwalk –n “1”  will show the OID’s for ospf instance 1
    1. In subagent we have to modify the agentx code to pass context=”1” to var_* functions.
  2. Snmpwalk –n “2”  will show the OID’s for ospf instance 2
    1. In subagent we have to modify the agentx code to pass context=”1” to var_* functions.

 

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

 

Thanks and Regards

-JP

-------------------------------------------------------------------------
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=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to