2017-11-18 17:09:20 +01:00
|
|
|
/* SPDX-License-Identifier: LGPL-2.1+ */
|
2015-08-27 13:59:06 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
/***
|
2018-06-12 17:15:23 +02:00
|
|
|
Copyright © 2014 Intel Corporation. All rights reserved.
|
2015-08-27 13:59:06 +02:00
|
|
|
***/
|
|
|
|
|
2018-05-22 13:10:17 +02:00
|
|
|
#include "conf-parser.h"
|
2016-04-29 04:52:04 +02:00
|
|
|
#include "list.h"
|
|
|
|
#include "macro.h"
|
2019-03-01 05:27:47 +01:00
|
|
|
#include "networkd-util.h"
|
2015-08-27 13:59:06 +02:00
|
|
|
|
2016-04-29 04:52:04 +02:00
|
|
|
typedef struct Network Network;
|
|
|
|
typedef struct FdbEntry FdbEntry;
|
|
|
|
typedef struct Link Link;
|
2018-11-12 06:54:04 +01:00
|
|
|
typedef struct NetworkConfigSection NetworkConfigSection;
|
2015-08-27 13:59:06 +02:00
|
|
|
|
|
|
|
struct FdbEntry {
|
|
|
|
Network *network;
|
2018-11-12 06:54:04 +01:00
|
|
|
NetworkConfigSection *section;
|
2015-08-27 13:59:06 +02:00
|
|
|
|
|
|
|
struct ether_addr *mac_addr;
|
|
|
|
uint16_t vlan_id;
|
|
|
|
|
|
|
|
LIST_FIELDS(FdbEntry, static_fdb_entries);
|
|
|
|
};
|
|
|
|
|
|
|
|
void fdb_entry_free(FdbEntry *fdb_entry);
|
2016-06-03 19:20:46 +02:00
|
|
|
int fdb_entry_configure(Link *link, FdbEntry *fdb_entry);
|
2015-08-27 13:59:06 +02:00
|
|
|
|
2019-03-01 05:27:47 +01:00
|
|
|
DEFINE_NETWORK_SECTION_FUNCTIONS(FdbEntry, fdb_entry_free);
|
2015-08-27 13:59:06 +02:00
|
|
|
|
2018-05-22 13:10:17 +02:00
|
|
|
CONFIG_PARSER_PROTOTYPE(config_parse_fdb_hwaddr);
|
|
|
|
CONFIG_PARSER_PROTOTYPE(config_parse_fdb_vlan_id);
|