Dave Shield wrote:
> On 29 March 2010 16:16, Thomas Andrews <[email protected]> wrote:
>> In a callback routine for netsnmp_register_int_instance() I would like
>> to be able to do things like turn on a kettle.
>>
>> My problem is that in the callback I don't know if it's a GET or a SET.
> 
> Have a look at the "watched_scalar" helper instead.
> This uses the standard handler API, so does provide
> information about GET vs SET, etc.

Thanks Dave. I'm now using the example at 
http://net-snmp.sourceforge.net/dev/agent/watched_8c-example.html

Unfortunately compiling that code gives me this error:

   undefined reference to `netsnmp_init_watcher_info6'

I have the following debs installed:

libsnmp-base 5.4.1~dfsg-12 SNMP (Simple Network Management Protocol)
libsnmp-dev  5.4.1~dfsg-12 SNMP (Simple Network Management Protocol)
libsnmp-perl 5.4.1~dfsg-12 SNMP (Simple Network Management Protocol)
libsnmp15    5.4.1~dfsg-12 SNMP (Simple Network Management Protocol)
snmp         5.4.1~dfsg-12 SNMP (Simple Network Management Protocol)
snmpd        5.4.1~dfsg-12 SNMP (Simple Network Management Protocol)

Are `netsnmp_init_watcher_info6' and `netsnmp_init_watcher_info' too new 
for my version of net-snmp ? I can't find any references to them in 
/usr/include/net-snmp.

Many thanks,
Thomas

------------------------------------------------------------------------------
Download Intel&#174; 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

Reply via email to