Boost Users :
Subject: Re: [Boost-users] [ASIO] Resolver question
From: Leon Mlakar (leon_at_[hidden])
Date: 2016-02-24 20:05:07
On 25.02.2016 01:45, Gavin Lambert wrote:
> On 25/02/2016 12:55, Leon Mlakar wrote:
>> But that's still just a workaround, isn't it? 192.168.001.112 looks a
>> perfectly good dotted-decimal address to me.
> What does 192.168.077.112 mean? Is the third value 77 or 077==63?
> The usual convention for 0-prefixed numbers is to treat them as octal.
Granted, there is some potential for ambiguity. Still, the name
dotted-decimal format does imply base 10. Octal was even used for a
brief period ages ago, but was soon abandoned. Personally I've never
seen octal to be used for IP addresses. Come to think of it, never seen
octal used for any other purpose than academic exercise.
Ancient "Assigned Numbers" RFCs, on the other hand, listed 0 prefixed IP
addresses interpreted as decimal numbers.
I can understand how 192.168.001.112 came to be - such strings are often
a result of ill-conceived web or GUI forms, which design four
three-digit input fields and 0 prefix numbers to get required field width.
From this point on, the arguments can go both ways. I argue that for
user convenience the library should accept such addresses and interpret
them according to common practice. And document the interpretation,
> Boost-users mailing list
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net