]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/network/networkd-fdb.h
Merge pull request #9039 from yuwata/fix-device-allow
[thirdparty/systemd.git] / src / network / networkd-fdb.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 #pragma once
3
4 /***
5 This file is part of systemd.
6
7 Copyright (C) 2014 Intel Corporation. All rights reserved.
8 ***/
9
10 #include "conf-parser.h"
11 #include "list.h"
12 #include "macro.h"
13
14 typedef struct Network Network;
15 typedef struct FdbEntry FdbEntry;
16 typedef struct Link Link;
17
18 struct FdbEntry {
19 Network *network;
20 unsigned section;
21
22 struct ether_addr *mac_addr;
23 uint16_t vlan_id;
24
25 LIST_FIELDS(FdbEntry, static_fdb_entries);
26 };
27
28 int fdb_entry_new_static(Network *network, unsigned section, FdbEntry **ret);
29 void fdb_entry_free(FdbEntry *fdb_entry);
30 int fdb_entry_configure(Link *link, FdbEntry *fdb_entry);
31
32 DEFINE_TRIVIAL_CLEANUP_FUNC(FdbEntry*, fdb_entry_free);
33
34 CONFIG_PARSER_PROTOTYPE(config_parse_fdb_hwaddr);
35 CONFIG_PARSER_PROTOTYPE(config_parse_fdb_vlan_id);