]>
Commit | Line | Data |
---|---|---|
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 |
13 | typedef struct Network Network; |
14 | typedef struct FdbEntry FdbEntry; | |
15 | typedef struct Link Link; | |
fc2f9534 LP |
16 | |
17 | struct 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 | 27 | int fdb_entry_new_static(Network *network, unsigned section, FdbEntry **ret); |
fc2f9534 | 28 | void fdb_entry_free(FdbEntry *fdb_entry); |
a60a720c | 29 | int fdb_entry_configure(Link *link, FdbEntry *fdb_entry); |
fc2f9534 LP |
30 | |
31 | DEFINE_TRIVIAL_CLEANUP_FUNC(FdbEntry*, fdb_entry_free); | |
fc2f9534 LP |
32 | |
33 | int 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); | |
34 | int 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); |