diff options
author | David Ahern <dsa@cumulusnetworks.com> | 2016-05-11 06:51:58 -0700 |
---|---|---|
committer | Stephen Hemminger <shemming@brocade.com> | 2016-05-18 11:52:14 -0700 |
commit | b0a4ce620e4167428027abc1246f57c4086d99fa (patch) | |
tree | 3274a3334822422bab0d130cbf7daf36e5df5037 /include | |
parent | fdf1bdd0f14db7b465d93ec09e45e5da70b1c582 (diff) |
ip link: Add support for kernel side filtering
Kernel gained support for filtering link dumps with commit dc599f76c22b
("net: Add support for filtering link dump by master device and kind").
Add support to ip link command. If a user passes master device or
kind to ip link command they are added to the link dump request message.
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/libnetlink.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/libnetlink.h b/include/libnetlink.h index 491263f7..f7b85dcc 100644 --- a/include/libnetlink.h +++ b/include/libnetlink.h @@ -38,6 +38,12 @@ int rtnl_wilddump_request(struct rtnl_handle *rth, int fam, int type) int rtnl_wilddump_req_filter(struct rtnl_handle *rth, int fam, int type, __u32 filt_mask) __attribute__((warn_unused_result)); + +typedef int (*req_filter_fn_t)(struct nlmsghdr *nlh, int reqlen); + +int rtnl_wilddump_req_filter_fn(struct rtnl_handle *rth, int fam, int type, + req_filter_fn_t fn) + __attribute__((warn_unused_result)); int rtnl_dump_request(struct rtnl_handle *rth, int type, void *req, int len) __attribute__((warn_unused_result)); |