Lines Matching refs:netdev
31 static int netdev_bridge_set_handler(sd_netlink *rtnl, sd_netlink_message *m, NetDev *netdev) { in netdev_bridge_set_handler() argument
34 assert(netdev); in netdev_bridge_set_handler()
39 log_netdev_warning_errno(netdev, r, "Bridge parameters could not be set: %m"); in netdev_bridge_set_handler()
43 log_netdev_debug(netdev, "Bridge parameters set success"); in netdev_bridge_set_handler()
48 static int netdev_bridge_post_create_message(NetDev *netdev, sd_netlink_message *req) { in netdev_bridge_post_create_message() argument
52 assert_se(b = BRIDGE(netdev)); in netdev_bridge_post_create_message()
58 … sd_netlink_message_open_container_union(req, IFLA_INFO_DATA, netdev_kind_to_string(netdev->kind)); in netdev_bridge_post_create_message()
152 static int netdev_bridge_post_create(NetDev *netdev, Link *link) { in netdev_bridge_post_create() argument
156 assert(netdev); in netdev_bridge_post_create()
158 r = sd_rtnl_message_new_link(netdev->manager->rtnl, &req, RTM_NEWLINK, netdev->ifindex); in netdev_bridge_post_create()
160 return log_netdev_error_errno(netdev, r, "Could not allocate netlink message: %m"); in netdev_bridge_post_create()
166 r = netdev_bridge_post_create_message(netdev, req); in netdev_bridge_post_create()
168 return log_netdev_error_errno(netdev, r, "Could not create netlink message: %m"); in netdev_bridge_post_create()
170 r = netlink_call_async(netdev->manager->rtnl, NULL, req, netdev_bridge_set_handler, in netdev_bridge_post_create()
171 netdev_destroy_callback, netdev); in netdev_bridge_post_create()
173 return log_netdev_error_errno(netdev, r, "Could not send netlink message: %m"); in netdev_bridge_post_create()
175 netdev_ref(netdev); in netdev_bridge_post_create()