Lines Matching defs:rtnl
29 static int start_loopback(sd_netlink *rtnl) {
33 r = sd_rtnl_message_new_link(rtnl, &req, RTM_SETLINK, LOOPBACK_IFINDEX);
41 r = sd_netlink_call(rtnl, req, 0, NULL);
48 static bool check_loopback(sd_netlink *rtnl) {
53 r = sd_rtnl_message_new_link(rtnl, &req, RTM_GETLINK, LOOPBACK_IFINDEX);
57 r = sd_netlink_call(rtnl, req, 0, &reply);
69 _cleanup_(sd_netlink_unrefp) sd_netlink *rtnl = NULL;
72 r = sd_netlink_open(&rtnl);
76 r = start_loopback(rtnl);
83 if (r == -EPERM && check_loopback(rtnl))