AW: [SNMP4J] GenericAddress.parse(String) doesn't comply with IP standards?

Eggers, Henning Henning.Eggers at plath.de
Tue Apr 24 09:26:46 CEST 2007


Hi Rory!

> Subject: [SNMP4J] GenericAddress.parse(String) doesn't comply 
> with IP standards?

I was wondering, which IP standard you are referring to? I have never
seen IP addresses being represented using octal or hex values. Please
tell us the RFC you are referring to.
Actually, IPv4 addresses are 32 bit binary values. The "doted-decimal"
representation is just so it's easier for us humans to read them - but
it is still called "decimal".

> GenericAddress.parse("udp:192.168.0.0132/161");
> 
> The function doesn't work with Octal values, so when returning the IP
> address is will be 192.168.0.132 instead of 192.168.0.90.
> 
> Oddly though it works with Hex values, just not Octal.

As Frank pointed out, SNMP4J is using a library function here. This
function also works with IPv6 addresses which are represented in hex. So
I guess what you observe is a side effect of the functions ability to
parse IPv6 addresses but not the implementation of a standard for IPv4
addresses.

Regards,
Henning




More information about the SNMP4J mailing list