bridgeif: improve documentation

This commit is contained in:
goldsimon
2017-04-04 21:54:52 +02:00
parent 8ed2bd4771
commit 97f4033a8a
4 changed files with 47 additions and 6 deletions

View File

@@ -58,16 +58,25 @@ typedef u64_t bridgeif_portmask_t;
#define BR_FLOOD ((bridgeif_portmask_t)-1)
/** Initialisation data for @ref bridgeif_init.
* An instance of this type must be passed as parameter 'state' to @ref netif_add
* when the bridge is added.
*/
typedef struct bridgeif_initdata_s {
/** MAC address of the bridge (cannot use the netif's addresses) */
struct eth_addr ethaddr;
/** Maximum number of ports in the bridge (ports are stored in an array, this
influences memory allocated for netif->state of the bridge netif). */
u8_t max_ports;
/** Maximum number of dynamic/learning entries in the bridge's forwarding database.
In the default implementation, this controls memory consumption only. */
u16_t max_fdb_dynamic_entries;
/** Maximum number of static forwarding entries. Influences memory consumption! */
u16_t max_fdb_static_entries;
} bridgeif_initdata_t;
/* Use this for constant initialization of a bridgeif_initdat_t
(ethaddr must be passed as pointer)*/
(ethaddr must be passed as MAKE_ETH_ADDR())*/
#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 initialization of a bridgeif_initdat_t
(each byte of ethaddr must be passed)*/

View File

@@ -50,7 +50,7 @@
* to call directly into bridgeif code and on top of that, directly call into
* the selected forwarding port's 'linkoutput' function.
* This means that the bridgeif input/output path is protected from concurrent access
* but as well, the port netif's drivers must correctly handle concurrent access!
* but as well, *all* bridge port netif's drivers must correctly handle concurrent access!
* == 0: get into tcpip_thread for every input packet (no multithreading)
* ATTENTION: as ==0 relies on tcpip.h, the default depends on NO_SYS setting
*/