1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
5 Copyright © 2014 Intel Corporation. All rights reserved.
9 #include <linux/neighbour.h>
11 #include "conf-parser.h"
12 #include "ether-addr-util.h"
13 #include "in-addr-util.h"
15 typedef struct Link Link
;
16 typedef struct Network Network
;
17 typedef struct Request Request
;
19 typedef enum NeighborCacheEntryFlags
{
20 NEIGHBOR_CACHE_ENTRY_FLAGS_USE
= NTF_USE
,
21 NEIGHBOR_CACHE_ENTRY_FLAGS_SELF
= NTF_SELF
,
22 NEIGHBOR_CACHE_ENTRY_FLAGS_MASTER
= NTF_MASTER
,
23 NEIGHBOR_CACHE_ENTRY_FLAGS_ROUTER
= NTF_ROUTER
,
24 _NEIGHBOR_CACHE_ENTRY_FLAGS_MAX
,
25 _NEIGHBOR_CACHE_ENTRY_FLAGS_INVALID
= -EINVAL
,
26 } NeighborCacheEntryFlags
;
28 typedef struct BridgeFDB
{
30 NetworkConfigSection
*section
;
37 struct ether_addr mac_addr
;
38 union in_addr_union destination_addr
;
39 NeighborCacheEntryFlags ntf_flags
;
40 char *outgoing_ifname
;
44 BridgeFDB
*bridge_fdb_free(BridgeFDB
*fdb
);
46 void network_drop_invalid_bridge_fdb_entries(Network
*network
);
48 int link_request_static_bridge_fdb(Link
*link
);
50 int request_process_bridge_fdb(Request
*req
);
52 CONFIG_PARSER_PROTOTYPE(config_parse_fdb_hwaddr
);
53 CONFIG_PARSER_PROTOTYPE(config_parse_fdb_vlan_id
);
54 CONFIG_PARSER_PROTOTYPE(config_parse_fdb_destination
);
55 CONFIG_PARSER_PROTOTYPE(config_parse_fdb_vxlan_vni
);
56 CONFIG_PARSER_PROTOTYPE(config_parse_fdb_ntf_flags
);
57 CONFIG_PARSER_PROTOTYPE(config_parse_fdb_interface
);