Re: [PATCH 1/3] Use the protocol name of a socket as a hint for peer address resolution

2014-12-08 Thread Dmitry V. Levin
On Sun, Dec 07, 2014 at 06:56:13AM +0900, Masatake YAMATO wrote: [...] > --- a/socketutils.c > +++ b/socketutils.c > @@ -138,33 +138,56 @@ receive_responses(const int fd, const unsigned long > inode) > } > } > > +static bool > +inet_print(int fd, int family, int protocol, const unsigned l

[PATCH 1/3] Use the protocol name of a socket as a hint for peer address resolution

2014-12-06 Thread Masatake YAMATO
For resolving the peer address of socket, all combinations of families (AF_INET, AF_INET6) and protocols(IPPROTO_TCP, IPPROTO_UDP) were tried. This patch utilizes the protocol name, getting via getxattr, to specify the combination. * util.c (printfd): Pass the protocol name for the given path to