libnl 3.5.0

macvtap.h
1 /*
2 * netlink/route/link/macvtap.h MACVTAP interface
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation version 2.1
7 * of the License.
8 *
9 * Copyright (c) 2015 Beniamino Galvani <bgalvani@redhat.com>
10 */
11
12 #ifndef NETLINK_LINK_MACVTAP_H_
13 #define NETLINK_LINK_MACVTAP_H_
14
15 #include <netlink/netlink.h>
16 #include <netlink/route/link.h>
17
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21
22 extern struct rtnl_link *rtnl_link_macvtap_alloc(void);
23
24 extern int rtnl_link_is_macvtap(struct rtnl_link *);
25
26 extern char * rtnl_link_macvtap_mode2str(int, char *, size_t);
27 extern int rtnl_link_macvtap_str2mode(const char *);
28
29 extern char * rtnl_link_macvtap_flags2str(int, char *, size_t);
30 extern int rtnl_link_macvtap_str2flags(const char *);
31
32 extern int rtnl_link_macvtap_set_mode(struct rtnl_link *,
33 uint32_t);
34 extern uint32_t rtnl_link_macvtap_get_mode(struct rtnl_link *);
35
36 extern int rtnl_link_macvtap_set_flags(struct rtnl_link *,
37 uint16_t);
38 extern int rtnl_link_macvtap_unset_flags(struct rtnl_link *,
39 uint16_t);
40 extern uint16_t rtnl_link_macvtap_get_flags(struct rtnl_link *);
41
42 #ifdef __cplusplus
43 }
44 #endif
45
46 #endif
rtnl_link
Link object.
rtnl_link_macvtap_unset_flags
int rtnl_link_macvtap_unset_flags(struct rtnl_link *, uint16_t)
Unset MACVTAP flags.
Definition: macvlan.c:746
rtnl_link_is_macvtap
int rtnl_link_is_macvtap(struct rtnl_link *)
Check if link is a MACVTAP link.
Definition: macvlan.c:675
rtnl_link_macvtap_alloc
struct rtnl_link * rtnl_link_macvtap_alloc(void)
Allocate link object of type MACVTAP.
Definition: macvlan.c:653
rtnl_link_macvtap_get_flags
uint16_t rtnl_link_macvtap_get_flags(struct rtnl_link *)
Get MACVTAP flags.
Definition: macvlan.c:764
rtnl_link_macvtap_set_flags
int rtnl_link_macvtap_set_flags(struct rtnl_link *, uint16_t)
Set MACVTAP flags.
Definition: macvlan.c:724
rtnl_link_macvtap_get_mode
uint32_t rtnl_link_macvtap_get_mode(struct rtnl_link *)
Get MACVTAP Mode.
Definition: macvlan.c:705
rtnl_link_macvtap_set_mode
int rtnl_link_macvtap_set_mode(struct rtnl_link *, uint32_t)
Set MACVTAP MODE.
Definition: macvlan.c:687