Telnet => servname ai_socktype error

Ashish SHUKLA ashish at FreeBSD.org
Sat Aug 14 03:37:35 UTC 2010


jaymax  writes:

> telnet 0 smtp
> is the same as
> telnet localhost 25 
> or 
> telnet localhost smtp

#v+
% getent hosts 0
0.0.0.0           0
% telnet 0 25
Trying 0.0.0.0...
Connected to 0.
Escape character is '^]'.
220 chateau.d.if ESMTP
^]
telnet> quit
Connection closed.
#v-

I wasn't expecting this to even work. I hope this connecting to the wild-card
address only works on the same box.

And sorry I didn't know that connecting to 0.0.0.0 actually connects to
127.0.0.1.

But its interesting how 'getent hosts' returns an IPv4 address when given a
32-bit number as hostname.

-- 
Ashish SHUKLA      | GPG: F682 CDCC 39DC 0FEA E116  20B6 C746 CFA9 E74F A4B0
freebsd.org!ashish | http://people.freebsd.org/~ashish/

“A designer knows he has achieved perfection not when there is nothing
left to add, but when there is nothing left to take away.” (Antoine de
Saint-Exupéry)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20100814/82d21d68/attachment.pgp


More information about the freebsd-questions mailing list