]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/network/networkd-fdb.h
Merge pull request #10736 from yuwata/coredump-comment
[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
12 typedef struct Network Network;
13 typedef struct FdbEntry FdbEntry;
14 typedef struct Link Link;
15 typedef struct NetworkConfigSection NetworkConfigSection;
16
17 struct FdbEntry {
18 Network *network;
19 NetworkConfigSection *section;
20
21 struct ether_addr *mac_addr;
22 uint16_t vlan_id;
23
24 LIST_FIELDS(FdbEntry, static_fdb_entries);
25 };
26
27 int fdb_entry_new_static(Network *network, const char *filename, unsigned section_line, FdbEntry **ret);
28 void fdb_entry_free(FdbEntry *fdb_entry);
29 int fdb_entry_configure(Link *link, FdbEntry *fdb_entry);
30
31 DEFINE_TRIVIAL_CLEANUP_FUNC(FdbEntry*, fdb_entry_free);
32
33 CONFIG_PARSER_PROTOTYPE(config_parse_fdb_hwaddr);
34 CONFIG_PARSER_PROTOTYPE(config_parse_fdb_vlan_id);