Lines Matching refs:netdev
100 static int netdev_batman_set_handler(sd_netlink *rtnl, sd_netlink_message *m, NetDev *netdev) { in netdev_batman_set_handler() argument
103 assert(netdev); in netdev_batman_set_handler()
108 log_netdev_warning_errno(netdev, r, "BATADV parameters could not be set: %m"); in netdev_batman_set_handler()
112 log_netdev_debug(netdev, "BATADV parameters set success"); in netdev_batman_set_handler()
117 static int netdev_batadv_post_create_message(NetDev *netdev, sd_netlink_message *message) { in netdev_batadv_post_create_message() argument
121 assert_se(b = BATADV(netdev)); in netdev_batadv_post_create_message()
123 r = sd_netlink_message_append_u32(message, BATADV_ATTR_MESH_IFINDEX, netdev->ifindex); in netdev_batadv_post_create_message()
166 static int netdev_batadv_post_create(NetDev *netdev, Link *link) { in netdev_batadv_post_create() argument
170 assert(netdev); in netdev_batadv_post_create()
172 … r = sd_genl_message_new(netdev->manager->genl, BATADV_NL_NAME, BATADV_CMD_SET_MESH, &message); in netdev_batadv_post_create()
174 return log_netdev_error_errno(netdev, r, "Could not allocate netlink message: %m"); in netdev_batadv_post_create()
176 r = netdev_batadv_post_create_message(netdev, message); in netdev_batadv_post_create()
178 return log_netdev_error_errno(netdev, r, "Could not create netlink message: %m"); in netdev_batadv_post_create()
180 r = netlink_call_async(netdev->manager->genl, NULL, message, netdev_batman_set_handler, in netdev_batadv_post_create()
181 netdev_destroy_callback, netdev); in netdev_batadv_post_create()
183 return log_netdev_error_errno(netdev, r, "Could not send netlink message: %m"); in netdev_batadv_post_create()
185 netdev_ref(netdev); in netdev_batadv_post_create()
190 static int netdev_batadv_fill_message_create(NetDev *netdev, Link *link, sd_netlink_message *m) { in netdev_batadv_fill_message_create() argument
194 assert(netdev); in netdev_batadv_fill_message_create()
197 b = BATADV(netdev); in netdev_batadv_fill_message_create()