0

I'm finding the solution to declare INDEX clause without using/bind with any variable in MIB table.

Generally when declare INDEX clause I use 1 variable as index e.g.

dataEntry OBJECT-TYPE
SYNTAX  dataEntry
ACCESS  not-accessible
STATUS  mandatory
DESCRIPTION
"The entry of data Table"
INDEX  { dataIndex }
   ::=  {  dataTable 1 }
dataEntry ::= SEQUENCE {
   dataIndex
      INTEGER,
   dataValue
      INTEGER
}
dataIndex OBJECT-TYPE
SYNTAX  INTEGER
ACCESS  read-only
STATUS  mandatory
DESCRIPTION
"The index of data table"
   ::=  {  dataEntry 1   }

dataValue OBJECT-TYPE
.
.

but what I want is use dataIndex in INDEX clause but will not declare it in SEQUENCE and variable. something right this

dataEntry OBJECT-TYPE
SYNTAX  dataEntry
ACCESS  not-accessible
STATUS  mandatory
DESCRIPTION
"The entry of data Table"
INDEX  { dataIndex }
   ::=  {  dataTable 1 }
dataEntry ::= SEQUENCE {
   dataValue
      INTEGER
}
dataValue OBJECT-TYPE
.
.

What I wrote is compiled error for sure, but is it have possible solution for what I want?

Tunaki
  • 132,869
  • 46
  • 340
  • 423
  • If your intention is to invent your own standard, make sure you don't call it MIB to avoid confusing others. – Lex Li Nov 18 '15 at 08:02
  • Hi @LexLi , I'm not try to invent my own standard. I just not sure is it possible in MIB standard. thank you for replying. – David Comp Nov 18 '15 at 08:31

1 Answers1

-1

Instead of reinventing the wheel please consider learning the following parts of SMI standards:

Augmented Table: Augmented Table comes in to picture when there is one-to-one dependency between rows of one table and rows in another table. Wherein one table is the base and the other augmenting table. This might arise when a particular MIB imports another MIB and shares the same table (A classic example is If-MIB imports the group interfaces defined in RFC1213-MIB, where IF-MIB augments the ifTable defined in RFC1213-MIB)

Tables with External index: These tables are similar to the augmented tables which shares the index values with other tables except that these are SMIv1 tables and the augmented tables are SMIv2 tables.

Andrew Komiagin
  • 6,446
  • 1
  • 13
  • 23