
Here is the object information. It is included in the fooTest.mib I sent out yesterday.
myObjectID OBJECT-TYPE SYNTAX OBJECT IDENTIFIER MAX-ACCESS read-write STATUS current DESCRIPTION "An object." DEFVAL { { 5 4 3 2 1 } } ::= { fooTest 14 }
I used the function getValueString() from tools dump*.c routines. The valuePtr->len always equals 2 and the oid is set to 0.0.
In the code parse-smi.y, the following code exists: /* TODO: make it work correctly for SMIv1 */ smiPrintError(thisParserPtr, ERR_OID_DEFVAL_TOO_LONG); $$ = smiMalloc(sizeof(SmiValue)); $$->basetype = SMI_BASETYPE_OBJECTIDENTIFIER; $$->len = 2; $$->value.oid = smiMalloc(2 * sizeof(SmiSubid)); $$->value.oid[0] = 0; $$->value.oid[1] = 0;
I hope this helps.
pamela Juergen Schoenwaelder wrote:
Pamela Heckmann writes:
Pamela> It appears as if the default value for type object identifier Pamela> is hardcoded to 0.0. There is a TODO in the file(s) Pamela> parser-smi*.c.
Pamela> I need to implement default support for this type and was Pamela> curious if anybody had done so already.
Not sure I really understand what you mean. Can you post a small example of an OBJECT-TYPE with a DEFVAL which does not work?
/js
-- Juergen Schoenwaelder http://www.informatik.uni-osnabrueck.de/schoenw/
-- Pamela Heckmann Icon Laboratories, Inc. Pam_Heckmann@icon-labs.com The grand essentials to happiness in this life are something to do, something to love and something to hope for. - Joseph Addison