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

libnl 3.10.0

macvtap.h
1/* SPDX-License-Identifier: LGPL-2.1-only */
2/*
3 * Copyright (c) 2015 Beniamino Galvani <bgalvani@redhat.com>
4 */
5
6#ifndef NETLINK_LINK_MACVTAP_H_
7#define NETLINK_LINK_MACVTAP_H_
8
9#include <netlink/netlink.h>
10#include <netlink/route/link.h>
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16extern struct rtnl_link *rtnl_link_macvtap_alloc(void);
17
18extern int rtnl_link_is_macvtap(struct rtnl_link *);
19
20extern char * rtnl_link_macvtap_mode2str(int, char *, size_t);
21extern int rtnl_link_macvtap_str2mode(const char *);
22
23extern char * rtnl_link_macvtap_flags2str(int, char *, size_t);
24extern int rtnl_link_macvtap_str2flags(const char *);
25
26extern int rtnl_link_macvtap_set_mode(struct rtnl_link *,
27 uint32_t);
28extern uint32_t rtnl_link_macvtap_get_mode(struct rtnl_link *);
29
30extern int rtnl_link_macvtap_set_flags(struct rtnl_link *,
31 uint16_t);
32extern int rtnl_link_macvtap_unset_flags(struct rtnl_link *,
33 uint16_t);
34extern uint16_t rtnl_link_macvtap_get_flags(struct rtnl_link *);
35
36#ifdef __cplusplus
37}
38#endif
39
40#endif
rtnl_link_is_macvtap
int rtnl_link_is_macvtap(struct rtnl_link *)
Check if link is a MACVTAP link.
Definition macvlan.c:681
rtnl_link_macvtap_set_flags
int rtnl_link_macvtap_set_flags(struct rtnl_link *, uint16_t)
Set MACVTAP flags.
Definition macvlan.c:730
rtnl_link_macvtap_get_mode
uint32_t rtnl_link_macvtap_get_mode(struct rtnl_link *)
Get MACVTAP Mode.
Definition macvlan.c:711
rtnl_link_macvtap_set_mode
int rtnl_link_macvtap_set_mode(struct rtnl_link *, uint32_t)
Set MACVTAP MODE.
Definition macvlan.c:693
rtnl_link_macvtap_get_flags
uint16_t rtnl_link_macvtap_get_flags(struct rtnl_link *)
Get MACVTAP flags.
Definition macvlan.c:770
rtnl_link_macvtap_unset_flags
int rtnl_link_macvtap_unset_flags(struct rtnl_link *, uint16_t)
Unset MACVTAP flags.
Definition macvlan.c:752
rtnl_link_macvtap_alloc
struct rtnl_link * rtnl_link_macvtap_alloc(void)
Allocate link object of type MACVTAP.
Definition macvlan.c:660
rtnl_link
Link object.
Definition nl-route.h:29