libnl 3.7.0
vlan.h
1/* SPDX-License-Identifier: LGPL-2.1-only */
2/*
3 * Copyright (c) 2003-2013 Thomas Graf <tgraf@suug.ch>
4 */
5
6#ifndef NETLINK_LINK_VLAN_H_
7#define NETLINK_LINK_VLAN_H_
8
9#include <netlink/netlink.h>
10#include <netlink/route/link.h>
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
17{
18 uint32_t vm_from;
19 uint32_t vm_to;
20};
21
22#define VLAN_PRIO_MAX 7
23
24extern struct rtnl_link *rtnl_link_vlan_alloc(void);
25
26extern int rtnl_link_is_vlan(struct rtnl_link *);
27
28extern char * rtnl_link_vlan_flags2str(int, char *, size_t);
29extern int rtnl_link_vlan_str2flags(const char *);
30
31extern int rtnl_link_vlan_set_protocol(struct rtnl_link *link, uint16_t);
32extern int rtnl_link_vlan_get_protocol(struct rtnl_link *link);
33
34extern int rtnl_link_vlan_set_id(struct rtnl_link *, uint16_t);
35extern int rtnl_link_vlan_get_id(struct rtnl_link *);
36
37extern int rtnl_link_vlan_set_flags(struct rtnl_link *,
38 unsigned int);
39extern int rtnl_link_vlan_unset_flags(struct rtnl_link *,
40 unsigned int);
41extern int rtnl_link_vlan_get_flags(struct rtnl_link *);
42
43extern int rtnl_link_vlan_set_ingress_map(struct rtnl_link *,
44 int, uint32_t);
45extern uint32_t * rtnl_link_vlan_get_ingress_map(struct rtnl_link *);
46
47extern int rtnl_link_vlan_set_egress_map(struct rtnl_link *,
48 uint32_t, int);
49extern struct vlan_map *rtnl_link_vlan_get_egress_map(struct rtnl_link *,
50 int *);
51
52#ifdef __cplusplus
53}
54#endif
55
56#endif
int rtnl_link_vlan_get_protocol(struct rtnl_link *link)
Get VLAN protocol.
Definition: vlan.c:487
int rtnl_link_vlan_unset_flags(struct rtnl_link *, unsigned int)
Unset VLAN flags.
Definition: vlan.c:526
int rtnl_link_vlan_set_id(struct rtnl_link *, uint16_t)
Set VLAN ID.
Definition: vlan.c:430
int rtnl_link_vlan_set_protocol(struct rtnl_link *link, uint16_t)
Set VLAN protocol.
Definition: vlan.c:468
int rtnl_link_is_vlan(struct rtnl_link *)
Check if link is a VLAN link.
Definition: vlan.c:418
int rtnl_link_vlan_get_id(struct rtnl_link *)
Get VLAN Id.
Definition: vlan.c:448
struct rtnl_link * rtnl_link_vlan_alloc(void)
Allocate link object of type VLAN.
Definition: vlan.c:397
int rtnl_link_vlan_set_flags(struct rtnl_link *, unsigned int)
Set VLAN flags.
Definition: vlan.c:506
int rtnl_link_vlan_get_flags(struct rtnl_link *)
Get VLAN flags.
Definition: vlan.c:545
Definition: vlan.h:17