Re: TestAndIncr problem

This is a discussion on Re: TestAndIncr problem within the SNMP Users forums, part of the Networking and Network Related category; On 18/01/2008, vsaavedra <vsaavedra@maisis.pt> wrote: > I'm trying to implement a TestAndIncr object ...


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

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-18-2008
Dave Shield
 
Posts: n/a
Default Re: TestAndIncr problem

On 18/01/2008, vsaavedra <vsaavedra@maisis.pt> wrote:
> I'm trying to implement a TestAndIncr object as a column in table.


So you need a separate spinlock object for each row of the table?
That feels a bit overkill - it's more common to have a single scalar
TestAndIncr object that controls the whole table.

There is a helper routine netsnmp_register_watched_spinlock()
which implements this behaviour (for a scalar MIB object).
All you have to do is provide the integer variable to hold the spinlock
value, and the helper does the rest.

See 'mibgroup/mibII/setSerialNo.c' for an example of this.

You might be able to use the helper's handler routine to implement
a column-based version of this, if you really must work at the level
of per-row granularity.




> This table as an OCTET STRING column, and I want to be able to increment the
> TestAndIncr object, if the column name is updated.


That's not how TestAndIncr works.
The value is incremented when the spinlock value itself is SET (successfully).
Not some other MIB object.

Please re-read the description of this syntax type for the defined behaviour.


Dave

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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
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 07:35 PM.


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