Hi.

I have added a new table with read-write elements into my MIB and mib2c
reports the following "errors" :

$ env MIBS="+./MY-MIB.mib" mib2c -c mib2c.mfd.conf myTable
...
...
writing to defaults/table-myTable.m2d
Starting MFD code generation...
writing to myTable.h
| +-> Processing table myTable
writing to myTable.c
writing to myTable_data_get.h
writing to myTable_data_get.c
| |   +-> Processing nonindex myVarA
| |   +-> Processing nonindex myVarB
writing to myTable_data_set.h
writing to myTable_data_set.c
Use of uninitialized value $key in hash element at /usr/lib/perl5/SNMP.pm
line 1311, <GEN89> line 386.
Use of uninitialized value $key in hash element at /usr/lib/perl5/SNMP.pm
line 1312, <GEN89> line 386.
Use of uninitialized value in null operation at /usr/lib/perl5/SNMP.pm line
1311, <GEN89> line 386.
...
...


My table looks like this:

myTable OBJECT-TYPE
        SYNTAX SEQUENCE OF MyEntry
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION
         "My Table"
   ::= { myObjects 13 }

myEntry OBJECT-TYPE
        SYNTAX      MyEntry
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION
         "My Entry"
        INDEX       { myIndex }
   ::= { myTable 1 }

MyEntry ::= SEQUENCE {
   myIndex Unsigned32,
   myVarA   Unsigned32,
   myVarB   Unsigned32
}

myIndex OBJECT-TYPE
        SYNTAX      Unsigned32
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION
         "My Index"
      ::= { myEntry 1 }

myVarA OBJECT-TYPE
        SYNTAX      Unsigned32
        MAX-ACCESS  read-write
        STATUS      current
        DESCRIPTION
         "Var A"
        DEFVAL { 0 }
      ::= { myEntry 2 }
myVarB OBJECT-TYPE
        SYNTAX      Unsigned32
        MAX-ACCESS  read-write
        STATUS      current
        DESCRIPTION
         "Var B"
        DEFVAL { 0 }
      ::= { myEntry 3 }

I have also added my table into conformance group, like:

...
...
myGroups    OBJECT IDENTIFIER ::= { myConformance 2 }
...
...
myCompliance MODULE-COMPLIANCE
   STATUS  current
   DESCRIPTION
      "Describes the requirements for conformance to the
      MY MIB."
   MODULE
      MANDATORY-GROUPS {
            myGroup
      }

       ::= { myCompliances 1 }
...
...
myGroup OBJECT-GROUP
    OBJECTS {
       myVarA,
       myVarB
    }
    STATUS current
    DESCRIPTION
       "My table group"
    ::= { myGroups 7 }
...
...

Could someone please help me with this? How can I get rid of this problem?
If my variables are set to not-accessible I do not get this errors.

I am working on Ubuntu 12.04. Perl and netsnmp packages are:

libperl-dev                            5.14.2-6ubuntu2.1
libsnmp-perl                           5.4.3~dfsg-2.4ubuntu1.1
libsnmp-dev                            5.4.3~dfsg-2.4ubuntu1.1

I would really appreciate your help with this.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to