15#ifndef ZEPHYR_INCLUDE_NET_ETHERNET_BRIDGE_H_
16#define ZEPHYR_INCLUDE_NET_ETHERNET_BRIDGE_H_
41#define ETH_BRIDGE_INITIALIZER(obj) \
44 .interfaces = SYS_SLIST_STATIC_INIT(&obj.interfaces), \
45 .listeners = SYS_SLIST_STATIC_INIT(&obj.listeners), \
55#define ETH_BRIDGE_INIT(name) \
56 STRUCT_SECTION_ITERABLE(eth_bridge, name) = \
57 ETH_BRIDGE_INITIALIZER(name)
61struct eth_bridge_iface_context {
63 struct eth_bridge *instance;
67struct eth_bridge_listener {
ZTEST_BMEM int index[(3)]
Definition main.c:32
int eth_bridge_listener_add(struct eth_bridge *br, struct eth_bridge_listener *l)
Add (register) a listener to the bridge.
int eth_bridge_iface_remove(struct eth_bridge *br, struct net_if *iface)
Remove an Ethernet network interface from a bridge.
int eth_bridge_iface_add(struct eth_bridge *br, struct net_if *iface)
Add an Ethernet network interface to a bridge.
void net_eth_bridge_foreach(eth_bridge_cb_t cb, void *user_data)
Go through all the bridge instances in order to get information about them.
void(* eth_bridge_cb_t)(struct eth_bridge *br, void *user_data)
Callback used while iterating over bridge instances.
Definition ethernet_bridge.h:175
struct eth_bridge * eth_bridge_get_by_index(int index)
Get bridge instance according to index.
int eth_bridge_get_index(struct eth_bridge *br)
Get bridge index according to pointer.
int eth_bridge_iface_allow_tx(struct net_if *iface, bool allow)
Enable/disable transmission mode for a bridged interface.
int eth_bridge_listener_remove(struct eth_bridge *br, struct eth_bridge_listener *l)
Remove (unregister) a listener from the bridge.
struct _slist sys_slist_t
Single-linked list structure.
Definition slist.h:49
struct _snode sys_snode_t
Single-linked list node structure.
Definition slist.h:39
static struct k_spinlock lock
Definition spinlock_error_case.c:13
Mutex Structure.
Definition kernel.h:2917
Network Interface structure.
Definition net_if.h:678
static const intptr_t user_data[5]
Definition main.c:588