1 /* 2 * netlink/route/link/veth.h VETH interface 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Lesser General Public 6 * License as published by the Free Software Foundation version 2.1 7 * of the License. 8 * 9 * Copyright (c) 2013 Cong Wang <xiyou.wangcong@gmail.com> 10 */ 11 12 #ifndef NETLINK_LINK_VETH_H_ 13 #define NETLINK_LINK_VETH_H_ 14 15 #include <netlink/netlink.h> 16 #include <netlink/route/link.h> 17 #include <sys/types.h> 18 19 #ifdef __cplusplus 20 extern "C" { 21 #endif 22 23 extern struct rtnl_link *rtnl_link_veth_alloc(void); 24 extern void rtnl_link_veth_release(struct rtnl_link *); 25 26 extern int rtnl_link_is_veth(struct rtnl_link *); 27 28 extern struct rtnl_link *rtnl_link_veth_get_peer(struct rtnl_link *); 29 extern int rtnl_link_veth_add(struct nl_sock *sock, const char *name, 30 const char *peer, pid_t pid); 31 32 #ifdef __cplusplus 33 } 34 #endif 35 36 #endif 37