1 /* SPDX-License-Identifier: LGPL-2.1-only */ 2 /* 3 * Copyright (c) 2013 Cong Wang <[email protected]> 4 */ 5 6 #ifndef NETLINK_LINK_VETH_H_ 7 #define NETLINK_LINK_VETH_H_ 8 9 #include <netlink/netlink.h> 10 #include <netlink/route/link.h> 11 #include <sys/types.h> 12 13 #ifdef __cplusplus 14 extern "C" { 15 #endif 16 17 extern struct rtnl_link *rtnl_link_veth_alloc(void); 18 extern void rtnl_link_veth_release(struct rtnl_link *); 19 20 extern int rtnl_link_is_veth(struct rtnl_link *); 21 22 extern struct rtnl_link *rtnl_link_veth_get_peer(struct rtnl_link *); 23 extern int rtnl_link_veth_add(struct nl_sock *sock, const char *name, 24 const char *peer, pid_t pid); 25 26 #ifdef __cplusplus 27 } 28 #endif 29 30 #endif 31