Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problems with mib2c oid error yet snmptranslate works fine...

192 views
Skip to first unread message

Jesus....@us.corp.terra.com

unread,
Sep 19, 2005, 2:44:26 PM9/19/05
to
This is a multipart message in MIME format.
--=_alternative 0066CF1285257081_=
Content-Type: text/plain; charset="US-ASCII"

Hi List,

I'm having trouble converting MIB files to .c and .h files using mib2c.
I'm doing as follows:

$ MIBS="+UCD-DISKIO-MIB" mib2c -c mib2c.conf UCD-DISKIO-MIB

But I get this error:

You didn't give mib2c a valid OID to start with. IE, I could not
find
any information about the mib node "UCD-DISKIO-MIB". This could
be caused..............

Yet, if I do this:

$ MIBS="+UCD-DISKIO-MIB"
$ snmptranslate UCD-DISKIO-MIB::diskIOIndex -On

I get this:
.1.3.6.1.4.1.2021.13.15.1.1.1

So, yes... the MIB is being loaded. I uninstalled all the old net-snmp
RPM's from the system, and compiled net-snmp 5.1.3.1 configured as
follows:

$ ./configure --with-mib-modules=host --with-perl-modules

I also tried configuring net-snmp with --with-mib-modules="host
ucd-snmp/diskio" which compiles UCD-DISKIO-MIB for me. However, I would
like to
know why mib2c is not working for me when I want to convert a MIB file
into a module if I'm doing exactly as the documentation says, even all the
examples work for me, it's simply the mib2c part the one not working.

Thanks,

Jesus Altuve
Terra.com


--=_alternative 0066CF1285257081_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2 face="sans-serif">Hi List,</font>
<br>
<br><font size=2 face="sans-serif">I'm having trouble converting MIB files
to .c and .h files using mib2c. I'm doing as follows:</font>
<br>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; $
MIBS=&quot;+UCD-DISKIO-MIB&quot; mib2c -c mib2c.conf UCD-DISKIO-MIB</font>
<br>
<br><font size=2 face="sans-serif">But I get this error:</font>
<br>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; You
didn't give mib2c a valid OID to start with. &nbsp;IE, I could not find</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; any
information about the mib node &quot;UCD-DISKIO-MIB&quot;. &nbsp;This could
be caused..............</font>
<br>
<br><font size=2 face="sans-serif">Yet, if I do this:</font>
<br>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$
MIBS=&quot;+UCD-DISKIO-MIB&quot;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$
snmptranslate UCD-DISKIO-MIB::diskIOIndex -On </font>
<br>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; I
get this:</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; .1.3.6.1.4.1.2021.13.15.1.1.1</font>
<br>
<br><font size=2 face="sans-serif">So, yes... the MIB is being loaded.
I uninstalled all the old net-snmp RPM's from the system, and compiled
net-snmp 5.1.3.1 configured as follows:</font>
<br>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; $
./configure --with-mib-modules=host &nbsp;--with-perl-modules </font>
<br>
<br><font size=2 face="sans-serif">I also tried configuring net-snmp with
--with-mib-modules=&quot;host ucd-snmp/diskio&quot; which compiles UCD-DISKIO-MIB
for me. However, I would like to</font>
<br><font size=2 face="sans-serif">know why mib2c is not working for me
when I want to convert a MIB file into a module if I'm doing exactly as
the documentation says, even all the examples work for me, it's simply
the mib2c part the one not working.</font>
<br>
<br><font size=2 face="sans-serif">Thanks,</font>
<br><font size=2 face="sans-serif"><br>
Jesus Altuve<br>
Terra.com<br>
<br>
</font>
--=_alternative 0066CF1285257081_=--


-------------------------------------------------------
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-snm...@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Ying Wang(CD)

unread,
Sep 19, 2005, 11:31:09 PM9/19/05
to
Try this:
First make sure your mib is in right scope the mib2c can search, the =
default path is /usr/local/share/snmp/mibs/. Then, execute "exports =
MIBS=3DALL".

-----Original Message-----
From: net-snmp-u...@lists.sourceforge.net =
[mailto:net-snmp-u...@lists.sourceforge.net] On Behalf Of =
net-snmp-us...@lists.sourceforge.net
Sent: 2005=C4=EA9=D4=C220=C8=D5 11:15
To: net-snm...@lists.sourceforge.net
Subject: Net-snmp-users digest, Vol 1 #3123 - 4 msgs

Send Net-snmp-users mailing list submissions to
net-snm...@lists.sourceforge.net

To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
or, via email, send a message with subject or body 'help' to
net-snmp-us...@lists.sourceforge.net

You can reach the person managing the list at
net-snmp-u...@lists.sourceforge.net

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Net-snmp-users digest..."


Today's Topics:

1. Problem with installation (configure error) (the...@gmx.net)
2. Re: Problem with installation (configure error) (Danny =
Milosavljevic)
3. Problems with mib2c oid error yet snmptranslate works fine... =
(Jesus....@us.corp.terra.com)
4. [SOLVED]: the accurate description of the snmp error (Ying =
Wang(CD))

--__--__--

Message: 1
Date: Mon, 19 Sep 2005 14:20:51 +0200 (MEST)
From: the...@gmx.net
To: net-snm...@lists.sourceforge.net
Subject: Problem with installation (configure error)

Hello,

when I try to run ./configure, I get the following error:

linux:/net-snmp-5.2.1.2 # sh ./configure
: command not found4:
./configure: line 22: syntax error near unexpected token `elif'
./configure: line 22: elif test -n "${BASH_VERSION+set}" && (set -o =
posix)
>/dev/null 2>&1; then

What do I need to do to install the package?

My system is:
SuSE Linux 9.1
gcc 3.3.3
bash 2.05b.0(1)-release
net-snmp-5.2.1.2
I'm logged in as root.

Thanks in advance,
Klaus G=A8=B9rtler

--=20
5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail
+++ GMX - die erste Adresse f=A8=B9r Mail, Message, More +++


--__--__--

Message: 2
Date: Mon, 19 Sep 2005 15:24:48 +0200
From: Danny Milosavljevic <danny.mil...@fabalabs.org>
To: the...@gmx.net
CC: net-snm...@lists.sourceforge.net
Subject: Re: Problem with installation (configure error)

This is a multi-part message in MIME format.
--------------060201050800030100070005
Content-Type: text/plain; charset=3DISO-8859-1; format=3Dflowed
Content-Transfer-Encoding: 8bit

Hi,

the...@gmx.net schrieb:

>Hello,
>
>when I try to run ./configure, I get the following error:
>
>linux:/net-snmp-5.2.1.2 # sh ./configure
>: command not found4:
>./configure: line 22: syntax error near unexpected token `elif'
>./configure: line 22: elif test -n "${BASH_VERSION+set}" && (set -o =
posix)
> =20
>
>>/dev/null 2>&1; then
>> =20
>>
>
> =20
>
What are those lines in "configure" (around line number 22 and a few=20
lines before) ?

>What do I need to do to install the package?
>
>My system is:
>SuSE Linux 9.1
>gcc 3.3.3
>bash 2.05b.0(1)-release
>net-snmp-5.2.1.2
>I'm logged in as root.
>
>Thanks in advance,
>Klaus G=A8=B9rtler
>
> =20
>
cheers,
Danny


--------------060201050800030100070005
Content-Type: text/x-vcard; charset=3Dutf-8;
name=3D"danny.milosavljevic.vcf"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename=3D"danny.milosavljevic.vcf"

begin:vcard
fn:Danny Milosavljevic
n:Milosavljevic;Danny
org:Fabalabs Software GmbH
adr:;;Honauerstrasse 4;Linz;;4020;Austria
email;internet:danny.mil...@fabalabs.org
title:Research & Development
x-mozilla-html:FALSE
version:2.1
end:vcard


--------------060201050800030100070005--


--__--__--

Message: 3
To: net-snm...@lists.sourceforge.net
Subject: Problems with mib2c oid error yet snmptranslate works fine...
From: Jesus....@us.corp.terra.com
Date: Mon, 19 Sep 2005 14:43:06 -0400

This is a multipart message in MIME format.

--=3D_alternative 0066CF1285257081_=3D
Content-Type: text/plain; charset=3D"US-ASCII"

Hi List,

I'm having trouble converting MIB files to .c and .h files using mib2c.=20


I'm doing as follows:

$ MIBS=3D"+UCD-DISKIO-MIB" mib2c -c mib2c.conf UCD-DISKIO-MIB

But I get this error:

You didn't give mib2c a valid OID to start with. IE, I could =
not=20
find
any information about the mib node "UCD-DISKIO-MIB". This could =

be caused..............

Yet, if I do this:

$ MIBS=3D"+UCD-DISKIO-MIB"
$ snmptranslate UCD-DISKIO-MIB::diskIOIndex -On=20

I get this:
.1.3.6.1.4.1.2021.13.15.1.1.1

So, yes... the MIB is being loaded. I uninstalled all the old net-snmp=20
RPM's from the system, and compiled net-snmp 5.1.3.1 configured as=20
follows:

$ ./configure --with-mib-modules=3Dhost --with-perl-modules=20

I also tried configuring net-snmp with --with-mib-modules=3D"host=20
ucd-snmp/diskio" which compiles UCD-DISKIO-MIB for me. However, I would=20
like to
know why mib2c is not working for me when I want to convert a MIB file=20
into a module if I'm doing exactly as the documentation says, even all =
the=20


examples work for me, it's simply the mib2c part the one not working.

Thanks,

Jesus Altuve
Terra.com


--=3D_alternative 0066CF1285257081_=3D
Content-Type: text/html; charset=3D"US-ASCII"


<br><font size=3D2 face=3D"sans-serif">Hi List,</font>
<br>
<br><font size=3D2 face=3D"sans-serif">I'm having trouble converting MIB =


files
to .c and .h files using mib2c. I'm doing as follows:</font>
<br>

<br><font size=3D2 face=3D"sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; $
MIBS=3D&quot;+UCD-DISKIO-MIB&quot; mib2c -c mib2c.conf =
UCD-DISKIO-MIB</font>
<br>
<br><font size=3D2 face=3D"sans-serif">But I get this error:</font>
<br>
<br><font size=3D2 face=3D"sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; You
didn't give mib2c a valid OID to start with. &nbsp;IE, I could not =
find</font>
<br><font size=3D2 face=3D"sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; any
information about the mib node &quot;UCD-DISKIO-MIB&quot;. &nbsp;This =


could
be caused..............</font>
<br>

<br><font size=3D2 face=3D"sans-serif">Yet, if I do this:</font>
<br>
<br><font size=3D2 face=3D"sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; =
&nbsp;$
MIBS=3D&quot;+UCD-DISKIO-MIB&quot;</font>
<br><font size=3D2 face=3D"sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; =


&nbsp;$
snmptranslate UCD-DISKIO-MIB::diskIOIndex -On </font>
<br>

<br><font size=3D2 face=3D"sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; I
get this:</font>
<br><font size=3D2 face=3D"sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; =
.1.3.6.1.4.1.2021.13.15.1.1.1</font>
<br>
<br><font size=3D2 face=3D"sans-serif">So, yes... the MIB is being =


loaded.
I uninstalled all the old net-snmp RPM's from the system, and compiled
net-snmp 5.1.3.1 configured as follows:</font>
<br>

<br><font size=3D2 face=3D"sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; $
./configure --with-mib-modules=3Dhost &nbsp;--with-perl-modules </font>
<br>
<br><font size=3D2 face=3D"sans-serif">I also tried configuring net-snmp =
with
--with-mib-modules=3D&quot;host ucd-snmp/diskio&quot; which compiles =


UCD-DISKIO-MIB
for me. However, I would like to</font>

<br><font size=3D2 face=3D"sans-serif">know why mib2c is not working for =


me
when I want to convert a MIB file into a module if I'm doing exactly as
the documentation says, even all the examples work for me, it's simply
the mib2c part the one not working.</font>
<br>

<br><font size=3D2 face=3D"sans-serif">Thanks,</font>
<br><font size=3D2 face=3D"sans-serif"><br>


Jesus Altuve<br>
Terra.com<br>
<br>
</font>

--=3D_alternative 0066CF1285257081_=3D--


--__--__--

Message: 4
Subject: [SOLVED]: the accurate description of the snmp error
Date: Tue, 20 Sep 2005 08:38:03 +0800
From: "Ying Wang\(CD\)" <Ying...@o2micro.com>
To: "Dave Shield" <D.T.S...@csc.liv.ac.uk>
Cc: <net-snm...@lists.sourceforge.net>

Hi Dave,

Thank you! I got it.

> With SNMPv1, a read-only community (not user) trying to
> SET a value will result in a noSuchName error.

I still think noSuchName is not a suitable error type for this case.

BR

yolanda

-----Original Message-----
From: Dave Shield [mailto:D.T.S...@csc.liv.ac.uk]=3D20
Sent: 2005=3DC4=3DEA9=3DD4=3DC219=3DC8=3DD5 16:18
To: Ying Wang(CD)
Cc: net-snm...@lists.sourceforge.net
Subject: Re: the accurate description of the snmp error

On Mon, 2005-09-19 at 13:49 +0800, Ying Wang(CD) wrote:
> Where can I find the accurate description of the snmp error?=3D20

In the SNMP specification documents - RFC 1157 for SNMPv1,
RFC 1905 for SNMPv2c, RFCs 3414 and 3416 for SNMPv3/USM.


> Which error is right when a invalid user to access mib,
> such as a SNMPv1 read-only user does a configuration,
> or a unknown user read something?

With SNMPv1, a read-only community (not user) trying to
SET a value will result in a noSuchName error.
With SNMPv2c (or SNMPv3), a read-only community (or user)
trying to SET a value will result in a noAccess error.

With SNMPv1 and SNMPv2c, a completely unknown community will
be silently dropped, and no response will be returned at all.
With SNMPv3, this will return an authenticationFailure
report.

See the RFCs for the full gory details.

Dave

--__--__--

_______________________________________________
Net-snmp-users mailing list
Net-snm...@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/net-snmp-users


End of Net-snmp-users Digest

Robert Story

unread,
Sep 23, 2005, 11:41:56 AM9/23/05
to
On Tue, 20 Sep 2005 11:40:58 -0400 Jesus....@us.corp.terra.com wrote:
JACTC> Thank you, it works now... very simple indeed... my impression was that
JACTC> mib2c converted the entire tree given a mib name. Jesus Altuve

Most will, but you still have to give it an object name, not the MIB name. If
you want multiple scalars/tables, use a top level object name.

--
NOTE: messages sent directly to me, instead of the lists, will be deleted
unless they are requests for paid consulting services.

Robert Story; NET-SNMP Junkie
Support: <http://www.net-snmp.org/> <irc://irc.freenode.net/#net-snmp>
Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-users>

You are lost in a twisty maze of little standards, all different.

0 new messages