libnl: /data/src/libnl3/include/netlink/route/link/veth.h Source File

libnl 3.7.0

veth.h
1 /* SPDX-License-Identifier: LGPL-2.1-only */
2 /*
3 * Copyright (c) 2013 Cong Wang <xiyou.wangcong@gmail.com>
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
rtnl_link_veth_add
int rtnl_link_veth_add(struct nl_sock *sock, const char *name, const char *peer, pid_t pid)
Create a new kernel veth device.
Definition: veth.c:268
rtnl_link_veth_release
void rtnl_link_veth_release(struct rtnl_link *)
Release a veth link and its peer.
Definition: veth.c:237
rtnl_link_veth_alloc
struct rtnl_link * rtnl_link_veth_alloc(void)
Allocate link object of type veth.
Definition: veth.c:207
rtnl_link_veth_get_peer
struct rtnl_link * rtnl_link_veth_get_peer(struct rtnl_link *)
Get the peer link of a veth link.
Definition: veth.c:226
rtnl_link_is_veth
int rtnl_link_is_veth(struct rtnl_link *)
Check if link is a veth link.
Definition: veth.c:249
rtnl_link
Link object.