In a message written on Thu, Oct 03, 2002 at 12:55:15PM -0700, Crist J. Clark wrote: > This is a feature not a bug since it is documented in inet_aton(3), > > 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).
While I agree it's documented, does it agree with practice? The earliest reference I could find was RFC 952 (ftp://ftp.isi.edu/in-notes/rfc952.txt): 2. Internet Addresses are 32-bit addresses [See RFC-796]. In the host table described herein each address is represented by four decimal numbers separated by a period. Each decimal number represents 1 octet. There are several other references to this format, including some later RFC's with BNF forms that have similar specifications. It would seem some people believe "dotted quad" format addresses are always composed of /decimal/ components. While I had no idea things like "0xffffff00" were just handded to inet_aton (although it makes some sense), it would seem to me much better if: 0xffffff00 was hex, 0123456701234567 was octal, 010.010.010.010 was 4 decimal parts I was very surprised from the poster that 192.168.0.010 might actually be 192.168.0.8. -- Leo Bicknell - [EMAIL PROTECTED] - CCIE 3440 PGP keys at http://www.ufp.org/~bicknell/ Read TMBG List - [EMAIL PROTECTED], www.tmbg.org To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message