Re: Doing things in a callback routine

2010-03-30 Thread Dave Shield
On 30 March 2010 16:18, Thomas Andrews wrote: > It's actually a bug in /usr/share/snmp/mibs/NET-SNMP-EXAMPLES-MIB.txt ! That bug was fixed in late 2007, and the MIB is correct in releases 5.4.2 and 5.3.3 (and above) Dave --

Re: Doing things in a callback routine

2010-03-30 Thread Thomas Andrews
Dave Shield wrote: > On 30 March 2010 15:30, Thomas Andrews wrote: >> I can now get my_string using a GET but I get this warning when I do so: >> >> NET-SNMP-EXAMPLES-MIB::netSnmpExampleString = Wrong Type (should be >> INTEGER): STRING: "bla bla bla" >> >> What am I doing wrong here? Does net

Re: Doing things in a callback routine

2010-03-30 Thread Thomas Andrews
Dave Shield wrote: > On 30 March 2010 15:30, Thomas Andrews wrote: >> I can now get my_string using a GET but I get this warning when I do so: >> >> NET-SNMP-EXAMPLES-MIB::netSnmpExampleString = Wrong Type (should be >> INTEGER): STRING: "bla bla bla" >> >> What am I doing wrong here? Does net

Re: Doing things in a callback routine

2010-03-30 Thread Dave Shield
On 30 March 2010 15:30, Thomas Andrews wrote: > I can now get my_string using a GET but I get this warning when I do so: > >   NET-SNMP-EXAMPLES-MIB::netSnmpExampleString = Wrong Type (should be >   INTEGER): STRING: "bla bla bla" > > What am I doing wrong here? Does netsnmp_register_watched_scala

Re: Doing things in a callback routine

2010-03-30 Thread Thomas Andrews
Thomas Andrews wrote: > 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' Okay, I figured out that netsnmp_init_watc

Re: Doing things in a callback routine

2010-03-29 Thread Thomas Andrews
Dave Shield wrote: > On 29 March 2010 16:16, Thomas Andrews 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 "watc

Re: Doing things in a callback routine

2010-03-29 Thread Dave Shield
On 29 March 2010 16:16, Thomas Andrews 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. T

Doing things in a callback routine

2010-03-29 Thread Thomas Andrews
Hi, 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. Also, if turning on the kettle failed, how can I convey that failure back to the SET operation? Fo