]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/network/networkd-fdb.h
03bacb24fb96889960c2b09bc94d7edcd9d66db2
[thirdparty/systemd.git] / src / network / networkd-fdb.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 #pragma once
3
4 /***
5 Copyright (C) 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
16 struct FdbEntry {
17 Network *network;
18 unsigned section;
19
20 struct ether_addr *mac_addr;
21 uint16_t vlan_id;
22
23 LIST_FIELDS(FdbEntry, static_fdb_entries);
24 };
25
26 int fdb_entry_new_static(Network *network, unsigned section, FdbEntry **ret);
27 void fdb_entry_free(FdbEntry *fdb_entry);
28 int fdb_entry_configure(Link *link, FdbEntry *fdb_entry);
29
30 DEFINE_TRIVIAL_CLEANUP_FUNC(FdbEntry*, fdb_entry_free);
31
32 CONFIG_PARSER_PROTOTYPE(config_parse_fdb_hwaddr);
33 CONFIG_PARSER_PROTOTYPE(config_parse_fdb_vlan_id);