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

libnl 3.12.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
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:229
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:271
rtnl_link_veth_release
void rtnl_link_veth_release(struct rtnl_link *)
Release a veth link and its peer.
Definition veth.c:240
rtnl_link_is_veth
int rtnl_link_is_veth(struct rtnl_link *)
Check if link is a veth link.
Definition veth.c:252
rtnl_link_veth_alloc
struct rtnl_link * rtnl_link_veth_alloc(void)
Allocate link object of type veth.
Definition veth.c:210
rtnl_link
Link object.
Definition nl-route.h:29