]> granicus.if.org Git - strace/commit
socketeutils: extend receive_responses to handle other netlink types
authorMasatake YAMATO <yamato@redhat.com>
Sun, 11 Jun 2017 07:42:27 +0000 (16:42 +0900)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 12 Jun 2017 16:43:49 +0000 (16:43 +0000)
commit6c33d4628f699f9bb8fb7d3dd5d75e38e9f00aa5
tree9cd1b47081ff05f64275ae9b23883ed1798ecdec
parent1d2dddc73f0ef7f3cdb2252551a6ca5939e923c0
socketeutils: extend receive_responses to handle other netlink types

This is the first patch in series of implementing NETLINK_GENERIC
protocol decoder.

receive_responses was written for decoding kernel responses of type
SOCK_DIAG_BY_FAMILY, other types were ignored.

This change makes the type of netlink response a parameter
so the function can be used for other types of communication.

* socketutils.c (receive_responses): add a new parameter
expected_msg_type to handle types other than SOCK_DIAG_BY_FAMILY.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
socketutils.c