BadVPN – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 /**
2 * @file
3 * lwIP netif implementing an IEEE 802.1D MAC Bridge
4 */
5  
6 /*
7 * Copyright (c) 2017 Simon Goldschmidt.
8 * All rights reserved.
9 *
10 * Redistribution and use in source and binary forms, with or without modification,
11 * are permitted provided that the following conditions are met:
12 *
13 * 1. Redistributions of source code must retain the above copyright notice,
14 * this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright notice,
16 * this list of conditions and the following disclaimer in the documentation
17 * and/or other materials provided with the distribution.
18 * 3. The name of the author may not be used to endorse or promote products
19 * derived from this software without specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
22 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
23 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
24 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
26 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
29 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
30 * OF SUCH DAMAGE.
31 *
32 * This file is part of the lwIP TCP/IP stack.
33 *
34 * Author: Simon Goldschmidt <goldsimon@gmx.de>
35 *
36 */
37  
38 #ifndef LWIP_HDR_NETIF_BRIDGEIF_OPTS_H
39 #define LWIP_HDR_NETIF_BRIDGEIF_OPTS_H
40  
41 #include "lwip/opt.h"
42  
43 /**
44 * @defgroup bridgeif_opts Options
45 * @ingroup bridgeif
46 * @{
47 */
48  
49 /** BRIDGEIF_PORT_NETIFS_OUTPUT_DIRECT==1: set port netif's 'input' function
50 * to call directly into bridgeif code and on top of that, directly call into
51 * the selected forwarding port's 'linkoutput' function.
52 * This means that the bridgeif input/output path is protected from concurrent access
53 * but as well, *all* bridge port netif's drivers must correctly handle concurrent access!
54 * == 0: get into tcpip_thread for every input packet (no multithreading)
55 * ATTENTION: as ==0 relies on tcpip.h, the default depends on NO_SYS setting
56 */
57 #ifndef BRIDGEIF_PORT_NETIFS_OUTPUT_DIRECT
58 #define BRIDGEIF_PORT_NETIFS_OUTPUT_DIRECT NO_SYS
59 #endif
60  
61 /** BRIDGEIF_EXTERNAL_FDB==1: use an external implementation for the forwarding
62 * database which is possibly faster than our example implementation.
63 * (Watch out for concurrent access!)
64 */
65 #ifndef BRIDGEIF_EXTERNAL_FDB
66 #define BRIDGEIF_EXTERNAL_FDB 0
67 #endif
68  
69 /** BRIDGEIF_MAX_PORTS: this is used to create a typedef used for forwarding
70 * bit-fields: the number of bits required is this + 1 (for the internal/cpu port)
71 * (63 is the maximum, resulting in an u64_t for the bit mask)
72 * ATTENTION: this controls the maximum number of the implementation only!
73 * The max. number of ports per bridge must still be passed via netif_add parameter!
74 */
75 #ifndef BRIDGEIF_MAX_PORTS
76 #define BRIDGEIF_MAX_PORTS 7
77 #endif
78  
79 /** BRIDGEIF_DEBUG: Enable generic debugging in bridgeif.c. */
80 #ifndef BRIDGEIF_DEBUG
81 #define BRIDGEIF_DEBUG LWIP_DBG_OFF
82 #endif
83  
84 /** BRIDGEIF_DEBUG: Enable FDB debugging in bridgeif.c. */
85 #ifndef BRIDGEIF_FDB_DEBUG
86 #define BRIDGEIF_FDB_DEBUG LWIP_DBG_OFF
87 #endif
88  
89 /** BRIDGEIF_DEBUG: Enable forwarding debugging in bridgeif.c. */
90 #ifndef BRIDGEIF_FW_DEBUG
91 #define BRIDGEIF_FW_DEBUG LWIP_DBG_OFF
92 #endif
93  
94 /**
95 * @}
96 */
97  
98 #endif /* LWIP_HDR_NETIF_BRIDGEIF_OPTS_H */