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
14extern "C" {
15#endif
16
17extern struct rtnl_link *rtnl_link_veth_alloc(void);
18extern void rtnl_link_veth_release(struct rtnl_link *);
19
20extern int rtnl_link_is_veth(struct rtnl_link *);
21
22extern struct rtnl_link *rtnl_link_veth_get_peer(struct rtnl_link *);
23extern 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
struct rtnl_link * rtnl_link_veth_get_peer(struct rtnl_link *)
Get the peer link of a veth link.
Definition: veth.c:226
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
void rtnl_link_veth_release(struct rtnl_link *)
Release a veth link and its peer.
Definition: veth.c:237
int rtnl_link_is_veth(struct rtnl_link *)
Check if link is a veth link.
Definition: veth.c:249
struct rtnl_link * rtnl_link_veth_alloc(void)
Allocate link object of type veth.
Definition: veth.c:207