[PATCHv2 1/3] Use the protocol name of a socket as a hint for peer address resolution
Dmitry V. Levin
ldv at altlinux.org
Wed Dec 17 18:19:24 UTC 2014
On Wed, Dec 10, 2014 at 12:55:06PM +0900, Masatake YAMATO wrote:
> 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
> print_sockaddr_by_inode as the 2nd argument.
>
> * socketutils.c (print_sockaddr_by_inode): Utilize the protocol name
> for the target inode for resolving the peer address of socket.
> If the name is NULL, resolve the address as in the past.
> Use inet_print in the case when no hint is given.
> (inet_print): New helper function for print_sockaddr_by_inode.
Thanks, applied with some corrections of the commit message.
--
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20141217/647443d7/attachment.bin>
More information about the Strace-devel
mailing list