On Tue, Dec 09, 2014 at 10:39:41AM +0900, Masatake YAMATO wrote:
[...]
> How about following format:
> 
>     FD "<UNIX:[" SELF_INODE [ "->" PEER_INODE ] [ ":" PATH ] "]>"

I don't quite like ":" before the path, it reminds me of ip:port pairs,
so let's use "," as you suggested earlier.

> (I used double quotes here because "[" and "]" are used as literal and meta 
> characters.)
> 
> e.g.
> 
>     % ./strace -yy -e network nc -l -U /tmp/example.socket
>     socket(PF_LOCAL, SOCK_STREAM, 0)        = 3
>     setsockopt(3<UNIX:[14672314]>, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
>     bind(3<UNIX:[14672314]>, {sa_family=AF_LOCAL, 
> sun_path="/tmp/example.socket"}, 21) = 0
>     listen(3<UNIX:[14672314:/tmp/example.socket]>, 10) = 0
>     accept(3<UNIX:[14672314:/tmp/example.socket]>, {sa_family=AF_LOCAL, 
> NULL}, [2]) = 4<UNIX:[14672333->14672331:/tmp/example.socket]>
>     recvfrom(4<UNIX:[14672333->14672331:/tmp/example.socket]>, "a\n", 8192, 
> 0, NULL, NULL) = 2
> 
> Using "[" and "]" as literal characters is verbose but the output
> format is uniformed well in listening, accepted sockets and other protocol
> of sockets like netlink.

Output formats for UNIX and TCP/UDP also have to be consistent.
How would TCP/UDP output format look like then?


-- 
ldv

Attachment: pgpYzjjXhGf_A.pgp
Description: PGP signature

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to