Subject: Re: sockaddr_snprintf
To: Jun-ichiro itojun Hagino <itojun@itojun.org>
From: Christos Zoulas <christos@zoulas.com>
List: tech-userlevel
Date: 11/15/2004 23:26:10
On Nov 16,  1:10pm, itojun@itojun.org (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.

christos