> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of ye_cl
> Sent: Monday, August 27, 2007 7:48 PM

> Now I will send my get request to node of 
> iso(1).org(3).dod(6).internet(1).private(4).enterprises(1) 
> whose type is OBJECT-IDENTIFIER for getting the value of 
> iso(1).org(3).dod(6).internet(1).private(4).enterprises(1).sco
> mcenter(19176).products(1).subproducts(1).sv260a(20).tsoverip(
> 1).tsoveripstatus(0).

        You want to use get-next, not get.  Also, you should do the get-next at 
.1.3.6.1.4.1.19176 to get the first object in your MIB, as there are most 
likely other enterprise MIBs on your agent, unless you have deliberately 
restricted the view.

> I don't know how to implement it, the get request oid and the 
> response oid are not the same type, and are not in the same 
> layer in MIB tree. In the mib2c-produced skeleton source 
> files, I can only respond the oid that is from the client's 
> request. My source code style is style of ucd-snmp.

        You do not need to implement get-next handling in a subagent - the 
master agent will handle this automatically, provided you have implemented your 
subagent correctly.  You do not need to worry about "level in the tree" - 
despite the hierarchical naming scheme, there are no levels - the hierarchy is 
only used to establish object and instance ordering.  Finally, since SNMP data 
is TLV (type, length, value) encoded, you do not need to worry about object 
typing, at least if you only wish to view the data.  There is no type indicated 
in a get or get-next request, just the OID.


        HTH,

Mike

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to