From: Robert Story (Coders) [mailto:[EMAIL PROTECTED] 
RS->The agent doesn't keep data in memory in the tree. The hander must
be called to
RS->get the data. It would be rather tricky to try and properly set up
all the
RS->parameters to do this directly, so I'd suggest that you use the
callback
RS->mechanism to send a SNMP request to the agent. See the disman code
RS->for an example of how to do this (start looking in
mteTriggerTable.c).Of
RS->course, this won't work during set processing.

By looked into mteTriggerTable.c, the steps needed for getting a value
of known OID (by sending a SNMP request to the agent) are

1) register callback function and open a callback session in init_XXX
function
   If it is inside a subagent, what callback_master_num should be in
netsnmp_callback_open()?

2) create GET/GETNEXT pdu and add var to the pdu by calling
snmp_add_null_var() when an OID value is queried 

3) call snmp_synch_response() to get a response. From here, get the
value of the OID.

Do I understand it correctly?

Thanks,

Fong


-- 
Robert Story; NET-SNMP Junkie
Support: <http://www.net-snmp.org/> <irc://irc.freenode.net/#net-snmp>
Archive:
<http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-coders>

You are lost in a twisty maze of little standards, all different. 




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to