]>
Commit | Line | Data |
---|---|---|
53e1b683 | 1 | /* SPDX-License-Identifier: LGPL-2.1+ */ |
fc2f9534 LP |
2 | #pragma once |
3 | ||
4 | /*** | |
810adae9 | 5 | Copyright © 2014 Intel Corporation. All rights reserved. |
fc2f9534 LP |
6 | ***/ |
7 | ||
a2106925 | 8 | #include "conf-parser.h" |
634f0f98 ZJS |
9 | #include "list.h" |
10 | #include "macro.h" | |
fcbf4cb7 | 11 | #include "networkd-util.h" |
fc2f9534 | 12 | |
634f0f98 ZJS |
13 | typedef struct Network Network; |
14 | typedef struct FdbEntry FdbEntry; | |
15 | typedef struct Link Link; | |
1a75764a | 16 | typedef struct NetworkConfigSection NetworkConfigSection; |
fc2f9534 LP |
17 | |
18 | struct FdbEntry { | |
19 | Network *network; | |
1a75764a | 20 | NetworkConfigSection *section; |
fc2f9534 | 21 | |
61b824c5 SS |
22 | uint32_t vni; |
23 | ||
c2c2793f | 24 | int family; |
fc2f9534 LP |
25 | uint16_t vlan_id; |
26 | ||
c2c2793f SS |
27 | struct ether_addr *mac_addr; |
28 | union in_addr_union destination_addr; | |
29 | ||
fc2f9534 LP |
30 | LIST_FIELDS(FdbEntry, static_fdb_entries); |
31 | }; | |
32 | ||
fc2f9534 | 33 | void fdb_entry_free(FdbEntry *fdb_entry); |
a60a720c | 34 | int fdb_entry_configure(Link *link, FdbEntry *fdb_entry); |
fc2f9534 | 35 | |
fcbf4cb7 | 36 | DEFINE_NETWORK_SECTION_FUNCTIONS(FdbEntry, fdb_entry_free); |
fc2f9534 | 37 | |
a2106925 LP |
38 | CONFIG_PARSER_PROTOTYPE(config_parse_fdb_hwaddr); |
39 | CONFIG_PARSER_PROTOTYPE(config_parse_fdb_vlan_id); | |
c2c2793f | 40 | CONFIG_PARSER_PROTOTYPE(config_parse_fdb_destination); |
61b824c5 | 41 | CONFIG_PARSER_PROTOTYPE(config_parse_fdb_vxlan_vni); |