Thread View: borland.public.cppbuilder.internet.socket
6 messages
6 total messages
Started by Mert CAN
Tue, 10 May 2005 13:28
How to read counter64 in IdSNMP
Author: Mert CAN
Date: Tue, 10 May 2005 13:28
Date: Tue, 10 May 2005 13:28
12 lines
1512 bytes
1512 bytes
I can read a 32 bit counter value by using the code below.
snmp_mng->QuickSend("1.3.6.1.2.1.2.2.1.10.4","public","192.168.2.1",1);
inoctet = StrToInt(snmp_mng->Reply->Value[0]);
But I can't get the counter64 type value by using the code below? Is there
a special way of reading it?
snmp_mng->QuickSend("1.3.6.1.3.9999.1.2.1.3.5","public",pch_snmp,1);
total_inoctet = snmp_mng->Reply->Value[0];
I captured the traffic. The response for my request for this OID is coming
to my computer. Also other SNMP manager utilities can read the value of this
OID but by using Indy 9, I couldn't read it.
Re: How to read counter64 in IdSNMP
Author: Remy Lebeau (TeamB)
Date: Tue, 10 May 2005 16:47
Date: Tue, 10 May 2005 16:47
16 lines
1331 bytes
1331 bytes
"Mert CAN" <sokrates1331@hotmail.com> wrote in message news:4280ba31$1@newsgroups.borland.com... > I captured the traffic. The response for my request for this OID is coming > to my computer. Please be more specific. What does the data actualy look like? Have you tried StrToInt64()? > by using Indy 9, I couldn't read it. Why not? You need to be more specific. Gambit
Re: How to read counter64 in IdSNMP
Author: Mert CAN
Date: Tue, 10 May 2005 19:05
Date: Tue, 10 May 2005 19:05
28 lines
1814 bytes
1814 bytes
The data returned is NULL for value[0]. I tried to use strtoint64() now but I didn't work. As you can see in my first message, the only change in my code is the OID that I requested. I also checked the ValueType of OID for the reply and it is true(70) but the value[0] is NULL. "Remy Lebeau (TeamB)" <no.spam@no.spam.com>, haber iletisinde �unlar� yazd�:4280e792$1@newsgroups.borland.com... > > "Mert CAN" <sokrates1331@hotmail.com> wrote in message > news:4280ba31$1@newsgroups.borland.com... > >> I captured the traffic. The response for my request for this OID is >> coming >> to my computer. > > Please be more specific. What does the data actualy look like? Have you > tried StrToInt64()? > >> by using Indy 9, I couldn't read it. > > Why not? You need to be more specific. > > > Gambit > >
Re: How to read counter64 in IdSNMP
Author: Remy Lebeau (TeamB)
Date: Tue, 10 May 2005 20:15
Date: Tue, 10 May 2005 20:15
15 lines
1578 bytes
1578 bytes
"Mert CAN" <sokrates1331@hotmail.com> wrote in message news:42810604$1@newsgroups.borland.com... > The data returned is NULL for value[0]. <snip> > I also checked the ValueType of OID for the reply and it is true(70) Indy doesn't have any knowledge of that particular ValueType, so it doesn't know how to decode it when filling in the Reply values. The value is NULL since it is an unknown type. This is because Counter64 was added in SNMP v2, which Indy does not implement yet. Gambit
Re: How to read counter64 in IdSNMP
Author: Mert CAN
Date: Wed, 11 May 2005 07:08
Date: Wed, 11 May 2005 07:08
27 lines
2080 bytes
2080 bytes
Thank you for your answer. I wonder if it is impossible to read the response by using udpbase->responsestring() function. Or is there any other way to get the value of this counter64? "Remy Lebeau (TeamB)" <no.spam@no.spam.com>, haber iletisinde �unlar� yazd�:42811636$1@newsgroups.borland.com... > > "Mert CAN" <sokrates1331@hotmail.com> wrote in message > news:42810604$1@newsgroups.borland.com... > >> The data returned is NULL for value[0]. > <snip> >> I also checked the ValueType of OID for the reply and it is true(70) > > Indy doesn't have any knowledge of that particular ValueType, so it > doesn't > know how to decode it when filling in the Reply values. The value is NULL > since it is an unknown type. This is because Counter64 was added in SNMP > v2, which Indy does not implement yet. > > > Gambit > >
Re: How to read counter64 in IdSNMP
Author: Remy Lebeau (TeamB)
Date: Wed, 11 May 2005 16:45
Date: Wed, 11 May 2005 16:45
15 lines
1600 bytes
1600 bytes
"Mert CAN" <sokrates1331@hotmail.com> wrote in message news:4281af67@newsgroups.borland.com... > I wonder if it is impossible to read the response by using > udpbase->responsestring() function. Or is there any other > way to get the value of this counter64? An easier way would be to manually update IdASN1Utils.pas to recognize Counter64 types, and then recompile the Indy library. That way, you can continue using TIdSNMP as-is, and you should then have non-NUL string values that you can pass to StrToInt64().. Gambit
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads