How to sync a MibTable with an STL::vector?

Martin Janzen janzen____pixelmetrix.com
Mon Apr 21 11:43:25 CEST 2003


Stefan.Mueller-Wilken____resco.de wrote:
> [...]
> Seems you're right: as long as the NMS walks the table with a single
> MibLeaf lookahead taken from the previous get-request, you can't tell if
> the get-next is part of a complete table walk or just access to a single
> MibLeaf. Loriot (the NMS I've used) obviously does not consult the MIB
> first when walking the agent to optimize multiple gets to a table in one
> request. That's most likely why I end up with nine get-requests and nine
> updates.

Hmmm, in that case the code samples I posted a while ago won't help you 
much, as they deal with duplicate calls to update() from within the same 
Request.  (Though you may still want to do something similar in case you 
do get more highly optimized Requests from other clients in future.)

> My solution so far is to introduce an "invalidation flag" to my vector that
> is checked from within MibTable::update. The table will only be
> reconstructed if the flag has been set by a "push_back", a delete or
> anything else that had changed the vector since its last reconstruction.
> And this is certainly something that Agent++ as a framework can't
> introduce.

Exactly.  Your "invalidation flag" sounds like the right way to go. 
Alternatively, a "serial number" or timestamp could be used as well.

Cheers...

-- 
Martin Janzen
janzen at pixelmetrix dot com




More information about the AGENTPP mailing list