On Mon, 2005-11-07 at 15:56 -0500, Eugen wrote: > I’m trying the mib2c and it works fine for objects already defined in > the MIBs from /usr/share/snmp/mibs directory. > > But if I try to add a new MIB file I get the error > “You didn't give mib2c a valid OID to start with…” > when executing “mib2c my-root” command. > > > > The MIBS environment variable is set to ALL and I have a file called > MY-SMI-ROOT.txt (in /usr/share/snmp/mibs) containing the following MIB > definition: > > MY-SMI DEFINITIONS ::= BEGIN
It would probably be sensible to ensure that the file name and the name of the MIB module match. That's not strictly necessary, but it's definitely less confusing. Either rename the file to be 'MY-SMI.txt', or tweak the first line to read: MY-SMI-ROOT DEFINITIONS ::= BEGIN > my-root MODULE-IDENTITY Not strictly legal - you're not meant to use hyphens in SMIv2 MIB object names. > ::= { my_objectId 1 } Again, not legal - you can't use underscores either. > my_objectId OBJECT IDENTIFIER ::= { enterprises 17094 } > > END > What I’m missing here? An object to implement :-) If that's the full contents of your MIB file, then there aren't any OBJECT TYPE definitions at all, so there's nothing for mib2c to work with. Dave ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ 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