Detecting access of a particular OID, handler functions

This is a discussion on Detecting access of a particular OID, handler functions within the SNMP Users forums, part of the Networking and Network Related category; --===============1122826558== Content-Type: multipart/alternative; boundary="----=_Part_22224_20266468.1191341043849" ------=_Part_22224_20266468.1191341043849 Content-Type: text/plain; charset=ISO-8859-1 ...


Go Back   Usenet Forums > Networking and Network Related > SNMP Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-02-2007
Devvrat Tripathi
 
Posts: n/a
Default Detecting access of a particular OID, handler functions

--===============1122826558==
Content-Type: multipart/alternative;
boundary="----=_Part_22224_20266468.1191341043849"

------=_Part_22224_20266468.1191341043849
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

When we create an MIB and load it, say by agentx support then is there any
way to find out when any OID created by us is being accessed and also to
dynamically change the value of that OID depending on some condition. The
example at net-snmp site says that while registering the instance you can
specify a valid handler function instead of NULL.
netsnmp_register_int_instance("nstAgentSubagentObj ect",
nstAgentSubagentObject_oid,
OID_LENGTH(nstAgentSubagentObject_oid),
&nstAgentSubagentObject, NULL);
What i cannot understand is that how do we declare this handler function,
how is it called and what are the tasks it is supposed to perform. Does the
handler function get called whenever somebody queries for that OID.

regards
Devvrat

------=_Part_22224_20266468.1191341043849
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

When we create an MIB and load it, say by agentx support then is there any way to find out when any OID created by  us is being accessed and also to dynamically change the value of that OID depending on some condition. The example at net-snmp site says that while registering the instance you can specify a valid handler function instead of NULL.
<br>netsnmp_register_int_instance(&quot;nstAgentSu bagentObject&quot;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp; nstAgentSubagentObject_oid,<br>&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OID_LENGTH(nstAgentSubagentObject_oid),<br>&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;nstAgentSubagentObject, NULL);
<br>What i cannot understand is that how do we declare this handler function, how is it called and what are the tasks it is supposed to perform. Does the handler function get called whenever somebody queries for that OID.
<br><br>regards<br>Devvrat<br>

------=_Part_22224_20266468.1191341043849--


--===============1122826558==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
--===============1122826558==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/...net-snmp-users

--===============1122826558==--

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:09 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0