ConOpSys V2970  P004.07
ANVILEX control operating system
Modules | Classes | Macros | Typedefs
IEEE 802.1D bridge
Collaboration diagram for IEEE 802.1D bridge:

Modules

 Options
 
 FDB example code
 

Classes

struct  bridgeif_initdata_s
 

Macros

#define BRIDGEIF_INITDATA1(max_ports, max_fdb_dynamic_entries, max_fdb_static_entries, ethaddr)   {ethaddr, max_ports, max_fdb_dynamic_entries, max_fdb_static_entries}
 
#define BRIDGEIF_INITDATA2(max_ports, max_fdb_dynamic_entries, max_fdb_static_entries, e0, e1, e2, e3, e4, e5)   {{e0, e1, e2, e3, e4, e5}, max_ports, max_fdb_dynamic_entries, max_fdb_static_entries}
 

Typedefs

typedef struct bridgeif_initdata_s bridgeif_initdata_t
 

Detailed Description

This file implements an IEEE 802.1D bridge by using a multilayer netif approach (one hardware-independent netif for the bridge that uses hardware netifs for its ports). On transmit, the bridge selects the outgoing port(s). On receive, the port netif calls into the bridge (via its netif->input function) and the bridge selects the port(s) (and/or its netif->input function) to pass the received pbuf to.

Usage:

Macro Definition Documentation

◆ BRIDGEIF_INITDATA1

#define BRIDGEIF_INITDATA1 (   max_ports,
  max_fdb_dynamic_entries,
  max_fdb_static_entries,
  ethaddr 
)    {ethaddr, max_ports, max_fdb_dynamic_entries, max_fdb_static_entries}

Use this for constant initialisation of a bridgeif_initdat_t (ethaddr must be passed as ETH_ADDR())

◆ BRIDGEIF_INITDATA2

#define BRIDGEIF_INITDATA2 (   max_ports,
  max_fdb_dynamic_entries,
  max_fdb_static_entries,
  e0,
  e1,
  e2,
  e3,
  e4,
  e5 
)    {{e0, e1, e2, e3, e4, e5}, max_ports, max_fdb_dynamic_entries, max_fdb_static_entries}

Use this for constant initialisation of a bridgeif_initdat_t (each byte of ethaddr must be passed)

Typedef Documentation

◆ bridgeif_initdata_t

Initialisation data for bridgeif_init. An instance of this type must be passed as parameter 'state' to netif_add when the bridge is added.