1 /* SPDX-License-Identifier: LGPL-2.1-or-later */ 2 #pragma once 3 4 #include <net/if.h> 5 #include <stdbool.h> 6 #include <sys/types.h> 7 8 int test_network_interface_initialized(const char *name); 9 10 int setup_veth(const char *machine_name, pid_t pid, char iface_name[IFNAMSIZ], bool bridge); 11 int setup_veth_extra(const char *machine_name, pid_t pid, char **pairs); 12 13 int setup_bridge(const char *veth_name, const char *bridge_name, bool create); 14 int remove_bridge(const char *bridge_name); 15 16 int setup_macvlan(const char *machine_name, pid_t pid, char **ifaces); 17 int setup_ipvlan(const char *machine_name, pid_t pid, char **ifaces); 18 19 int move_network_interfaces(int netns_fd, char **ifaces); 20 21 int veth_extra_parse(char ***l, const char *p); 22 23 int remove_veth_links(const char *primary, char **pairs); 24