]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/network/networkd-fdb.h
networkd: bridge fdb add support to configure VXLAN VNI
[thirdparty/systemd.git] / src / network / networkd-fdb.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 #pragma once
3
4 /***
5 Copyright © 2014 Intel Corporation. All rights reserved.
6 ***/
7
8 #include "conf-parser.h"
9 #include "list.h"
10 #include "macro.h"
11 #include "networkd-util.h"
12
13 typedef struct Network Network;
14 typedef struct FdbEntry FdbEntry;
15 typedef struct Link Link;
16 typedef struct NetworkConfigSection NetworkConfigSection;
17
18 struct FdbEntry {
19 Network *network;
20 NetworkConfigSection *section;
21
22 uint32_t vni;
23
24 int family;
25 uint16_t vlan_id;
26
27 struct ether_addr *mac_addr;
28 union in_addr_union destination_addr;
29
30 LIST_FIELDS(FdbEntry, static_fdb_entries);
31 };
32
33 void fdb_entry_free(FdbEntry *fdb_entry);
34 int fdb_entry_configure(Link *link, FdbEntry *fdb_entry);
35
36 DEFINE_NETWORK_SECTION_FUNCTIONS(FdbEntry, fdb_entry_free);
37
38 CONFIG_PARSER_PROTOTYPE(config_parse_fdb_hwaddr);
39 CONFIG_PARSER_PROTOTYPE(config_parse_fdb_vlan_id);
40 CONFIG_PARSER_PROTOTYPE(config_parse_fdb_destination);
41 CONFIG_PARSER_PROTOTYPE(config_parse_fdb_vxlan_vni);