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

libnl 3.7.0

macvlan.h
1 /* SPDX-License-Identifier: LGPL-2.1-only */
2 /*
3 * Copyright (c) 2013 Michael Braun <michael-dev@fami-braun.de>
4 */
5
6 #ifndef NETLINK_LINK_MACVLAN_H_
7 #define NETLINK_LINK_MACVLAN_H_
8
9 #include <netlink/netlink.h>
10 #include <netlink/route/link.h>
11
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15
16 extern struct rtnl_link *rtnl_link_macvlan_alloc(void);
17
18 extern int rtnl_link_is_macvlan(struct rtnl_link *);
19
20 extern char * rtnl_link_macvlan_mode2str(int, char *, size_t);
21 extern int rtnl_link_macvlan_str2mode(const char *);
22
23 extern char * rtnl_link_macvlan_flags2str(int, char *, size_t);
24 extern int rtnl_link_macvlan_str2flags(const char *);
25
26 extern char * rtnl_link_macvlan_macmode2str(int, char *, size_t);
27 extern int rtnl_link_macvlan_str2macmode(const char *);
28
29 extern int rtnl_link_macvlan_set_mode(struct rtnl_link *,
30 uint32_t);
31 extern uint32_t rtnl_link_macvlan_get_mode(struct rtnl_link *);
32
33 extern int rtnl_link_macvlan_set_flags(struct rtnl_link *,
34 uint16_t);
35 extern int rtnl_link_macvlan_unset_flags(struct rtnl_link *,
36 uint16_t);
37 extern uint16_t rtnl_link_macvlan_get_flags(struct rtnl_link *);
38
39 extern int rtnl_link_macvlan_set_macmode(struct rtnl_link *,
40 uint32_t);
41 extern int rtnl_link_macvlan_get_macmode(struct rtnl_link *link,
42 uint32_t *out_macmode);
43
44 extern int rtnl_link_macvlan_count_macaddr(struct rtnl_link *link,
45 uint32_t *out_count);
46 extern int rtnl_link_macvlan_get_macaddr(struct rtnl_link *link,
47 uint32_t idx,
48 const struct nl_addr **addr);
49 extern int rtnl_link_macvlan_add_macaddr(struct rtnl_link *link,
50 struct nl_addr *addr);
51 extern int rtnl_link_macvlan_del_macaddr(struct rtnl_link *link,
52 struct nl_addr *addr);
53
54 #ifdef __cplusplus
55 }
56 #endif
57
58 #endif
rtnl_link_macvlan_get_macmode
int rtnl_link_macvlan_get_macmode(struct rtnl_link *link, uint32_t *out_macmode)
Get MACVLAN MACMODE.
Definition: macvlan.c:415
rtnl_link_macvlan_unset_flags
int rtnl_link_macvlan_unset_flags(struct rtnl_link *, uint16_t)
Unset MACVLAN flags.
Definition: macvlan.c:462
rtnl_link_macvlan_set_mode
int rtnl_link_macvlan_set_mode(struct rtnl_link *, uint32_t)
Set MACVLAN MODE.
Definition: macvlan.c:340
rtnl_link_macvlan_get_mode
uint32_t rtnl_link_macvlan_get_mode(struct rtnl_link *)
Get MACVLAN Mode.
Definition: macvlan.c:369
rtnl_link_macvlan_set_macmode
int rtnl_link_macvlan_set_macmode(struct rtnl_link *, uint32_t)
Set MACVLAN MACMODE.
Definition: macvlan.c:390
rtnl_link_macvlan_get_macaddr
int rtnl_link_macvlan_get_macaddr(struct rtnl_link *link, uint32_t idx, const struct nl_addr **addr)
Get configured remote MAC-Addr from MACVLAN device in source mode.
Definition: macvlan.c:525
rtnl_link_macvlan_set_flags
int rtnl_link_macvlan_set_flags(struct rtnl_link *, uint16_t)
Set MACVLAN flags.
Definition: macvlan.c:440
rtnl_link_macvlan_del_macaddr
int rtnl_link_macvlan_del_macaddr(struct rtnl_link *link, struct nl_addr *addr)
Remove MAC-Addr from MACVLAN device in source mode.
Definition: macvlan.c:600
rtnl_link_macvlan_get_flags
uint16_t rtnl_link_macvlan_get_flags(struct rtnl_link *)
Get MACVLAN flags.
Definition: macvlan.c:480
rtnl_link_is_macvlan
int rtnl_link_is_macvlan(struct rtnl_link *)
Check if link is a MACVLAN link.
Definition: macvlan.c:328
rtnl_link_macvlan_add_macaddr
int rtnl_link_macvlan_add_macaddr(struct rtnl_link *link, struct nl_addr *addr)
Add MAC-Addr to MACVLAN device in source mode.
Definition: macvlan.c:555
rtnl_link_macvlan_count_macaddr
int rtnl_link_macvlan_count_macaddr(struct rtnl_link *link, uint32_t *out_count)
Get number of MAC-Addr for MACVLAN device in source mode.
Definition: macvlan.c:496
rtnl_link_macvlan_alloc
struct rtnl_link * rtnl_link_macvlan_alloc(void)
Allocate link object of type MACVLAN.
Definition: macvlan.c:307
rtnl_link
Link object.