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

Counter64 is replaceable by INTEGER (0..18446744073709551615) for

387 views
Skip to first unread message

Alexander Bubnov

unread,
Feb 16, 2009, 3:01:49 AM2/16/09
to
--===============2196798425716275339==
Content-Type: multipart/alternative; boundary=0016364175916663340463048eee

--0016364175916663340463048eee
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Hello!

Can you please give me an advice?

I am playing around with net snmp tutorials and when I register uint64_t
variable and try to get it with help of snmpget I can see error result:

linux-h110 snmp/mibs# snmpget -v1 -c rwpublic localhost
NET-SNMP-TUTORIAL-MIB::nstAgentSubagentObject.0
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: NET-SNMP-TUTORIAL-MIB::nstAgentSubagentObject.0

In case I replace Counter64 by INTEGER (0..18446744073709551615) in
NET-SNMP-TUTORIAL-MIB.txt
for NET-SNMP-TUTORIAL-MIB::nstAgentSubagentObject.0 - all passed OK.

Is it valide to do such replacement: INTEGER (0..18446744073709551615)
instead of Counter64 for MIBs V1?

Thanks in advance!

--
/BR, Alexander

--0016364175916663340463048eee
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<p>Hello!</p><p>Can you please give me an advice?<br clear=3D"all"></p><p>I=
am playing around with net snmp tutorials and when I register uint64_t var=
iable and try to get it with help of snmpget I can see error result:</p><p>
linux-h110 snmp/mibs# snmpget -v1 -c rwpublic localhost NET-SNMP-TUTORIAL-M=
IB::nstAgentSubagentObject.0<br>Error in packet<br>Reason: (noSuchName) The=
re is no such variable name in this MIB.<br>Failed object: NET-SNMP-TUTORIA=
L-MIB::nstAgentSubagentObject.0<br>
</p><p></p><p>In case I replace Counter64 by&nbsp;INTEGER (0..1844674407370=
9551615) in NET-SNMP-TUTORIAL-MIB.txt for&nbsp;NET-SNMP-TUTORIAL-MIB::nstAg=
entSubagentObject.0 - all passed OK.<br></p><p>Is it valide to do such repl=
acement: INTEGER (0..18446744073709551615) instead of Counter64 for MIBs V1=
?</p>
<p></p><p>Thanks in advance!</p><br>-- <br>/BR, Alexander<br>

--0016364175916663340463048eee--


--===============2196798425716275339==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
--===============2196798425716275339==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
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

--===============2196798425716275339==--

Dave Shield

unread,
Feb 16, 2009, 3:27:59 AM2/16/09
to
2009/2/16 Alexander Bubnov <alexande...@gmail.com>:

> I am playing around with net snmp tutorials and when I register uint64_t
> variable and try to get it with help of snmpget I can see error result:
>
> linux-h110 snmp/mibs# snmpget -v1 -c rwpublic localhost
> NET-SNMP-TUTORIAL-MIB::nstAgentSubagentObject.0
> Error in packet
> Reason: (noSuchName) There is no such variable name in this MIB.
> Failed object: NET-SNMP-TUTORIAL-MIB::nstAgentSubagentObject.0

That's correct. SNMPv1 does not support Counter64 syntax.
This was first introduced with SNMPv2.

> In case I replace Counter64 by INTEGER (0..18446744073709551615) in
> NET-SNMP-TUTORIAL-MIB.txt
> for NET-SNMP-TUTORIAL-MIB::nstAgentSubagentObject.0 - all passed OK.
>
> Is it valide to do such replacement: INTEGER (0..18446744073709551615)
> instead of Counter64 for MIBs V1?

Hmmmm..... I'm not sure.
The SNMPv1 specs (in particular, RFC1155) is somewhat vague about the
valid range of the code INTEGER syntax.

RFC2578 clarified things somewhat, and specifies SimpleSyntax as

CHOICE {
integer-value -- includes Integer32
INTEGER (-2147483648..2147483647),
:
}

So your definition is certainly not valid for a MIB written using SMIv2.
(i.e. anything starting with a MODULE-IDENTITY block).

My best guess is that *some* SNMP applications will be happy with such
a 64-bit INTEGER value, but other tools will not. For interoperability (which
is one of the main strengths of SNMP), you are probably best off not doing this.

The usual techniques are either to split the value over two 32-bit MIB objects,
or to redefine the object to use different (larger) units.


Dave

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H

Alexander Bubnov

unread,
Feb 16, 2009, 3:31:39 AM2/16/09
to
--===============7616076082717411188==
Content-Type: multipart/alternative; boundary=0016e649b804dd74e1046304fa69

--0016e649b804dd74e1046304fa69


Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Thanks Dave for great support!

2009/2/16 Dave Shield <D.T.S...@liverpool.ac.uk>

--
/BR, Alexander

--0016e649b804dd74e1046304fa69


Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Thanks Dave for great support!<br><br><div class=3D"gmail_quote">2009/2/16 =
Dave Shield <span dir=3D"ltr">&lt;<a href=3D"mailto:D.T.S...@liverpool.ac=
.uk">D.T.S...@liverpool.ac.uk</a>&gt;</span><br><blockquote class=3D"gmai=
l_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left=
:1ex;">
2009/2/16 Alexander Bubnov &lt;<a href=3D"mailto:alexande...@gmail.com=
">alexande...@gmail.com</a>&gt;:<br>
<div class=3D"Ih2E3d">&gt; I am playing around with net snmp tutorials and =
when I register uint64_t<br>
&gt; variable and try to get it with help of snmpget I can see error result=
:<br>
&gt;<br>
&gt; linux-h110 snmp/mibs# snmpget -v1 -c rwpublic localhost<br>
&gt; NET-SNMP-TUTORIAL-MIB::nstAgentSubagentObject.0<br>
&gt; Error in packet<br>
&gt; Reason: (noSuchName) There is no such variable name in this MIB.<br>
&gt; Failed object: NET-SNMP-TUTORIAL-MIB::nstAgentSubagentObject.0<br>
<br>
</div>That&#39;s correct. &nbsp; SNMPv1 does not support Counter64 syntax.<=
br>
This was first introduced with SNMPv2.<br>
<div class=3D"Ih2E3d"><br>
<br>
<br>
&gt; In case I replace Counter64 by INTEGER (0..18446744073709551615) in<br=
>
&gt; NET-SNMP-TUTORIAL-MIB.txt<br>
&gt; for NET-SNMP-TUTORIAL-MIB::nstAgentSubagentObject.0 - all passed OK.<b=
r>
&gt;<br>
&gt; Is it valide to do such replacement: INTEGER (0..18446744073709551615)=
<br>
&gt; instead of Counter64 for MIBs V1?<br>
<br>
</div>Hmmmm..... &nbsp; I&#39;m not sure.<br>
The SNMPv1 specs (in particular, RFC1155) is somewhat vague about the<br>
valid range of the code INTEGER syntax.<br>
<br>
RFC2578 clarified things somewhat, and specifies SimpleSyntax as<br>
<br>
&nbsp; &nbsp;CHOICE {<br>
&nbsp; &nbsp; &nbsp; &nbsp;integer-value &nbsp; &nbsp; &nbsp; &nbsp; &nbsp=
; &nbsp; &nbsp; -- includes Integer32<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;INTEGER (-2147483648..2147483647)=
,<br>
&nbsp; &nbsp; &nbsp; &nbsp;:<br>
&nbsp; &nbsp;}<br>
<br>
So your definition is certainly not valid for a MIB written using SMIv2.<br=
>
(i.e. anything starting with a MODULE-IDENTITY block).<br>
<br>
My best guess is that *some* SNMP applications will be happy with such<br>
a 64-bit INTEGER value, but other tools will not. &nbsp; For interoperabili=
ty (which<br>
is one of the main strengths of SNMP), you are probably best off not doing =
this.<br>
<br>
The usual techniques are either to split the value over two 32-bit MIB obje=
cts,<br>
or to redefine the object to use different (larger) units.<br>
<font color=3D"#888888"><br>
<br>
Dave<br>
</font></blockquote></div><br><br clear=3D"all"><br>-- <br>/BR, Alexander<b=
r>

--0016e649b804dd74e1046304fa69--


--===============7616076082717411188==


Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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


Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H

--===============7616076082717411188==


Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________


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

--===============7616076082717411188==--

0 new messages