Re: How to get notified of a "set" operation
Sylvain Dery <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
Great, thanks. Is the netsnmp_create_handler_registration() function documented somewhere? I can't find doc describing the API... Regards, Sylvain ________________________________ From: Dave Shield <[email protected]> To: Sylvain Dery <[email protected]> Cc: [email protected] Sent: Wed, February 24, 2010 3:57:38 AM Subject: Re: How to get notified of a "set" operation On 24 February 2010 00:43, Sylvain Dery <[email protected]> wrote: > I'm writing a very basic snmp sub-agent consisting of a simple scalar. > I generated the C skeleton code using mib2c.int_watch.conf; however I'd like > to get notified when the scalar is setted as a result of a snmp set > command. > Any advice on how this could be achieved would be greatly appreciated. The second parameter to netsnmp_create_handler_registration() is the name of a user-provided "handler routine", which should be called whenever a request for that OID (or group of OIDs) is received. The basic operation of a watched scalar doesn't require such processing, so this parameter is NULL. But if you specify your own routine, then it will be called for all relevant requests (GET* and SET). You can then check the details of the request, and handle SET requests appropriately. See the other MIB module code files for examples of what this routine should look like. Dave __________________________________________________________________ Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail. Click on Options in Mail and switch to New Mail today or register for free at http://mail.yahoo.ca ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ 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