inet_aton behavior

Volodymyr Kostyrko arcade at synergetica.dn.ua
Wed Mar 29 17:51:38 UTC 2006


Hi all.

   Roaming recently through whois database i've stumbled upon the 
following ip-address notations:

   194.134.086.040
   212.223.085.184
   212.129.243.040
   194.134.086.32
   ... etc ...

   Giving this addresses to inet_aton results in exceptions, or address 
misspelling due to:

[man inet_aton]
      All numbers supplied as ``parts'' in a `.' notation may be decimal,
      octal, or hexadecimal, as specified in the C language (i.e., a 
leading 0x
      or 0X implies hexadecimal; otherwise, a leading 0 implies octal; 
other-
      wise, the number is interpreted as decimal).
[man inet_aton]

   However, RFC1166 names addresses as "dotted decimal" and doesn't 
specifies any form of writing 'em with octal or hexadecimal numbers.

   Am I wrong somewhere? Does inet_aton breaks RFC? Is there any other 
common functions to process those "expanded with zeroes" addresses?

-- 
[WBR], Arcade.


More information about the freebsd-net mailing list