Persistency on contexts

helge.fredriksen____4tel.no helge.fredriksen____4tel.no
Mon Sep 25 19:04:45 CEST 2000


Hello!

I've been revising my view of contexts in the agent. Our application is
quite dependent on context views; I will try to explain our setup:

1) Our agent is supposed to handle many instances of certain groups of
MibEntries, so using context views to store each instance seem to be the way
to go. Also when getting requests on these entries, the agent must correctly
route the call to the correct context view.

2) The agent is supposed to add/remove such contexts on demand from certain
snmp set operations. When such an operation takes place, the context must be
stored/removed to/from file persistently.

3) If the agent crashes or goes down because of power drop etc, the contexts
which were stored to file is supposed to get restored.

Today we have used the vacm to store contexts + adding access entries. This
has been done with the two calls

vacm->addNewContext and
vacm->addNewAccessEntry

I was hoping that things got stored persistently when performing these
calls, and restored with mib->init(), but it doesn't seem so.

Now, I have noticed that there is a context handler class called MibContext,
and that there exist methods like add_context and delete_context in the Mib.
Also there is some info on persistency on the MibContext class in the
documentation. How does the vacm contexts differ from the Mib contexts?

Thus I wonder if I should rather start using these facilities to make my
contexts persistent? Today we use a workaround to avoid multiple MibContexts
(a previous recommendation of yours).

Could you please give me some clues? Any demos on the use of the MibContext
class?

My current versions are agent++ v3.4o and snmp++3.0f. 

Yours sincerely,
Helge Fredriksen



More information about the AGENTPP mailing list