On 22/01/2008, Giuseppe Modugno wrote:
> I register scalars for the following OIDs:
> using netsnmp_register_scalar().

That's not legal.
If you've defined a MIB object (using OBJECT-TYPE),
then you cannot have any further MIB objects defined
as children of this OID.

> If my hypotesis is correct, I wonder why the second netsnmp_register_scalar()
> doesn't complain with an error.

Because the agent doesn't try to enforce the legality of MIB structures.
The internal registry can't distinguish between a "sub-tree" registration
(where it's perfectly valid to have subordinate registrations), and a
"single object" registration (where it isn't).

It's up to your MIB designer to come up with a valid MIB before
you start implementing it. The Net-SNMP agent won't try to validate
this for you.


This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
Net-snmp-coders mailing list