+int system_link_netns_move(const char *ifname, int netns_fd)
+{
+ struct nl_msg *msg;
+ struct ifinfomsg iim = {
+ .ifi_family = AF_UNSPEC,
+ .ifi_index = 0,
+ };
+
+ msg = nlmsg_alloc_simple(RTM_NEWLINK, NLM_F_REQUEST);
+
+ if (!msg)
+ return -1;
+
+ nlmsg_append(msg, &iim, sizeof(iim), 0);
+ nla_put_string(msg, IFLA_IFNAME, ifname);
+ nla_put_u32(msg, IFLA_NET_NS_FD, netns_fd);
+ return system_rtnl_call(msg);
+}
+