libnetlink: Rename rtnl_wilddump_stats_req_filter to rtnl_statsdump_req_filter
rtnl_wilddump_stats_req_filter only takes RTM_GETSTATS as the type argument so rename to rtnl_statsdump_req_filter for consistency with other request functions and hardcode the type argument. Signed-off-by: David Ahern <dsahern@gmail.com>
This commit is contained in:
parent
31ae2912f7
commit
56eeeda978
|
|
@ -603,9 +603,7 @@ static int vlan_show(int argc, char **argv)
|
|||
__u32 filt_mask;
|
||||
|
||||
filt_mask = IFLA_STATS_FILTER_BIT(IFLA_STATS_LINK_XSTATS);
|
||||
if (rtnl_wilddump_stats_req_filter(&rth, AF_UNSPEC,
|
||||
RTM_GETSTATS,
|
||||
filt_mask) < 0) {
|
||||
if (rtnl_statsdump_req_filter(&rth, AF_UNSPEC, filt_mask) < 0) {
|
||||
perror("Cannont send dump request");
|
||||
exit(1);
|
||||
}
|
||||
|
|
@ -619,9 +617,7 @@ static int vlan_show(int argc, char **argv)
|
|||
}
|
||||
|
||||
filt_mask = IFLA_STATS_FILTER_BIT(IFLA_STATS_LINK_XSTATS_SLAVE);
|
||||
if (rtnl_wilddump_stats_req_filter(&rth, AF_UNSPEC,
|
||||
RTM_GETSTATS,
|
||||
filt_mask) < 0) {
|
||||
if (rtnl_statsdump_req_filter(&rth, AF_UNSPEC, filt_mask) < 0) {
|
||||
perror("Cannont send slave dump request");
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,8 +76,7 @@ typedef int (*req_filter_fn_t)(struct nlmsghdr *nlh, int reqlen);
|
|||
int rtnl_linkdump_req_filter_fn(struct rtnl_handle *rth, int fam,
|
||||
req_filter_fn_t fn)
|
||||
__attribute__((warn_unused_result));
|
||||
int rtnl_wilddump_stats_req_filter(struct rtnl_handle *rth, int fam, int type,
|
||||
__u32 filt_mask)
|
||||
int rtnl_statsdump_req_filter(struct rtnl_handle *rth, int fam, __u32 filt_mask)
|
||||
__attribute__((warn_unused_result));
|
||||
int rtnl_dump_request(struct rtnl_handle *rth, int type, void *req,
|
||||
int len)
|
||||
|
|
|
|||
|
|
@ -1601,9 +1601,7 @@ static int iplink_afstats(int argc, char **argv)
|
|||
}
|
||||
}
|
||||
|
||||
if (rtnl_wilddump_stats_req_filter(&rth, AF_UNSPEC,
|
||||
RTM_GETSTATS,
|
||||
filt_mask) < 0) {
|
||||
if (rtnl_statsdump_req_filter(&rth, AF_UNSPEC, filt_mask) < 0) {
|
||||
perror("Cannont send dump request");
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,9 +65,7 @@ int iplink_ifla_xstats(int argc, char **argv)
|
|||
else
|
||||
filt_mask = IFLA_STATS_FILTER_BIT(IFLA_STATS_LINK_XSTATS);
|
||||
|
||||
if (rtnl_wilddump_stats_req_filter(&rth, AF_UNSPEC,
|
||||
RTM_GETSTATS,
|
||||
filt_mask) < 0) {
|
||||
if (rtnl_statsdump_req_filter(&rth, AF_UNSPEC, filt_mask) < 0) {
|
||||
perror("Cannont send dump request");
|
||||
return -1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -400,8 +400,7 @@ int rtnl_linkdump_req_filter_fn(struct rtnl_handle *rth, int family,
|
|||
return send(rth->fd, &req, req.nlh.nlmsg_len, 0);
|
||||
}
|
||||
|
||||
int rtnl_wilddump_stats_req_filter(struct rtnl_handle *rth, int fam, int type,
|
||||
__u32 filt_mask)
|
||||
int rtnl_statsdump_req_filter(struct rtnl_handle *rth, int fam, __u32 filt_mask)
|
||||
{
|
||||
struct {
|
||||
struct nlmsghdr nlh;
|
||||
|
|
@ -410,7 +409,7 @@ int rtnl_wilddump_stats_req_filter(struct rtnl_handle *rth, int fam, int type,
|
|||
|
||||
memset(&req, 0, sizeof(req));
|
||||
req.nlh.nlmsg_len = NLMSG_LENGTH(sizeof(struct if_stats_msg));
|
||||
req.nlh.nlmsg_type = type;
|
||||
req.nlh.nlmsg_type = RTM_GETSTATS;
|
||||
req.nlh.nlmsg_flags = NLM_F_DUMP|NLM_F_REQUEST;
|
||||
req.nlh.nlmsg_pid = 0;
|
||||
req.nlh.nlmsg_seq = rth->dump = ++rth->seq;
|
||||
|
|
|
|||
|
|
@ -203,8 +203,8 @@ static void load_info(void)
|
|||
if (is_extended) {
|
||||
ll_init_map(&rth);
|
||||
filter_mask = IFLA_STATS_FILTER_BIT(filter_type);
|
||||
if (rtnl_wilddump_stats_req_filter(&rth, AF_UNSPEC, RTM_GETSTATS,
|
||||
filter_mask) < 0) {
|
||||
if (rtnl_statsdump_req_filter(&rth, AF_UNSPEC,
|
||||
filter_mask) < 0) {
|
||||
perror("Cannot send dump request");
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue