Suggestion for additons to MibTable interface
Frank Fock
Frank.Fock____t-online.de
Tue Jul 31 02:53:45 CEST 2001
Hi Alex,
Normally, INDEX columns should be "not-accessible" and thus not
implemented in a table. So, I do not think that there is a general
need for the proposed method. Nevertheless, you may write a
plugin for AgentGen Pro to generate code for your INDEX objects
that automatically initializes their values with the appropriate index
portions.
Hope this helps.
Best regards,
Frank
Alex Finogenov wrote:
> Frank,
>
> The agentgen does not distinguish INDEX columns in the generated code in any
> way.
> This makes the agent code to reject a SET request unless either all columns
> present, or a column has a DEFVAL statement in the MIB definition.
>
> This is impractical because it requires all index columns to present in
> every SET request, and to put DEFVAL into the MIB definition for an index is
> semantically wrong.
>
> One could add VMODE_DEFAULT as the last argument to the generated call to
> the MibLeaf constructor for each column, but in the environment of changing
> MIB definitions this is error prone. I tried to do some C++ trickery to
> create and replace index leaves after a table has been created and leaves
> added, but this didn't work: the table cannot find the leaf after that.
>
> Since MibLeaf public interface is lacking of a method to get around this
> inconvenience, I am suggesting to add the following method to it:
>
> void MibLeaf::set_deafult_value_mode()
> {
> value_mode = VMODE_DEFAULT;
> validity |= LEAF_VALUE_INITIALIZED;
> }
>
> What do you think?
>
> Thanks,
> Alex
More information about the AGENTPP
mailing list