Hi Dave, 

    Thank you again for your time and patience. I know that sometimes I ask all 
the stupid questions but I'm just 22 and I'm still learning.
    Following your advice I've created a new MIB file, starting from 
netSnmpPlaypen, but similar as structure with previous one. When I checked the 
MIB file that I wrote I had only one warning: "current group "netSnmpPrvGroup" 
is not referenced in this module". How can I correct this warning?
    The second thing I have tried to do was to use the framework that 
recommended to me: 

      mib2c -S cache=1  -c mib2c.table_data.conf  netSnmpPrvTable
but I got this errors:

    se of uninitialized value $key in hash element at 
/usr/local/lib/perl5/SNMP.pm line 1377, <GEN0> line 274.
Use of uninitialized value $key in hash element at /usr/local/lib/perl5/SNMP.pm 
line 1378, <GEN0> line 274.
Use of uninitialized value in null operation at /usr/local/lib/perl5/SNMP.pm 
line 1377, <GEN0> line 274.
Use of uninitialized value $key in hash element at /usr/local/lib/perl5/SNMP.pm 
line 1377, <GEN0> line 274.
Use of uninitialized value $key in hash element at /usr/local/lib/perl5/SNMP.pm 
line 1380, <GEN0> line 274.
Use of uninitialized value $key in hash element at /usr/local/lib/perl5/SNMP.pm 
line 1377, <GEN0> line 278.
Use of uninitialized value $key in hash element at /usr/local/lib/perl5/SNMP.pm 
line 1380, <GEN0> line 278.
Use of uninitialized value $key in hash element at /usr/local/lib/perl5/SNMP.pm 
line 1377, <GEN0> line 278.
Use of uninitialized value $key in hash element at /usr/local/lib/perl5/SNMP.pm 
line 1380, <GEN0> line 278.
Use of uninitialized value $key in hash element at /usr/local/lib/perl5/SNMP.pm 
line 1377, <GEN0> line 278.
Use of uninitialized value $key in hash element at /usr/local/lib/perl5/SNMP.pm 
line 1380, <GEN0> line 278.


even the snmptranslate -IR -On netSnmpPrvATR  return the correct oid: 
.1.3.6.1.4.1.8072.9999.9999.1.2.1.3


That framework generated 2 files, netSnmpPrvTable.c (and .h) but sincerely I 
have no idea what to modify so I can bind a static value (eg. char[] 
atr="1234") to the variable. So please help me with more indications and code 
examples if you can.

Thank you very much and sorry for buzzing you around
Stefan Magda
NET-SNMP-MIB2 DEFINITIONS ::= BEGIN

--
-- Top-level infrastructure of the Net-SNMP project enterprise MIB tree
--

IMPORTS
    MODULE-IDENTITY,OBJECT-TYPE, Integer32, enterprises FROM SNMPv2-SMI
    OBJECT-GROUP FROM SNMPv2-CONF
    DisplayString FROM SNMPv2-TC;

netSnmp MODULE-IDENTITY
    LAST-UPDATED "200201300000Z"
    ORGANIZATION "www.net-snmp.org"
    CONTACT-INFO    
         "postal:   Wes Hardaker
                    P.O. Box 382
                    Davis CA  95617

          email:    net-snmp-cod...@lists.sourceforge.net"
    DESCRIPTION
        "Top-level infrastructure of the Net-SNMP project enterprise MIB tree"
    REVISION     "200201300000Z"
    DESCRIPTION
        "First draft"
    ::= { enterprises 8072}


--
--  Net-SNMP enterprise-specific management objects
--

netSnmpObjects              OBJECT IDENTIFIER ::= {netSnmp 1}
-- netSnmpExamples             OBJECT IDENTIFIER ::= {netSnmp 2}
netSnmpEnumerations         OBJECT IDENTIFIER ::= {netSnmp 3}
netSnmpModuleIDs            OBJECT IDENTIFIER ::= {netSnmpEnumerations 1}
netSnmpAgentOIDs            OBJECT IDENTIFIER ::= {netSnmpEnumerations 2}
netSnmpDomains              OBJECT IDENTIFIER ::= {netSnmpEnumerations 3}
netSnmpExperimental         OBJECT IDENTIFIER ::= {netSnmp 9999}

--
-- A subtree specifically designed for private testing purposes.
-- No "public" management objects should ever be defined within this tree.
--
-- It is provided for private experimentation, prior to transferring a MIB
-- structure to another part of the overall OID tree
--
netSnmpPlaypen              OBJECT IDENTIFIER ::= {netSnmpExperimental 9999}


------------------------------------------------------------------------------------------------------------

   netSnmpPrivateMib OBJECT IDENTIFIER ::= { netSnmpPlaypen 1 }

   
    netSnmpPrvNumber OBJECT-TYPE
        SYNTAX              Integer32
        MAX-ACCESS              read-only
        STATUS              current
        DESCRIPTION         "The number of network interfaces (regardless of
                            their current state) present on this system."
        ::= { netSnmpPrivateMib 1 }

    
    netSnmpPrvTable OBJECT-TYPE
        SYNTAX              SEQUENCE OF NetSnmpPrvEntry
        MAX-ACCESS              not-accessible
        STATUS              current
        DESCRIPTION         "My table."
        ::= { netSnmpPrivateMib 2 }

    netSnmpPrvEntry OBJECT-TYPE
        SYNTAX              NetSnmpPrvEntry
        MAX-ACCESS              not-accessible
        STATUS              current
        DESCRIPTION         "An interface entry containing objects at the 
subnetwork
                            layer and below for a particular interface."
        INDEX               {
                                netSnmpPrvIndex
                            }
        ::= { netSnmpPrvTable 1 }

   NetSnmpPrvEntry ::= SEQUENCE {
        netSnmpPrvIndex
            Integer32,
        netSnmpPrvOWD
            DisplayString,
        netSnmpPrvATR
            DisplayString
        
    }

    netSnmpPrvIndex OBJECT-TYPE
        SYNTAX              Integer32 (1..25)
        MAX-ACCESS              not-accessible
        STATUS              current
        DESCRIPTION         "A unique value for each interface. Its value ranges
                            between 1 and the value of ifNumber. The value
                            for each interface must remain constant at least
                            from one re-initialization of the entity's network
                            management system to the next re- initialization."
        ::= { netSnmpPrvEntry 1 }

    netSnmpPrvOWD OBJECT-TYPE
        SYNTAX                  DisplayString (SIZE(0..255))
        MAX-ACCESS            read-only
        STATUS                  current
        DESCRIPTION             "One way delay."
        ::= { netSnmpPrvEntry 2 }

    netSnmpPrvATR OBJECT-TYPE
        SYNTAX                  DisplayString (SIZE(0..255))
        MAX-ACCESS            read-only
        STATUS                  current
        DESCRIPTION             "Avaible Transfer Rate"
        ::= { netSnmpPrvEntry 3 }

    

------------------------------------------------------------------------------------------------------------

--
--  Notifications
--

netSnmpNotificationPrefix   OBJECT IDENTIFIER ::= {netSnmp 4}
netSnmpNotifications        OBJECT IDENTIFIER ::= {netSnmpNotificationPrefix 0}
netSnmpNotificationObjects  OBJECT IDENTIFIER ::= {netSnmpNotificationPrefix 1}


--
--  Conformance
--     (No laughing at the back!)
--

netSnmpConformance          OBJECT IDENTIFIER ::= {netSnmp 5}
netSnmpCompliances          OBJECT IDENTIFIER ::= {netSnmpConformance 1}
netSnmpGroups               OBJECT IDENTIFIER ::= {netSnmpConformance 2}

netSnmpPrvGroup OBJECT-GROUP
        OBJECTS  { netSnmpPrvNumber,
                   netSnmpPrvOWD,
                   netSnmpPrvATR }
        STATUS  current
        DESCRIPTION "Collection of objects"
        ::= {netSnmpGroups 1}

END
------------------------------------------------------------------------------
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