redundant check in mib.cpp
Faye Ly
faye____pedestalnetworks.com
Fri Feb 28 02:39:40 CET 2003
Frank,
Can you please clarify the check in function:
Boolean MibTable::ready(Vbx* pvbs, int sz, MibTableRow* row)
{
...
// check for changed value
MibLeaf* l = generator.get_nth(i);
if ((!l->valid()) &&
(l->get_value() == pvbs[i])) {
delete[] required;
return FALSE;
}
..
}
Why do we need to check the changed value here for the set? It seems to
me that the value should be set per SNMP request even if the value is
the same. This caused some problem with the implementation of the MIB
creation and setting on the following objects specified by RFC 2662:
adslAtucConfMinSnrMgn OBJECT-TYPE
SYNTAX INTEGER (0..310)
UNITS "tenth dB"
MAX-ACCESS read-create
STATUS current
DESCRIPTION
"Configured Minimum acceptable Signal/Noise Margin.
If the noise margin falls below this level, the modem
should attempt to increase its power output. If that
is not possible the modem will attempt to
re-initialize or shut down."
::= { adslLineConfProfileEntry 6 }
Setting (or as one of the vb in the creation request) this object to
zero will cause a "badValue" error. Similar thing to all the
read-create objects defined in this table.
Same thing with the ATM MIB as defined by RFC 2515 and 2514 where the
transmit and receive traffic descriptor cannot be set to zero as
defined:
AtmTrafficDescrParamIndex ::= TEXTUAL-CONVENTION
STATUS current
DESCRIPTION
"The value of this object identifies a row in the
atmTrafficDescrParamTable. The value 0 signifies
that no row has been identified."
SYNTAX INTEGER (0..2147483647)
Once I commented out the check, both scenarios worked. Please advice
though as I don't fully know what is the intention of this check.
Thanks.
-faye
More information about the AGENTPP
mailing list