resolveip 0127.001 what the fuck?
Oliver Fromme
olli at lurza.secnetix.de
Mon Feb 8 17:57:20 UTC 2010
deeptech71 at gmail.com wrote:
> %resolveip 127
> resolveip: Unable to find hostname for '127'
> %resolveip 127.0
> resolveip: Unable to find hostname for '127.0'
> %resolveip 127.1
> Host name of 127.1 is localhost, localhost.my.domain
> %resolveip 127.2
> resolveip: Unable to find hostname for '127.2'
> %resolveip 127.0.1
> Host name of 127.0.1 is localhost, localhost.my.domain
> %resolveip 127.00000.00000.001
> Host name of 127.00000.00000.001 is localhost, localhost.my.domain
>
> %resolveip 127.1
> Host name of 127.1 is localhost, localhost.my.domain
> %resolveip 0127.1
> Host name of 0127.1 is host1-0-dynamic.0-87-r.retail.telecomitalia.it
> %resolveip 0127.2
> Host name of 0127.2 is host2-0-dynamic.0-87-r.retail.telecomitalia.it
> %resolveip 0127.0.0.1
> Host name of 0127.0.0.1 is host1-0-dynamic.0-87-r.retail.telecomitalia.it
> %resolveip 0127.0
> resolveip: Unable to find hostname for '0127.0'
>
> %resolveip 000000127.0.000000000000000000023.000000000024
> Host name of 000000127.0.000000000000000000023.000000000024 is
> host20-19-dynamic.0-87-r.retail.telecomitalia.it
> %resolveip 000000127.23.000000000.1
> Host name of 000000127.23.000000000.1 is
> host1-0-static.23-87-b.business.telecomitalia.it
> %resolveip 000000127.24.0.1
> Host name of 000000127.24.0.1 is
> host1-0-static.24-87-b.business.telecomitalia.it
> %resolveip 000000127.55.0.1
> Host name of 000000127.55.0.1 is 0x57370001.ge-1-1-0-1100.esnqu2.dk.ip.tdc.net
> %resolveip 000000127.0000000055.0.1
> resolveip: Unable to find hostname for '000000127.0000000055.0.1'
I don't know the "resolveip" tool (doesn't seem to be part
of FreeBSD), but obviously it interprets numbers that begin
with "0" as octal numbers, as is standard behaviour in C
and some other languages.
Given that, all of the above results are perfectly correct.
Best regards
Oliver
PS: For quick conversion on the command line, I use dc(1):
$ dc -e 8i127p
87
$ dc -e 8o87p
127
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"When your hammer is C++, everything begins to look like a thumb."
-- Steve Haflich, in comp.lang.c++
More information about the freebsd-chat
mailing list