
Hi, I am back to this issue. In the libsmi library for v0.3.1 file parser-smi.c, the following code is included: case 184: #line 3374 "parser-smi.y" { /* * SMIv1 allows something like { 0 0 } ! * SMIv2 does not! */ /* TODO: make it work correctly for SMIv1 */ smiPrintError(thisParserPtr, ERR_OID_DEFVAL_TOO_LONG); yyval.valuePtr = smiMalloc(sizeof(SmiValue)); yyval.valuePtr->basetype = SMI_BASETYPE_OBJECTIDENTIFIER; yyval.valuePtr->len = 2; yyval.valuePtr->value.oid = smiMalloc(2 * sizeof(SmiSubid)); yyval.valuePtr->value.oid[0] = 0; yyval.valuePtr->value.oid[1] = 0; ; break;}
I believe this code sets the default oid value to 0.0. If you have a default value in the MIB that is valid for example: myObjectID OBJECT-TYPE SYNTAX OBJECT IDENTIFIER MAX-ACCESS read-write STATUS current DESCRIPTION "An object." DEFVAL { { 1 3 6 1 4 1 9547 1 1 1 14 0 } } ::= { fooTest 14 }
The default value returned from smidump.exe is: scalar myObjectID { oid fooTest.14; type ObjectIdentifier; access readwrite; default zeroDotZero; description "An object."; };
Are you able use smidump to print out a default for an Object Identifier type other than zeroDotZero?
Thanks, pamela
Pamela Heckmann wrote:
Hello,
It appears as if the default value for type object identifier is hardcoded to 0.0. There is a TODO in the file(s) parser-smi*.c.
I need to implement default support for this type and was curious if anybody had done so already.
Thanks for all your help.
Pamela Heckmann Icon Laboratories, Inc.
-- !! This message is brought to you via the `libsmi' mailing list. !! Please do not reply to this message to unsubscribe. To unsubscribe or adjust !! your settings, send a mail message to libsmi-request@ibr.cs.tu-bs.de !! or look at https://www.ibr.cs.tu-bs.de/mailman/listinfo/libsmi.
-- Pamela Heckmann Icon Laboratories, Inc. Pam_Heckmann@icon-labs.com Not all those that wander are lost. -J.R.R. Tolkien, novelist and philologist (1892-1973)