[no subject]

2016-06-13 Thread Fabien Siron
Hello, Here is a new version of the netlink socket parser. Changes since v1: * handle io vector with length different than 1 (for sendmsg/recvmsg/sendmmsg/recvmmsg...). * add nlmsg_ok and nlmsg_next functions which correspond to NLMSG_OK and NLMSG_NEXT macros. * handle multiple netlink messages.

[PATCH v2 3/7] tests: check decoding of netlink protocol

2016-06-13 Thread Fabien Siron
* tests/netlink_parsing.test: New test. * tests/netlink_parsing.c: New file. * tests/.gitignore: Add netlink_parsing. * tests/Makefile.am (check_PROGRAMS): Likewise. --- tests/.gitignore | 1 + tests/Makefile.am | 2 ++ tests/netlink_parsing.c| 89 +

[PATCH v2 2/7] Add a general netlink socket parser

2016-06-13 Thread Fabien Siron
This commit introduces a general socket netlink parser which prints the header and a string for the remaining part of the buffer. It doesn't handle all the netlink flags and types because the parser needs more information. It will be done soon. * net.c (get_family): New function. (do_msghdr): Call

[PATCH v2 1/7] Make getfdproto returns integer instead of string

2016-06-13 Thread Fabien Siron
This commit aims to avoid future string comparisons with getfdproto function in changing its return type. It also adapts the functions that use it. * defs.h (print_sockaddr_by_inode): Add. * socketutils.h (socket_protocols): New enum. * socketutils.c (print_sockaddr_by_inode): Move proto to int. *

[PATCH v2 5/7] Introduce getfdnlproto to obtain netlink protocol from fd

2016-06-13 Thread Fabien Siron
* defs.h (getfdnlproto): Add. * utils.c (getfdinode): New function. (getfdnlproto): Likewise. --- defs.h | 1 + util.c | 68 -- 2 files changed, 63 insertions(+), 6 deletions(-) diff --git a/defs.h b/defs.h index 06dba19..87ae043 10

[PATCH v2 6/7] Netlink: Introduce nlmsg_* functions

2016-06-13 Thread Fabien Siron
Since our target is not in the same process, the netlink macros NLMSG_* must be rewritten for strace. * netlink.c (nlmsg_ok, nlmsg_next): New functions. --- netlink.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/netlink.c b/netlink.c index 738c639..bb2c3a7 10064

[PATCH v2 7/7] Netlink: handle multi netlink messages

2016-06-13 Thread Fabien Siron
* netlink.c (decode_netlink_or_printaddr_msg): From decode_netlink_or_printaddr(). (decode_netlink_or_printaddr): Call decode_netlink_or_printaddr_msg(). --- netlink.c | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/netlink.c b/netlink.c index bb2c3a7..9b

[PATCH v2 4/7] Introduce get_sockaddr_by_inode_cached and get_sockaddr_by_inode

2016-06-13 Thread Fabien Siron
Because netlink parsing needs a way to get the netlink protocol and the socketutils.c file can only print the protocol, this commit adds an interface to get some socket information without printing it. * defs.h (get_sockaddr_by_inode_cached, get_sockaddr_by_inode): Add. * socketutils.c (cache_prin

Only absolute file paths in strace possible?

2016-06-13 Thread Jens Offenbach
Hallo, I must analyze a library (*.tar.gz) that includes a lot of files and most of them are not required for a specific run. I used strace 4.8.1 on Ubuntu Server 16.04 with: strace -e trace=file -f -v -o /tmp/result.strace ./run.sh Everything is working fine, but the log sometimes contains rela