]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/network/networkd-fdb.h
config-parser: introduce new CONFIG_PARSER_PROTOTYPE() macro
[thirdparty/systemd.git] / src / network / networkd-fdb.h
CommitLineData
53e1b683 1/* SPDX-License-Identifier: LGPL-2.1+ */
fc2f9534
LP
2#pragma once
3
4/***
5 This file is part of systemd.
6
7 Copyright (C) 2014 Intel Corporation. All rights reserved.
fc2f9534
LP
8***/
9
634f0f98
ZJS
10#include "list.h"
11#include "macro.h"
fc2f9534 12
634f0f98
ZJS
13typedef struct Network Network;
14typedef struct FdbEntry FdbEntry;
15typedef struct Link Link;
fc2f9534
LP
16
17struct FdbEntry {
18 Network *network;
19 unsigned section;
20
21 struct ether_addr *mac_addr;
22 uint16_t vlan_id;
23
24 LIST_FIELDS(FdbEntry, static_fdb_entries);
25};
26
a60a720c 27int fdb_entry_new_static(Network *network, unsigned section, FdbEntry **ret);
fc2f9534 28void fdb_entry_free(FdbEntry *fdb_entry);
a60a720c 29int fdb_entry_configure(Link *link, FdbEntry *fdb_entry);
fc2f9534
LP
30
31DEFINE_TRIVIAL_CLEANUP_FUNC(FdbEntry*, fdb_entry_free);
fc2f9534
LP
32
33int config_parse_fdb_hwaddr(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
34int config_parse_fdb_vlan_id(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);