Changeset View
Standalone View
share/man/man4/ng_bridge.4
Show All 28 Lines | |||||
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||||
.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY | .\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY | ||||
.\" OF SUCH DAMAGE. | .\" OF SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" Author: Archie Cobbs <archie@FreeBSD.org> | .\" Author: Archie Cobbs <archie@FreeBSD.org> | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd October 2, 2019 | .Dd February 6, 2021 | ||||
.Dt NG_BRIDGE 4 | .Dt NG_BRIDGE 4 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm ng_bridge | .Nm ng_bridge | ||||
.Nd Ethernet bridging netgraph node type | .Nd Ethernet bridging netgraph node type | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
.In sys/types.h | .In sys/types.h | ||||
.In netgraph/ng_bridge.h | .In netgraph/ng_bridge.h | ||||
▲ Show 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | |||||
hooks of one or more | hooks of one or more | ||||
.Xr ng_ether 4 | .Xr ng_ether 4 | ||||
nodes. | nodes. | ||||
To connect the host machine to a bridged network, simply connect the | To connect the host machine to a bridged network, simply connect the | ||||
.Dv upper | .Dv upper | ||||
hook of an | hook of an | ||||
.Xr ng_ether 4 | .Xr ng_ether 4 | ||||
node to the bridge node. | node to the bridge node. | ||||
.Pp | |||||
Instead of naming a hook | |||||
.Dv linkX | |||||
the hook might be also named | |||||
.Dv uplinkX . | |||||
The node does not learn MAC addresses on uplink hooks, which keeps | |||||
dab: s/does no/does not/ | |||||
the internal address table small. | |||||
Done Inline ActionsYou need to make a line break after a sentence stop. bcr: You need to make a line break after a sentence stop. | |||||
Done Inline ActionsI don't think it is common usage to start a sentence with "i.e.", nor is it common usage to capitalize such an abbreviation. Such an abbreviation is usually followed by a comma. Suggest: the internal address table small; i.e., it's desirable to connect That would also address the newline after full stop issue. :-) dab: I don't think it is common usage to start a sentence with "i.e.", nor is it common usage to… | |||||
Done Inline ActionsApart from the above (line break, comma after i.e.), contraction should be expanded: it's -> it is. danfe: Apart from the above (line break, comma after i.e.), contraction should be expanded: //it's//… | |||||
This way it is desirable to connect the | |||||
.Dv lower | |||||
hook of an | |||||
.Xr ng_ether 4 | |||||
node to an | |||||
.Dv uplink | |||||
Done Inline Actionss/send out/sent out/ dab: s/send out/sent out/ | |||||
hook of the bridge, and ignore the complexity of the outside world. | |||||
Frames with unknown MACs are always sent out to | |||||
.Dv uplink | |||||
hooks, so no functionality is lost. | |||||
.Sh CONTROL MESSAGES | .Sh CONTROL MESSAGES | ||||
This node type supports the generic control messages, plus the | This node type supports the generic control messages, plus the | ||||
following: | following: | ||||
.Bl -tag -width foo | .Bl -tag -width foo | ||||
.It Dv NGM_BRIDGE_SET_CONFIG Pq Ic setconfig | .It Dv NGM_BRIDGE_SET_CONFIG Pq Ic setconfig | ||||
Set the node configuration. | Set the node configuration. | ||||
This command takes a | This command takes a | ||||
.Dv "struct ng_bridge_config" | .Dv "struct ng_bridge_config" | ||||
Show All 32 Lines | |||||
Returns the current configuration as a | Returns the current configuration as a | ||||
.Dv "struct ng_bridge_config" . | .Dv "struct ng_bridge_config" . | ||||
.It Dv NGM_BRIDGE_RESET Pq Ic reset | .It Dv NGM_BRIDGE_RESET Pq Ic reset | ||||
Causes the node to forget all hosts and unmute all links. | Causes the node to forget all hosts and unmute all links. | ||||
The node configuration is not changed. | The node configuration is not changed. | ||||
.It Dv NGM_BRIDGE_GET_STATS Pq Ic getstats | .It Dv NGM_BRIDGE_GET_STATS Pq Ic getstats | ||||
This command takes a four byte link number as an argument and | This command takes a four byte link number as an argument and | ||||
returns a | returns a | ||||
.Dv "struct ng_bridge_link_stats" | .Dv "struct ng_bridge_link_stats" | ||||
containing statistics for the corresponding link, which must be | containing statistics for the corresponding | ||||
Done Inline Actionsjust a note as .Dv seems to be misused throughout this entire man page -- .Dv does not seem to be the correct choice for struct ng_bridge_link_stats, use .Vt? and for link, may be .Va? yuripv: just a note as `.Dv` seems to be misused throughout this entire man page -- `.Dv` does not seem… | |||||
Done Inline ActionsI'd like to keep it consistent for the moment and fix this issue in a separate review. donner: I'd like to keep it consistent for the moment and fix this issue in a separate review. | |||||
currently connected: | .Dv link , | ||||
which must be currently connected: | |||||
.Bd -literal -offset 0n | .Bd -literal -offset 0n | ||||
/* Statistics structure (one for each link) */ | /* Statistics structure (one for each link) */ | ||||
struct ng_bridge_link_stats { | struct ng_bridge_link_stats { | ||||
uint64_t recvOctets; /* total octets rec'd on link */ | uint64_t recvOctets; /* total octets rec'd on link */ | ||||
uint64_t recvPackets; /* total pkts rec'd on link */ | uint64_t recvPackets; /* total pkts rec'd on link */ | ||||
uint64_t recvMulticasts; /* multicast pkts rec'd on link */ | uint64_t recvMulticasts; /* multicast pkts rec'd on link */ | ||||
uint64_t recvBroadcasts; /* broadcast pkts rec'd on link */ | uint64_t recvBroadcasts; /* broadcast pkts rec'd on link */ | ||||
uint64_t recvUnknown; /* pkts rec'd with unknown dest addr */ | uint64_t recvUnknown; /* pkts rec'd with unknown dest addr */ | ||||
uint64_t recvRunts; /* pkts rec'd less than 14 bytes */ | uint64_t recvRunts; /* pkts rec'd less than 14 bytes */ | ||||
uint64_t recvInvalid; /* pkts rec'd with bogus source addr */ | uint64_t recvInvalid; /* pkts rec'd with bogus source addr */ | ||||
uint64_t xmitOctets; /* total octets xmit'd on link */ | uint64_t xmitOctets; /* total octets xmit'd on link */ | ||||
uint64_t xmitPackets; /* total pkts xmit'd on link */ | uint64_t xmitPackets; /* total pkts xmit'd on link */ | ||||
uint64_t xmitMulticasts; /* multicast pkts xmit'd on link */ | uint64_t xmitMulticasts; /* multicast pkts xmit'd on link */ | ||||
uint64_t xmitBroadcasts; /* broadcast pkts xmit'd on link */ | uint64_t xmitBroadcasts; /* broadcast pkts xmit'd on link */ | ||||
uint64_t loopDrops; /* pkts dropped due to loopback */ | uint64_t loopDrops; /* pkts dropped due to loopback */ | ||||
uint64_t loopDetects; /* number of loop detections */ | uint64_t loopDetects; /* number of loop detections */ | ||||
uint64_t memoryFailures; /* times couldn't get mem or mbuf */ | uint64_t memoryFailures; /* times couldn't get mem or mbuf */ | ||||
}; | }; | ||||
.Ed | .Ed | ||||
.Pp | |||||
Negative numbers refer to the | |||||
.Dv uplink | |||||
hooks. | |||||
So querying for -7 will get the statistics for hook | |||||
Done Inline Actionss/quering/querying/ dab: s/quering/querying/ | |||||
.Dv uplink7 . | |||||
.It Dv NGM_BRIDGE_CLR_STATS Pq Ic clrstats | .It Dv NGM_BRIDGE_CLR_STATS Pq Ic clrstats | ||||
This command takes a four byte link number as an argument and | This command takes a four byte link number as an argument and | ||||
clears the statistics for that link. | clears the statistics for that link. | ||||
.It Dv NGM_BRIDGE_GETCLR_STATS Pq Ic getclrstats | .It Dv NGM_BRIDGE_GETCLR_STATS Pq Ic getclrstats | ||||
Same as | Same as | ||||
.Dv NGM_BRIDGE_GET_STATS , | .Dv NGM_BRIDGE_GET_STATS , | ||||
but also atomically clears the statistics as well. | but also atomically clears the statistics as well. | ||||
.It Dv NGM_BRIDGE_GET_TABLE Pq Ic gettable | .It Dv NGM_BRIDGE_GET_TABLE Pq Ic gettable | ||||
Show All 32 Lines |
s/does no/does not/