On 28 May 2012 11:48, Magda Stefan <fane...@yahoo.com> wrote:
>                  Should I try to make a new MIB file from scratch?  I have
> attached (in the previous mail) a new mib file that I wrote 10 minutes ago.
> It has one scalar object, for the number of indexes, and a table prvTable
> with an index and another 3 columnar objects.

I've had a quick look at that MIB file, and have the following comments:

  -  It seems to be written using SMIv1, which is effectively obsolete.
     (It was replaced by SMIv2 in 1999!)
       I'd strongly suggest that you re-work this in SMIv2
             (essentially replace 'ACCESS' with 'MAX-ACCESS',
      add a MODULE-IDENTITY clause, and IMPORT elements
      from SNMPv2-SMI instead of RFC-1155)

  -  DisplayString is defined in SNMPv2-TC, so import it from
     here rather than defining it yourself

  -  prvIndex is an indexing object, so should be "not-accessible" rather
     than "read-only"

  -  the OIDs that you quote within the MIB (".1.2.1", "1.2.2", etc) are
     inconsistent with the MIB definitions.   These should actually be
     ".1.2.1.1", ".1.2.1.2", etc) - you've forgotten the subidentifier for
     prvEntry  (which has the OID .1.2.1)

  -  You cannot simply choose an arbitrary OID to act as the root of your
     MIB file.   In particular, you *CANNOT*  re-define or re-use the OID .1
     This is the root of the .iso tree  -   it's controlled by the International
     Standards Organisation.

If you don't have an enterprise number that you can use, then there's an
area with the netSnmp subtree that has been set aside for experimentation.
You are more than welcome to define a MIB under the node
    NET-SNMP-MIB::netSnmpPlaypen

i.e. .1.3.6.1.4.1.8072.9999.9999


But defining things directly under .1 is simply Not Allowed.
You MUST MUST MUST change this.
  (It may also be a significant factor in why things didn't work before)




> Assuming that the Mib file that I wrote is ok and I'm gonna use the mfd
> framework, can you help me with the steps (or/with the code)

Sorry - I have no knowledge about (or interest in) the MfD framework.
If you're going to use that approach, then I can't help.


>                I will appreciate your effort and you will help me a lot
> because even I know the C language, the way the framework generates the
> files confuses me.

Don't tell Robert, but the way that the MfD framework generates
the files confuses me too!    Although it's built on top of the handler
mechanism, it's got a very different mindset.   That's why I don't
tend to use this approach myself.
   Personally I'd generate a code template using

         mib2c -S cache=1  -c mib2c.table_data.conf  prvTable

and work with that.

Dave

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