Subject: Re: sockaddr_snprintf
To: None <email@example.com>
From: Jun-ichiro itojun Hagino <firstname.lastname@example.org>
Date: 11/16/2004 13:34:46
> On Nov 16, 1:10pm, email@example.com (Jun-ichiro itojun Hagino) wrote:
> -- Subject: Re: sockaddr_snprintf
> | > Hi,
> | >
> | > I was missing a sockaddr pretty printer, and it was some amount of work
> | > on each program to write one... So I came up with this. Is this useful?
> | > Any suggestions on the interface? I was thinking of putting it in libutil.
> | please use getnameinfo(3) to get string representation of
> | AF_INET and AF_INET6 sockaddr. (for AF_INET6, it is a hard requirement)
> This is like using a machine gun to kill flies. I specifically
> don't want to do DNS, so I will have to put NI_NUMERICHOST, and I
> don't want to prefix the address with the scope, so I'll have to
> strip it later. And getnameinfo() uses inet_ntop() internally to
> do exactly what I am doing.
scoped address without sccope (fe80::1) is ambiguous and useless.
consider the following example:
if you are told that your peer is "fe80::1", you don't know which one
you are talking to.