| 1 |
/* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| 2 |
#pragma once |
| 3 |
|
| 4 |
/*** |
| 5 |
Copyright © 2014 Intel Corporation. All rights reserved. |
| 6 |
***/ |
| 7 |
|
| 8 |
#include <linux/neighbour.h> |
| 9 |
#include <net/ethernet.h> |
| 10 |
|
| 11 |
#include "in-addr-util.h" |
| 12 |
#include "networkd-forward.h" |
| 13 |
|
| 14 |
typedef enum NeighborCacheEntryFlags { |
| 15 |
NEIGHBOR_CACHE_ENTRY_FLAGS_USE = NTF_USE, |
| 16 |
NEIGHBOR_CACHE_ENTRY_FLAGS_SELF = NTF_SELF, |
| 17 |
NEIGHBOR_CACHE_ENTRY_FLAGS_MASTER = NTF_MASTER, |
| 18 |
NEIGHBOR_CACHE_ENTRY_FLAGS_ROUTER = NTF_ROUTER, |
| 19 |
_NEIGHBOR_CACHE_ENTRY_FLAGS_MAX, |
| 20 |
_NEIGHBOR_CACHE_ENTRY_FLAGS_INVALID = -EINVAL, |
| 21 |
} NeighborCacheEntryFlags; |
| 22 |
|
| 23 |
typedef struct BridgeFDB { |
| 24 |
Network *network; |
| 25 |
ConfigSection *section; |
| 26 |
|
| 27 |
uint32_t vni; |
| 28 |
|
| 29 |
int family; |
| 30 |
uint16_t vlan_id; |
| 31 |
|
| 32 |
struct ether_addr mac_addr; |
| 33 |
union in_addr_union destination_addr; |
| 34 |
NeighborCacheEntryFlags ntf_flags; |
| 35 |
char *outgoing_ifname; |
| 36 |
int outgoing_ifindex; |
| 37 |
} BridgeFDB; |
| 38 |
|
| 39 |
void network_drop_invalid_bridge_fdb_entries(Network *network); |
| 40 |
|
| 41 |
int link_request_static_bridge_fdb(Link *link); |
| 42 |
|
| 43 |
CONFIG_PARSER_PROTOTYPE(config_parse_fdb_hwaddr); |
| 44 |
CONFIG_PARSER_PROTOTYPE(config_parse_fdb_vlan_id); |
| 45 |
CONFIG_PARSER_PROTOTYPE(config_parse_fdb_destination); |
| 46 |
CONFIG_PARSER_PROTOTYPE(config_parse_fdb_vxlan_vni); |
| 47 |
CONFIG_PARSER_PROTOTYPE(config_parse_fdb_ntf_flags); |
| 48 |
CONFIG_PARSER_PROTOTYPE(config_parse_fdb_interface); |