]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
libnetlink: Rename rtnl_wilddump_* to rtnl_linkdump_*
authorDavid Ahern <dsahern@gmail.com>
Sat, 29 Sep 2018 16:56:57 +0000 (09:56 -0700)
committerDavid Ahern <dsahern@gmail.com>
Wed, 3 Oct 2018 01:39:08 +0000 (18:39 -0700)
Rename rtnl_wilddump_req_filter to rtnl_linkdump_req_filter,
rtnl_wilddump_request to rtnl_linkdump_req and
rtnl_wilddump_req_filter_fn to rtnl_linkdump_req_filter_fn.

In all cases drop the type argument which at this point is only
RTM_GETLINK and hardcode in the functions.

Signed-off-by: David Ahern <dsahern@gmail.com>
bridge/link.c
bridge/vlan.c
include/libnetlink.h
ip/ipaddress.c
ip/iptoken.c
ip/iptuntap.c
ip/rtmon.c
ip/tunnel.c
lib/libnetlink.c
lib/ll_map.c
misc/ifstat.c

index 8557026387d249a2959170d1e93f6a6dc3912d2f..09df489b26ab2a41a70a9dc64b0dcae2c3d19c20 100644 (file)
@@ -502,7 +502,7 @@ static int brlink_show(int argc, char **argv)
        }
 
        if (show_details) {
-               if (rtnl_wilddump_req_filter(&rth, PF_BRIDGE, RTM_GETLINK,
+               if (rtnl_linkdump_req_filter(&rth, PF_BRIDGE,
                                             (compress_vlans ?
                                              RTEXT_FILTER_BRVLAN_COMPRESSED :
                                              RTEXT_FILTER_BRVLAN)) < 0) {
@@ -510,7 +510,7 @@ static int brlink_show(int argc, char **argv)
                        exit(1);
                }
        } else {
-               if (rtnl_wilddump_request(&rth, PF_BRIDGE, RTM_GETLINK) < 0) {
+               if (rtnl_linkdump_req(&rth, PF_BRIDGE) < 0) {
                        perror("Cannon send dump request");
                        exit(1);
                }
index bdce55ae4e14401a60190b14f588ddc03ba4b0c3..59ed1964bcd2d496b726a9c3a54215926c0a664a 100644 (file)
@@ -575,7 +575,7 @@ static int vlan_show(int argc, char **argv)
        new_json_obj(json);
 
        if (!show_stats) {
-               if (rtnl_wilddump_req_filter(&rth, PF_BRIDGE, RTM_GETLINK,
+               if (rtnl_linkdump_req_filter(&rth, PF_BRIDGE,
                                             (compress_vlans ?
                                              RTEXT_FILTER_BRVLAN_COMPRESSED :
                                              RTEXT_FILTER_BRVLAN)) < 0) {
index f22c92ac03dc44013a2cdee3e05dc1223396b08b..410c441b9946f4b39f597048ecc07bf7fec5ee22 100644 (file)
@@ -66,15 +66,14 @@ int rtnl_netconfdump_req(struct rtnl_handle *rth, int family)
 int rtnl_nsiddump_req(struct rtnl_handle *rth, int family)
        __attribute__((warn_unused_result));
 
-int rtnl_wilddump_request(struct rtnl_handle *rth, int fam, int type)
+int rtnl_linkdump_req(struct rtnl_handle *rth, int fam)
        __attribute__((warn_unused_result));
-int rtnl_wilddump_req_filter(struct rtnl_handle *rth, int fam, int type,
-                                   __u32 filt_mask)
+int rtnl_linkdump_req_filter(struct rtnl_handle *rth, int fam, __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,
+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,
index f29480ce51d4ed8169dc45186b27539d4c997917..c0c1fbbe4c74d10a8fadfedfac08333fe93b9db5 100644 (file)
@@ -1778,7 +1778,7 @@ static int iplink_filter_req(struct nlmsghdr *nlh, int reqlen)
 int ip_linkaddr_list(int family, req_filter_fn_t filter_fn,
                     struct nlmsg_chain *linfo, struct nlmsg_chain *ainfo)
 {
-       if (rtnl_wilddump_req_filter_fn(&rth, preferred_family, RTM_GETLINK,
+       if (rtnl_linkdump_req_filter_fn(&rth, preferred_family,
                                        filter_fn) < 0) {
                perror("Cannot send dump request");
                return 1;
@@ -2031,7 +2031,7 @@ void ipaddr_get_vf_rate(int vfnum, int *min, int *max, const char *dev)
                exit(1);
        }
 
-       if (rtnl_wilddump_request(&rth, AF_UNSPEC, RTM_GETLINK) < 0) {
+       if (rtnl_linkdump_req(&rth, AF_UNSPEC) < 0) {
                perror("Cannot send dump request");
                exit(1);
        }
index fb64da4ec26224fad8a1f73630b100062d4b075c..8605e75c4edc8d82230d77af8fbb08cf53c492e7 100644 (file)
@@ -109,7 +109,7 @@ static int iptoken_list(int argc, char **argv)
                argc--; argv++;
        }
 
-       if (rtnl_wilddump_request(&rth, af, RTM_GETLINK) < 0) {
+       if (rtnl_linkdump_req(&rth, af) < 0) {
                perror("Cannot send dump request");
                return -1;
        }
index 58996e6c573323157f31e2272301fc261f73b49a..8c84e6206fa9c2200fb50258e567747974d8aaa0 100644 (file)
@@ -459,7 +459,7 @@ static int print_tuntap(const struct sockaddr_nl *who,
 
 static int do_show(int argc, char **argv)
 {
-       if (rtnl_wilddump_req_filter_fn(&rth, AF_UNSPEC, RTM_GETLINK,
+       if (rtnl_linkdump_req_filter_fn(&rth, AF_UNSPEC,
                                        tuntap_filter_req) < 0) {
                perror("Cannot send dump request\n");
                return -1;
index 0e795f740e62758ce8deb5de79a7131dc68fdf9f..7d2405d724a63ea81e78d2c8dbadcdabe375d1d2 100644 (file)
@@ -163,7 +163,7 @@ main(int argc, char **argv)
        if (rtnl_open(&rth, groups) < 0)
                exit(1);
 
-       if (rtnl_wilddump_request(&rth, AF_UNSPEC, RTM_GETLINK) < 0) {
+       if (rtnl_linkdump_req(&rth, AF_UNSPEC) < 0) {
                perror("Cannot send dump request");
                exit(1);
        }
index 79de7f2406f0ebaec9a8e0df234d24b677e502c5..20fe6d7d72f10f34a1368f80becbfa91773e7d04 100644 (file)
@@ -392,7 +392,7 @@ static int print_nlmsg_tunnel(const struct sockaddr_nl *who,
 
 int do_tunnels_list(struct tnl_print_nlmsg_info *info)
 {
-       if (rtnl_wilddump_request(&rth, preferred_family, RTM_GETLINK) < 0) {
+       if (rtnl_linkdump_req(&rth, preferred_family) < 0) {
                perror("Cannot send dump request\n");
                return -1;
        }
index 2dd14ac5ea58fb089bfc803e1e25144dc82b642b..73d720f4f8fc17b095623b1ed7b9d26ae2e8a9df 100644 (file)
@@ -346,12 +346,12 @@ int rtnl_nsiddump_req(struct rtnl_handle *rth, int family)
        return send(rth->fd, &req, sizeof(req), 0);
 }
 
-int rtnl_wilddump_request(struct rtnl_handle *rth, int family, int type)
+int rtnl_linkdump_req(struct rtnl_handle *rth, int family)
 {
-       return rtnl_wilddump_req_filter(rth, family, type, RTEXT_FILTER_VF);
+       return rtnl_linkdump_req_filter(rth, family, RTEXT_FILTER_VF);
 }
 
-int rtnl_wilddump_req_filter(struct rtnl_handle *rth, int family, int type,
+int rtnl_linkdump_req_filter(struct rtnl_handle *rth, int family,
                            __u32 filt_mask)
 {
        struct {
@@ -362,7 +362,7 @@ int rtnl_wilddump_req_filter(struct rtnl_handle *rth, int family, int type,
                __u32 ext_filter_mask;
        } req = {
                .nlh.nlmsg_len = sizeof(req),
-               .nlh.nlmsg_type = type,
+               .nlh.nlmsg_type = RTM_GETLINK,
                .nlh.nlmsg_flags = NLM_F_DUMP | NLM_F_REQUEST,
                .nlh.nlmsg_seq = rth->dump = ++rth->seq,
                .ifm.ifi_family = family,
@@ -374,7 +374,7 @@ int rtnl_wilddump_req_filter(struct rtnl_handle *rth, int family, int type,
        return send(rth->fd, &req, sizeof(req), 0);
 }
 
-int rtnl_wilddump_req_filter_fn(struct rtnl_handle *rth, int family, int type,
+int rtnl_linkdump_req_filter_fn(struct rtnl_handle *rth, int family,
                                req_filter_fn_t filter_fn)
 {
        struct {
@@ -383,7 +383,7 @@ int rtnl_wilddump_req_filter_fn(struct rtnl_handle *rth, int family, int type,
                char buf[1024];
        } req = {
                .nlh.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg)),
-               .nlh.nlmsg_type = type,
+               .nlh.nlmsg_type = RTM_GETLINK,
                .nlh.nlmsg_flags = NLM_F_DUMP | NLM_F_REQUEST,
                .nlh.nlmsg_seq = rth->dump = ++rth->seq,
                .ifm.ifi_family = family,
index 0afe68979283b8d485f443e344ed8a1457a9c93b..32c8e4429fca19105061b1f7d954723f0679aa77 100644 (file)
@@ -218,7 +218,7 @@ void ll_init_map(struct rtnl_handle *rth)
        if (initialized)
                return;
 
-       if (rtnl_wilddump_request(rth, AF_UNSPEC, RTM_GETLINK) < 0) {
+       if (rtnl_linkdump_req(rth, AF_UNSPEC) < 0) {
                perror("Cannot send dump request");
                exit(1);
        }
index 50b906e86d5d08e20b8d995e992634cd5f9b4be2..6e70e1eb12b4722a6742adc66de9ccf68f56a462 100644 (file)
@@ -214,7 +214,7 @@ static void load_info(void)
                        exit(1);
                }
        } else {
-               if (rtnl_wilddump_request(&rth, AF_INET, RTM_GETLINK) < 0) {
+               if (rtnl_linkdump_req(&rth, AF_INET) < 0) {
                        perror("Cannot send dump request");
                        exit(1);
                }