liyujie
2025-08-28 786ff4f4ca2374bdd9177f2e24b503d43e7a3b93
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
 * netlink/route/link/macvlan.h        MACVLAN interface
 *
 *    This library is free software; you can redistribute it and/or
 *    modify it under the terms of the GNU Lesser General Public
 *    License as published by the Free Software Foundation version 2.1
 *    of the License.
 *
 * Copyright (c) 2013 Michael Braun <michael-dev@fami-braun.de>
 */
 
#ifndef NETLINK_LINK_MACVLAN_H_
#define NETLINK_LINK_MACVLAN_H_
 
#include <netlink/netlink.h>
#include <netlink/route/link.h>
 
#ifdef __cplusplus
extern "C" {
#endif
 
extern struct rtnl_link *rtnl_link_macvlan_alloc(void);
 
extern int        rtnl_link_is_macvlan(struct rtnl_link *);
 
extern char *        rtnl_link_macvlan_mode2str(int, char *, size_t);
extern int        rtnl_link_macvlan_str2mode(const char *);
 
extern char *        rtnl_link_macvlan_flags2str(int, char *, size_t);
extern int        rtnl_link_macvlan_str2flags(const char *);
 
extern int        rtnl_link_macvlan_set_mode(struct rtnl_link *,
                                      uint32_t);
extern uint32_t        rtnl_link_macvlan_get_mode(struct rtnl_link *);
 
extern int        rtnl_link_macvlan_set_flags(struct rtnl_link *,
                        uint16_t);
extern int        rtnl_link_macvlan_unset_flags(struct rtnl_link *,
                          uint16_t);
extern uint16_t        rtnl_link_macvlan_get_flags(struct rtnl_link *);
 
#ifdef __cplusplus
}
#endif
 
#endif