libnl 3.7.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);
33 uint16_t);
34extern uint16_t rtnl_link_macvtap_get_flags(struct rtnl_link *);
35
36#ifdef __cplusplus
37}
38#endif
39
40#endif
int rtnl_link_is_macvtap(struct rtnl_link *)
Check if link is a MACVTAP link.
Definition: macvlan.c:673
int rtnl_link_macvtap_set_flags(struct rtnl_link *, uint16_t)
Set MACVTAP flags.
Definition: macvlan.c:722
uint32_t rtnl_link_macvtap_get_mode(struct rtnl_link *)
Get MACVTAP Mode.
Definition: macvlan.c:703
int rtnl_link_macvtap_set_mode(struct rtnl_link *, uint32_t)
Set MACVTAP MODE.
Definition: macvlan.c:685
uint16_t rtnl_link_macvtap_get_flags(struct rtnl_link *)
Get MACVTAP flags.
Definition: macvlan.c:762
int rtnl_link_macvtap_unset_flags(struct rtnl_link *, uint16_t)
Unset MACVTAP flags.
Definition: macvlan.c:744
struct rtnl_link * rtnl_link_macvtap_alloc(void)
Allocate link object of type MACVTAP.
Definition: macvlan.c:652