aboutsummaryrefslogtreecommitdiff
path: root/sys/netgraph/ng_bridge.h
Commit message (Collapse)AuthorAgeFilesLines
* netgraph/ng_bridge: learn MACs via control messageLutz Donnerhacke2021-05-041-0/+11
| | | | | | | | | | | | | Add a new control message to move ethernet addresses to a given link in ng_bridge(4). Send this message instead of doing the work directly. This decouples the read-only activity from the modification under a more strict writer lock. Decoupling the work is a prerequisite for multithreaded operation. Approved by: manpages (bcr), kp (earlier version) MFC: 3 weeks Differential Revision: https://reviews.freebsd.org/D28516
* netgraph/ng_bridge: Merge internal structuresLutz Donnerhacke2021-02-091-7/+0
| | | | | | | | | | | | | | | | In a earlier version of ng_bridge(4) the exernal visible host entry structure was a strict subset of the internal one. So internal view was a direct annotation of the external structure. This strict inheritance was lost many versions ago. There is no need to encapsulate a part of the internal represntation as a separate structure. This patch is a preparation to make the internal structure read only in the data path in order to make ng_bridge(4) multithreaded. Reviewed by: kp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28545
* netgraph/ng_bridge: Remove old table ABILutz Donnerhacke2021-02-071-43/+0
| | | | | | | | | | | | | This was announced to happen after the 12 relases. Remove a depeciated ABI. The complete removal is for HEAD only. I'll remove the #define in stable/13 as MFC, so the code will still exist in 13.x, but will not included by default. Earlier versions will not be affected. Reviewed by: kp MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D28518
* netgraph/ng_bridge: Introduce "uplink" ports without MAC learningLutz Donnerhacke2021-02-061-0/+2
| | | | | | | | | | | | | | | | | | | | | The ng_bridge(4) node is designed to work in moderately small environments. Connecting such a node to a larger network rapidly fills the MAC table for no reason. It even become complicated to obtain data from the gettable message, because the result is too large to transmit. This patch introduces, two new functionality bits on the hooks: - Allow or disallow MAC address learning for incoming patckets. - Allow or disallow sending unknown MACs through this hook. Uplinks are characterized by denied learing while sending out unknowns. Normal links are charaterized by allowed learning and sending out unknowns. Reviewed by: kp Approved by: kp (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D23963
* net: clean up empty lines in .c and .h filesMateusz Guzik2020-09-011-1/+0
| | | | Notes: svn path=/head/; revision=365071
* netgraph/ng_bridge: Reestablish old ABIBjoern A. Zeeb2020-01-051-0/+43
| | | | | | | | | | | | | | | | | In order to be able to merge r353026 bring back support for the old cookie API for a transition period in 12.x releases (and possibly 13) before the old API can be removed again entirely. Suggested by: julian Submitted by: Lutz Donnerhacke (lutz donnerhacke.de) PR: 240787 Reviewed by: julian MFC after: 2 weeks X-MFC with: r353026 Differential Revision: https://reviews.freebsd.org/D21961 Notes: svn path=/head/; revision=356386
* - Remove the compile time limit for number of links a ng_bridge nodeGleb Smirnoff2019-10-031-11/+16
| | | | | | | | | | | | | can handle. Instead using an array on node private data, use per-hook private data. - Use NG_NODE_FOREACH_HOOK() to traverse through hooks instead of array. PR: 240787 Submitted by: Lutz Donnerhacke <lutz donnerhacke.de> Differential Revision: https://reviews.freebsd.org/D21803 Notes: svn path=/head/; revision=353026
* Add an optional "persistent" flag to ng_hub and ng_bridge, which if set,Marko Zec2010-05-051-0/+1
| | | | | | | | | disables automatic node shutdown when the last hook gets disconnected. Reviewed by: julian Notes: svn path=/head/; revision=207680
* Use variable-sized arrays where appropriate.Ruslan Ermilov2005-10-281-1/+1
| | | | Notes: svn path=/head/; revision=151800
* /* -> /*- for license, minor formatting changesWarner Losh2005-01-071-2/+3
| | | | Notes: svn path=/head/; revision=139823
* Fix GCC warnings caused by initializing a zero length array. In the process,Archie Cobbs2002-05-311-8/+0
| | | | | | | | | | simply things a bit by getting rid of 'struct ng_parse_struct_info' which was useless because it only contained one field. MFC after: 2 weeks Notes: svn path=/head/; revision=97685
* New netgraph node type for Ethernet bridging.Archie Cobbs2000-09-011-0/+162
No ipfw support yet. Notes: svn path=/head/; revision=65310