APNIC Allocated 14/8, 223/8 today
jhary at unsane.co.uk
Wed Apr 14 09:35:28 CDT 2010
On 14/04/2010 13:45, Dave Hart wrote:
> On Wed, Apr 14, 2010 at 09:20 UTC, Nick Hilliard wrote:
>> On 14/04/2010 08:06, Srinivas Chendi <sunny at apnic.net> wrote to SANOG:
>> Please be careful about how you write this. "014" is formally an octal
>> representation, and what you've written there actually means that APNIC has
>> received 12/8 (= octal 014).
> My eyebrow raised at the leading zero as well, but I'd call it
> ambiguous. 0x14 is unambiguously decimal 20, but 014 is only
> unambiguous in a context that defines leading zero as implying octal.
> For a C program relying on the runtime to convert text to numeric
> representation, it depends. sscanf("%d", &myint) will convert 014 to
> decimal 14, "%i" gets decimal 12.
> I personally hunt down and kill %i and other octal-assuming code when
> I see it, except where octal is conventional. To my eyes, 0xFF (or
> FF) screams "all bits lit" while 0377 (or 377) only hesitantly clears
> its throat. Moreover, I assume computers will be used by people who
> have never had reason to believe a leading zero implies base 8, and I
> find no joy in forcing them to learn that quirk of computing history.
On an up to date OSX install (and Centos linux and FreeBSD)
(15:23:17 <~>) 0 $ ping 014.0.0.1
PING 014.0.0.1 (126.96.36.199): 56 data bytes
Request timeout for icmp_seq 0
>From windows 2003 servert
C:\Documents and Settings\Administrator>ping 014.0.0.01
Pinging 188.8.131.52 with 32 bytes of data:
wget (on linux and freebsd)
(15:26:02 <~>) 0 $ wget 014.0.0.1
--2010-04-14 15:26:06-- http://014.0.0.1/
Connecting to 014.0.0.1|184.108.40.206|:80...
Oddly on OSX it doesnt take it as octal
(15:27:30 <~>) 130 $ wget 014.0.0.1
--2010-04-14 15:27:31-- http://014.0.0.1/
Connecting to 014.0.0.1 (014.0.0.1)|220.127.116.11|:80...
When it comes to IP addresses, its not history, its important :)
> Take care,
> Dave Hart
More information about the NANOG