[PATCH v5] Print ip and port associated with descriptor with -yy

Zubin Mithra zubin.mithra at gmail.com
Sun Aug 24 14:44:23 UTC 2014


Hi Dmitry,

On 21-Aug-2014, at 4:27, Dmitry V. Levin <ldv at altlinux.org> wrote:

> On Thu, Aug 21, 2014 at 02:53:46AM +0400, Dmitry V. Levin wrote:
>> On Mon, Aug 11, 2014 at 02:21:01PM +0530, zubin.mithra at gmail.com wrote:
> [...]
>> 	if (!inet_ntop(diag_msg->idiag_family, diag_msg->id.idiag_dst,
>> 		       remote_addr_buf, size) || !remote_addr_buf[0])
>> 		return -1;
> 
> Also note for unconnected sockets idiag_dst/idiag_dport are zero, and
> idiag_src/idiag_sport have to be used instead.

Currently for unconnected sockets, it would print out the socket inode number(indicating that the socket is unconnected). Would printing idiag_sport instead be confusing?


Thanks,
-- zm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 496 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20140824/04956972/attachment.bin>


More information about the Strace-devel mailing list