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

libnl 3.12.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
13extern "C" {
14#endif
15
16extern struct rtnl_link *rtnl_link_macvlan_alloc(void);
17
18extern int rtnl_link_is_macvlan(struct rtnl_link *);
19
20extern char * rtnl_link_macvlan_mode2str(int, char *, size_t);
21extern int rtnl_link_macvlan_str2mode(const char *);
22
23extern char * rtnl_link_macvlan_flags2str(int, char *, size_t);
24extern int rtnl_link_macvlan_str2flags(const char *);
25
26extern char * rtnl_link_macvlan_macmode2str(int, char *, size_t);
27extern int rtnl_link_macvlan_str2macmode(const char *);
28
29extern int rtnl_link_macvlan_set_mode(struct rtnl_link *,
30 uint32_t);
31extern uint32_t rtnl_link_macvlan_get_mode(struct rtnl_link *);
32
33extern int rtnl_link_macvlan_set_flags(struct rtnl_link *,
34 uint16_t);
35extern int rtnl_link_macvlan_unset_flags(struct rtnl_link *,
36 uint16_t);
37extern uint16_t rtnl_link_macvlan_get_flags(struct rtnl_link *);
38
39extern int rtnl_link_macvlan_set_macmode(struct rtnl_link *,
40 uint32_t);
41extern int rtnl_link_macvlan_get_macmode(struct rtnl_link *link,
42 uint32_t *out_macmode);
43
44extern int rtnl_link_macvlan_count_macaddr(struct rtnl_link *link,
45 uint32_t *out_count);
46extern int rtnl_link_macvlan_get_macaddr(struct rtnl_link *link,
47 uint32_t idx,
48 const struct nl_addr **addr);
49extern int rtnl_link_macvlan_add_macaddr(struct rtnl_link *link,
50 struct nl_addr *addr);
51extern 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:423
rtnl_link_macvlan_unset_flags
int rtnl_link_macvlan_unset_flags(struct rtnl_link *, uint16_t)
Unset MACVLAN flags.
Definition macvlan.c:470
rtnl_link_macvlan_set_mode
int rtnl_link_macvlan_set_mode(struct rtnl_link *, uint32_t)
Set MACVLAN MODE.
Definition macvlan.c:347
rtnl_link_macvlan_alloc
struct rtnl_link * rtnl_link_macvlan_alloc(void)
Allocate link object of type MACVLAN.
Definition macvlan.c:314
rtnl_link_macvlan_get_mode
uint32_t rtnl_link_macvlan_get_mode(struct rtnl_link *)
Get MACVLAN Mode.
Definition macvlan.c:377
rtnl_link_macvlan_set_macmode
int rtnl_link_macvlan_set_macmode(struct rtnl_link *, uint32_t)
Set MACVLAN MACMODE.
Definition macvlan.c:398
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:533
rtnl_link_macvlan_set_flags
int rtnl_link_macvlan_set_flags(struct rtnl_link *, uint16_t)
Set MACVLAN flags.
Definition macvlan.c:448
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:608
rtnl_link_macvlan_get_flags
uint16_t rtnl_link_macvlan_get_flags(struct rtnl_link *)
Get MACVLAN flags.
Definition macvlan.c:488
rtnl_link_is_macvlan
int rtnl_link_is_macvlan(struct rtnl_link *)
Check if link is a MACVLAN link.
Definition macvlan.c:335
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:563
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:504
rtnl_link
Link object.
Definition nl-route.h:29