Re: Getnext Implementation

"Dave Shield" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
On 26/09/06, [email protected] <[email protected]> wrote:
> It was one simple example. The index may be IPADDRESS also
> For this particular table there can be large gap

Ok - so a different approach is needed.


>> How is the table populated initially, how is it updated
>
> The table does not have any row initially .The user need to create the row .

How?
Via an SNMP SET command?
Or via some other control mechanism?


If the table is purely controlled via SNMP, then there's no problem whatsoever.
The agent is the only thing that creates rows, so it knows exactly
what rows exist, and can keep a track of the indexes.   Determining
the next index is simply a matter of searching this internal list.
The Net-SNMP agent has several helpers that can take care of this
automatically.

If rows can be created "behind the back" of the agent, then things are
slightly harder.
The most straighforward approach would be for the agent to hold a
cache of the table (or at least of the row indexes), and use that.
Occasionally, when the cache is regarded as "too old" to be useful, it
can be refreshed from the underlying system.

The mib2c tool can generate code for either of these approaches.

Dave

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.