[tkined] Probs with counter32 when dealing with high numbers

Davide Minervini (honda@sodalia.it)
Fri, 10 Sep 1999 16:46:42 +0200

Hello to everyone from davide.

I have done a simple snmp-agent simulator which reads and create (with
the $snmp_session# instance ....... command)
the following snmp vars:
ifInOctets.1 4294967040
ifInOctets.2 65280
ifInOctets.3 4294600000
ifInOctets.4 4200000000

when it starts.
It accepts these values but when I do a "$snmp_session get......" on
those vars, what I get is

{1.3.6.1.2.1.2.2.1.10.1 Counter32 65280} wrong
!!!!
{1.3.6.1.2.1.2.2.1.10.2 Counter32 65280} right ( I
get the same bytes in number and value than the previous get !! How can
it distinguishes between them ??? (02 ff 00 in both packets)
{1.3.6.1.2.1.2.2.1.10.3 Counter32 16409920} wrong
!!!!!!!
{1.3.6.1.2.1.2.2.1.10.4 Counter32 4200000000} right even if
is a very high numer

here is the dumping of the respective snmp packets

ifInOctets.1:

send 45 bytes [193.76.253.95:2687]:
302b 0201 0004 0670 7562 6c69 63a2 1e02
022a ef02 0100 0201 0030 1230 1006 0a2b
0601 0201 0202 010a 0141 02ff 00 <- ????????????? (02 ff 00)

recv 43 bytes [193.76.253.95:2687]:
3029 0201 0004 0670 7562 6c69 63a1 1c02
026c a102 0100 0201 0030 1030 0e06 0a2b
0601 0201 0202 010a 0105 00

ifInOctets.2:

send 46 bytes [193.76.253.95:2687]:
302c 0201 0004 0670 7562 6c69 63a2 1f02
026c a102 0100 0201 0030 1330 1106 0a2b
0601 0201 0202 010a 0241 0300 ff00 <- (03 00 ff 00) different number (3
instead of 2 even if the carried value is lower) but same value (00 ff
00 here 2 bytes ff 00 in ifInOctets.1) ????????

recv 43 bytes [193.76.253.95:2687]:
3029 0201 0004 0670 7562 6c69 63a1 1c02
0249 1f02 0100 0201 0030 1030 0e06 0a2b
0601 0201 0202 010a 0205 00

ifInOctets.3:

send 46 bytes [193.76.253.95:2687]:
302c 0201 0004 0670 7562 6c69 63a2 1f02
0249 1f02 0100 0201 0030 1330 1106 0a2b
0601 0201 0202 010a 0341 03fa 6540

recv 43 bytes [193.76.253.95:2687]:
3029 0201 0004 0670 7562 6c69 63a1 1c02
0238 1302 0100 0201 0030 1030 0e06 0a2b
0601 0201 0202 010a 0305 00

ifInOctets.4:

send 47 bytes [193.76.253.95:2687]:
302d 0201 0004 0670 7562 6c69 63a2 2002
0238 1302 0100 0201 0030 1430 1206 0a2b
0601 0201 0202 010a 0441 04fa 56ea 00 <- the only one correct with all
the 4 bytes in the packet necessary to carry such a high number

recv 43 bytes [193.76.253.95:2687]:
3029 0201 0004 0670 7562 6c69 63a1 1c02
0242 1702 0100 0201 0030 1030 0e06 0a2b
0601 0201 0202 010a 0405 00

My questions are:
Am I doing something wrong ??
What happens to cause such a mistake ??
Is there already a patch to it ???

I have check on the archive there was a similar question but without the
dumping of the packets.
I thank you in advance for your quick responses.
I have already had some probs solved by you.

thanks again
Davide

ciao

--
!! This message is brought to you via the `tkined & scotty' mailing list.
!! Please do not reply to this message to unsubscribe. To subscribe or
!! unsubscribe, send a mail message to <tkined-request@ibr.cs.tu-bs.de>.
!! See http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/ for more information.