Page 1 of 2

Values with dots

Posted: Tue Mar 24, 2009 8:34 am
by Wormi
Hi,

I realize that it has been a long time ago since release of the plugin Netstuff.
I've found it very useful, but i have also a problem.
I cannot get values with dots, in my case i would like to get IP address, also i've checked other values with dots in string and plugin returned nothing.
Can You provide plugin able to extract such values or source code of it?

Regards
Wormi

Re: Values with dots

Posted: Tue Mar 24, 2009 11:06 am
by phil
I will try and have a look tonight.
Its been a while since I looked at this too, but I think its because values with dots are not returned as strings and NetStuff does not know how to deal with them.

Assuming I have such values on my device, I will attempt to figure out the problem and decode the values to the correct format.

Thanks,
Phil

Re: Values with dots

Posted: Tue Mar 24, 2009 4:35 pm
by Wormi
Thank You !

I hope that won't be a problem for You :D

Regards
Wormi

Re: Values with dots

Posted: Wed Mar 25, 2009 2:22 am
by phil
Hi,

I've just made version 1.3 and put it on the downloads page.
Please try that, I think it now interprets the IPv4 addresses correctly.

I've not looked into IPv6 addresses but they are completely different anyway.

Let me know how you get on.

Thanks,
Phil

Re: Values with dots

Posted: Wed Mar 25, 2009 9:20 am
by Wormi
Hi,

Thanx for quick reaction :D

I did preliminary test in work, at SNMP enabled WinXP, and noticed that some numbers are switched.
I.E. expected address was 10.143.211.48 but received 10.121.211.48
other examples:
expected 192.168.142.1 - received 84.168.125.1
expected 192.142.168.1 - received 84.125.168.1
expected 192.244.245.246 - received 84.244.81.246
Also checked few other numbers, i can post results if that can help :)

Edit:
It seems that it affects octets with values over 127 (74 of them).

Regards
Wormi

Re: Values with dots

Posted: Thu Mar 26, 2009 4:01 am
by phil
DOH!
Yes that makes sense!
I messed up and cast the 0-255 to a signed byte not an unsigned byte!
Try again with the new 1.4 :)

Thanks,
Phil

Re: Values with dots

Posted: Thu Mar 26, 2009 7:44 am
by Wormi
Hi,

Now these 74 values seems to be bigger than 8bits in 1.5 :wink:
i.e.
128 in 1.4 = 172 ; 1.5 = 8364
130 in 1.4 = 26 ; 1.5 = 8218
132 in 1.4 = 30 ; 1.5 = 8222
133 in 1.4 = 38 ; 1.5 = 8230
134 in 1.4 = 32 ; 1.5 = 8224
135 in 1.4 = 33 ; 1.5 = 8225
...
189 in 1.4 = 221 ; 1.5 = 733
190 in 1.4 = 62 ; 1.5 = 318
191 in 1.4 = 124 ; 1.5 = 380
192 in 1.4 = 84 ; 1.5 = 340
...
254 in 1.4 = 99 ; 1.5 = 355
255 in 1.4 = 217 ; 1.5 = 729

Regards,
Wormi

Re: Values with dots

Posted: Thu Mar 26, 2009 10:29 pm
by phil
I presume you mean in 1.4 not 1.3 - there is no 1.5!
I will have to look at this a bit more closely - its clearly not as obvious an error as I first thought.

Phil

Re: Values with dots

Posted: Fri Mar 27, 2009 7:14 am
by Wormi
Yep, of course i meaned 1.3 and 1.4 not 1.4 and 1.5 :oops:

Thanks,
Wormi

Re: Values with dots

Posted: Sat Mar 28, 2009 2:21 am
by phil
Try again...
This time it is 1.5.

Thanks,
Phil

Re: Values with dots

Posted: Sat Mar 28, 2009 8:26 am
by Wormi
Hi,

File not found.

Regards,
Wormi

Re: Values with dots

Posted: Sat Mar 28, 2009 4:19 pm
by phil
I guess it helps if I copy the file to the server before setting up the link!... :)
That will teach me to update it at silly times, while intoxicated and waiting for F1!

Now, what's the chances of it working!!!!
NOTE: I'm struggling to test it because I don't have any high numbers in my IP's here - its all 10.10.0.x. I hope you dont mind testing it for me each time!

I guess if this one does not work I can throw together a virtual machine with high numbers temporarily and try and connect SNMP to it...

Phil

Re: Values with dots

Posted: Sun Mar 29, 2009 10:14 am
by Wormi
Hi,

There is no problem at all to test new versions :)
I hope that You aren't tired with finding solution... because ver.1.5 seems working like 1.4 (feral values are bigger than 8bits - ie. 148 -> 8221, 255->729 )

Regards,
Wormi

Re: Values with dots

Posted: Sun Mar 29, 2009 5:24 pm
by phil
OK that kind of makes sense. I will have to get an IP address > 7bits to test with here I think.

What language Windows are you running? I think that may be related because SNMP IP address is returned as a string. On my UK English, the string is ANSI (each char is 1 byte, 0-255) and it works with higher IP's (I just tried it). I suspect it is probably broken on unicode languages that use 2bytes per character. I will try and recreate it and find a fix to read the returned "string" as the byte array it really is.

Thanks,
Phil

Re: Values with dots

Posted: Sun Mar 29, 2009 6:06 pm
by phil
Please try 1.6. I've changed it to use a structure rather than a string. So I hope this will work - it seems to work fine here with high IP's like, for example: 239.255.255.250

Thanks,
Phil