Suggestion for additons to MibTable interface

Alex Finogenov afinogenov____malibunet.com
Mon Jul 30 21:06:51 CEST 2001


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