Lines Matching refs:req

138 	} req;  in set_master()  local
140 memset(&req, 0, sizeof(req)); in set_master()
142 req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg)); in set_master()
143 req.n.nlmsg_flags = NLM_F_REQUEST; in set_master()
144 req.n.nlmsg_type = RTM_NEWLINK; in set_master()
145 req.i.ifi_family = preferred_family; in set_master()
148 req.i.ifi_index = xll_name_to_index(dev); in set_master()
150 addattr_l(&req.n, sizeof(req), IFLA_MASTER, &master, 4); in set_master()
151 if (rtnl_talk(&rth, &req.n, 0, 0, NULL, NULL, NULL) < 0) in set_master()
163 } req; in set_netns() local
165 memset(&req, 0, sizeof(req)); in set_netns()
166 req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg)); in set_netns()
167 req.n.nlmsg_flags = NLM_F_REQUEST; in set_netns()
168 req.n.nlmsg_type = RTM_NEWLINK; in set_netns()
169 req.i.ifi_family = preferred_family; in set_netns()
172 req.i.ifi_index = xll_name_to_index(dev); in set_netns()
174 addattr_l(&req.n, sizeof(req), IFLA_NET_NS_PID, &netns, 4); in set_netns()
175 if (rtnl_talk(&rth, &req.n, 0, 0, NULL, NULL, NULL) < 0) in set_netns()
355 addattr_l(&req->n, sizeof(*req), IFLA_BROADCAST, abuf, len); in do_set()
361 addattr_l(&req->n, sizeof(*req), IFLA_NET_NS_FD, &netns, 4); in do_set()
363 addattr_l(&req->n, sizeof(*req), IFLA_NET_NS_PID, &netns, 4); in do_set()
368 req->i.ifi_change |= IFF_ALLMULTI; in do_set()
370 req->i.ifi_flags |= IFF_ALLMULTI; in do_set()
372 req->i.ifi_flags &= ~IFF_ALLMULTI; in do_set()
377 req->i.ifi_change |= IFF_NOTRAILERS; in do_set()
379 req->i.ifi_flags |= IFF_NOTRAILERS; in do_set()
381 req->i.ifi_flags &= ~IFF_NOTRAILERS; in do_set()
390 vflist = addattr_nest(&req->n, sizeof(*req), in do_set()
392 len = iplink_parse_vf(vf, &argc, &argv, req); in do_set()
395 addattr_nest_end(&req->n, vflist); in do_set()
402 addattr_l(&req->n, sizeof(*req), IFLA_MASTER, in do_set()
406 addattr_l(&req->n, sizeof(*req), IFLA_MASTER, in do_set()
410 req->i.ifi_change |= IFF_DYNAMIC; in do_set()
412 req->i.ifi_flags |= IFF_DYNAMIC; in do_set()
414 req->i.ifi_flags &= ~IFF_DYNAMIC; in do_set()
419 addattr_l(&req->n, sizeof(*req), IFLA_IFALIAS, in do_set()
435 addattr8(&req->n, sizeof(*req), IFLA_LINKMODE, mode); in do_set()
442 addattr8(&req->n, sizeof(*req), IFLA_OPERSTATE, state); in do_set()
449 addattr_l(&req->n, sizeof(*req), IFLA_NUM_TX_QUEUES, in do_set()
457 addattr_l(&req->n, sizeof(*req), IFLA_NUM_RX_QUEUES, in do_set()
634 } req; in do_add_or_delete() local
642 memset(&req, 0, sizeof(req)); in do_add_or_delete()
644 req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg)); in do_add_or_delete()
645 req.n.nlmsg_flags = NLM_F_REQUEST; in do_add_or_delete()
646 req.n.nlmsg_type = rtm; in do_add_or_delete()
647 req.i.ifi_family = preferred_family; in do_add_or_delete()
649 req.n.nlmsg_flags |= NLM_F_CREATE|NLM_F_EXCL; in do_add_or_delete()
687 struct rtattr *linkinfo = NLMSG_TAIL(&req.n); in do_add_or_delete()
689 addattr_l(&req.n, sizeof(req), IFLA_LINKINFO, NULL, 0); in do_add_or_delete()
690 addattr_l(&req.n, sizeof(req), IFLA_INFO_KIND, type_str, in do_add_or_delete()
694 struct rtattr *data = NLMSG_TAIL(&req.n); in do_add_or_delete()
695 addattr_l(&req.n, sizeof(req), IFLA_INFO_DATA, NULL, 0); in do_add_or_delete()
698 vlan_parse_opt(argv, &req.n, sizeof(req)); in do_add_or_delete()
700 vrf_parse_opt(argv, &req.n, sizeof(req)); in do_add_or_delete()
702 data->rta_len = (void *)NLMSG_TAIL(&req.n) - (void *)data; in do_add_or_delete()
705 linkinfo->rta_len = (void *)NLMSG_TAIL(&req.n) - (void *)linkinfo; in do_add_or_delete()
718 req.i.ifi_index = xll_name_to_index(dev_str); in do_add_or_delete()
722 addattr_l(&req.n, sizeof(req), IFLA_LINK, &idx, 4); in do_add_or_delete()
730 addattr_l(&req.n, sizeof(req), IFLA_ADDRESS, abuf, len); in do_add_or_delete()
737 addattr_l(&req.n, sizeof(req), IFLA_IFNAME, name_str, name_len); in do_add_or_delete()
739 if (rtnl_talk(&rth, &req.n, 0, 0, NULL, NULL, NULL) < 0) in do_add_or_delete()