]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
libnetlink: Rename rtnl_wilddump_stats_req_filter to rtnl_statsdump_req_filter
authorDavid Ahern <dsahern@gmail.com>
Sat, 29 Sep 2018 17:12:59 +0000 (10:12 -0700)
committerDavid Ahern <dsahern@gmail.com>
Wed, 3 Oct 2018 01:39:36 +0000 (18:39 -0700)
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>
bridge/vlan.c
include/libnetlink.h
ip/iplink.c
ip/iplink_xstats.c
lib/libnetlink.c
misc/ifstat.c

index 59ed1964bcd2d496b726a9c3a54215926c0a664a..239907bdad89980c5eda4cad3594fe30edf309e0 100644 (file)
@@ -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);
                }
index 410c441b9946f4b39f597048ecc07bf7fec5ee22..8e411ebc0eaec24dd055588c385a3630b8cbce89 100644 (file)
@@ -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)
index d99c49ed244a9e87309cb32eb24eab6fd8a254cb..50ccb49a02639604e7f12c05c4a3d1a7ef05ec0f 100644 (file)
@@ -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;
        }
index 10f953bc4584ca2f101e266047ffa46ad2f27ed2..908d9228369f3753a220ef25d8b568ee6ac810ff 100644 (file)
@@ -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;
        }
index 73d720f4f8fc17b095623b1ed7b9d26ae2e8a9df..f8b8fbfd0010ad633a69100d6e1d8f4a21a5104e 100644 (file)
@@ -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;
index 6e70e1eb12b4722a6742adc66de9ccf68f56a462..3a0e780f75695ceeecddb59d2a01d64720eab471 100644 (file)
@@ -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);
                }