specifying OID value

HI, I wrote a small mib module and tested with libsmi. I encountered a problem and would like to know what i am missing.
<-------------------START OF MIB---------------------------> C-MIB DEFINITIONS ::= BEGIN
IMPORTS MODULE-IDENTITY, OBJECT-IDENTITY FROM SNMPv2-SMI TestString FROM A-MIB; cMIB MODULE-IDENTITY [...] ::= { snmpModules 100 }
testObjectIdentity OBJECT-IDENTITY STATUS current DESCRIPTION "abc." REFERENCE "xyz." ::= { cMIB 1 }
test-var9 OBJECT-TYPE SYNTAX TestString MAX-ACCESS read-only STATUS current DESCRIPTION "The management context from which to obtain mteTriggerValueID." ::= { testObjectIdentity(1) 1 } --LINE NUMBER 51
END <-------------------END OF MIB--------------------------->
I ran the command " smidump -l 5 -f smiv2 E-MIB " and got error: "E-MIB:51: an object named `testObjectIdentity' already exists smidump: module `E-MIB' contains errors, expect flawed output"
If i change the line number 51 to ::= { testObjectIdentity 1 } , i don't get any error. What is wrong in line number 51?
____________________________________________________________________________ ___________ -Vinoth iDEN OMC Software, Motorola
*************************************** *[ ] General Business Information *[X] Motorola Internal Use only *[ ] Motorola Confidential Proprietary *************************************** ____________________________________________________________________________ ___________

Hi!
Vinoth> I wrote a small mib module and tested with libsmi. I Vinoth> encountered a problem and would like to know what i am Vinoth> missing.
Vinoth> testObjectIdentity OBJECT-IDENTITY [...] Vinoth> ::= { cMIB 1 } Vinoth> test-var9 OBJECT-TYPE [...] Vinoth> ::= { testObjectIdentity(1) 1 } --LINE NUMBER 51
Vinoth> I ran the command " smidump -l 5 -f smiv2 E-MIB " and got error: Vinoth> "E-MIB:51: an object named `testObjectIdentity' already exists Vinoth> smidump: module `E-MIB' contains errors, expect flawed output"
Vinoth> If i change the line number 51 to ::= { testObjectIdentity 1 } Vinoth> , i don't get any error. What is wrong in line number 51?
The OID value of testObjectIdentity is already defined by the OBJECT-IDENTITY construct. The "(1)" in "{ testObjectIdentity(1) 1 }" does not make sense.
What meaning would you expect? A redundant repitition of the fact that the last sub-oid of testObjectIdentity is "1"? Or a redefinition of testObjectIdentity to the one-digit OID value "1" and the defintion of test-var9 to "1.1"?
Your change to "{ testObjectIdentity 1 }" is (syntactically) correct and defines the value of test-var9 to "testObjectIdentity.1" == "cMIB.1.1".
-frank

HI,
Frank - it is perfectly legal to specify "{ testObjectIdentity(1) 1 }" for the OID value. And the result is the OID value of { 1 1 } Of course, this is probably not the desired result.
At 02:08 PM 12/26/2002 +0100, Frank Strauss wrote:
Hi!
Vinoth> I wrote a small mib module and tested with libsmi. I Vinoth> encountered a problem and would like to know what i am Vinoth> missing.
Vinoth> testObjectIdentity OBJECT-IDENTITY [...] Vinoth> ::= { cMIB 1 } Vinoth> test-var9 OBJECT-TYPE [...] Vinoth> ::= { testObjectIdentity(1) 1 } --LINE NUMBER 51
Vinoth> I ran the command " smidump -l 5 -f smiv2 E-MIB " and got error: Vinoth> "E-MIB:51: an object named `testObjectIdentity' already exists Vinoth> smidump: module `E-MIB' contains errors, expect flawed output"
Vinoth> If i change the line number 51 to ::= { testObjectIdentity 1 } Vinoth> , i don't get any error. What is wrong in line number 51?
The OID value of testObjectIdentity is already defined by the OBJECT-IDENTITY construct. The "(1)" in "{ testObjectIdentity(1) 1 }" does not make sense.
What meaning would you expect? A redundant repitition of the fact that the last sub-oid of testObjectIdentity is "1"? Or a redefinition of testObjectIdentity to the one-digit OID value "1" and the defintion of test-var9 to "1.1"?
Your change to "{ testObjectIdentity 1 }" is (syntactically) correct and defines the value of test-var9 to "testObjectIdentity.1" == "cMIB.1.1".
-frank
Regards, /david t. perkins
participants (3)
-
David T. Perkins
-
Frank Strauss
-
Vinoth Palaniappan