RE: mib2c: invalid OID

"Eugen" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <000401c5e484$ceecd250$5f0aa8c0@blueslicemtl>
Thanks a lot Dave for your answer. Now it works fine.

Actually this was not the real MIB, I've written it just to try
isolating the root cause of my error. Of course there are some objects
in it :-)

Id addition to the 2 issues you have mentioned, I had a 3rd one caused
by the fact that using the ALL value for the MIBS environment variable
it loads also the backup files generated by the text editor with the
extension .txt~. So, in my opinion it's better to use specific MIB
module names instead.

Best regards,
Eugen


-----Original Message-----
From: Dave Shield [mailto:[email protected]] 
Sent: Tuesday, November 08, 2005 5:09 AM
To: Eugen
Cc: [email protected]
Subject: Re: mib2c: invalid OID

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
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.