diff options
author | Hangbin Liu <liuhangbin@gmail.com> | 2022-09-29 16:10:16 +0800 |
---|---|---|
committer | David Ahern <dsahern@kernel.org> | 2022-09-29 09:05:03 -0600 |
commit | 6c09257f1bf6b833ec9b2d5174dd5ea39e9dfd17 (patch) | |
tree | 12ce79df2caa83b86b67a99c98fc2eeb742c7e36 /include | |
parent | d8d3aadf347c72e7a29fc297b0b92ce2611d0391 (diff) | |
download | iproute2-6c09257f1bf6b833ec9b2d5174dd5ea39e9dfd17.tar.gz |
rtnetlink: add new function rtnl_echo_talk()
Add a new function rtnl_echo_talk() that could be used when the
sub-component supports NLM_F_ECHO flag. With this function we can
remove the redundant code added by commit b264b4c6568c7 ("ip: add
NLM_F_ECHO support").
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/libnetlink.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/libnetlink.h b/include/libnetlink.h index 1c49920d6..c91a22314 100644 --- a/include/libnetlink.h +++ b/include/libnetlink.h @@ -171,6 +171,9 @@ int rtnl_dump_filter_errhndlr_nc(struct rtnl_handle *rth, #define rtnl_dump_filter_errhndlr(rth, filter, farg, errhndlr, earg) \ rtnl_dump_filter_errhndlr_nc(rth, filter, farg, errhndlr, earg, 0) +int rtnl_echo_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n, int json, + int (*print_info)(struct nlmsghdr *n, void *arg)) + __attribute__((warn_unused_result)); int rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n, struct nlmsghdr **answer) __attribute__((warn_unused_result)); |