xref: /freebsd/share/man/man4/ng_hub.4 (revision 2597250955f157706cd1c22d08fdc348639921aa)
1b462702fSRuslan Ermilov.\" Copyright (c) 2004 Ruslan Ermilov
2b462702fSRuslan Ermilov.\" All rights reserved.
3b462702fSRuslan Ermilov.\"
4b462702fSRuslan Ermilov.\" Redistribution and use in source and binary forms, with or without
5b462702fSRuslan Ermilov.\" modification, are permitted provided that the following conditions
6b462702fSRuslan Ermilov.\" are met:
7b462702fSRuslan Ermilov.\" 1. Redistributions of source code must retain the above copyright
8b462702fSRuslan Ermilov.\"    notice, this list of conditions and the following disclaimer.
9b462702fSRuslan Ermilov.\" 2. Redistributions in binary form must reproduce the above copyright
10b462702fSRuslan Ermilov.\"    notice, this list of conditions and the following disclaimer in the
11b462702fSRuslan Ermilov.\"    documentation and/or other materials provided with the distribution.
12b462702fSRuslan Ermilov.\"
13b462702fSRuslan Ermilov.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14b462702fSRuslan Ermilov.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15b462702fSRuslan Ermilov.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16b462702fSRuslan Ermilov.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17b462702fSRuslan Ermilov.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18b462702fSRuslan Ermilov.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19b462702fSRuslan Ermilov.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20b462702fSRuslan Ermilov.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21b462702fSRuslan Ermilov.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22b462702fSRuslan Ermilov.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23b462702fSRuslan Ermilov.\" SUCH DAMAGE.
24b462702fSRuslan Ermilov.\"
25b462702fSRuslan Ermilov.\" $FreeBSD$
26b462702fSRuslan Ermilov.\"
27f8aab721SMarko Zec.Dd May 5, 2010
28b462702fSRuslan Ermilov.Dt NG_HUB 4
29b462702fSRuslan Ermilov.Os
30b462702fSRuslan Ermilov.Sh NAME
31b462702fSRuslan Ermilov.Nm ng_hub
32b462702fSRuslan Ermilov.Nd packet distribution netgraph node type
33b462702fSRuslan Ermilov.Sh SYNOPSIS
34b462702fSRuslan Ermilov.In netgraph/ng_hub.h
35b462702fSRuslan Ermilov.Sh DESCRIPTION
36b462702fSRuslan ErmilovThe
37b462702fSRuslan Ermilov.Nm hub
38b462702fSRuslan Ermilovnode type provides a simple mechanism for distributing packets over
39b462702fSRuslan Ermilovseveral links.
40b462702fSRuslan ErmilovPackets received on any of the hooks are forwarded out the other hooks.
41b462702fSRuslan ErmilovPackets are not altered in any way.
42b462702fSRuslan Ermilov.Sh HOOKS
43b462702fSRuslan ErmilovA
44b462702fSRuslan Ermilov.Nm hub
45b462702fSRuslan Ermilovnode accepts any request to connect, regardless of the hook name,
46b462702fSRuslan Ermilovas long as the name is unique.
47b462702fSRuslan Ermilov.Sh CONTROL MESSAGES
48f8aab721SMarko ZecThis node type supports the generic control messages, plus the
49f8aab721SMarko Zecfollowing:
50f8aab721SMarko Zec.Bl -tag -width foo
51c60bda17SJoel Dahl.It Dv NGM_HUB_SET_PERSISTENT Pq Ic setpersistent
52f8aab721SMarko ZecThis command sets the persistent flag on the node, and takes no arguments.
53f8aab721SMarko Zec.El
54b462702fSRuslan Ermilov.Sh SHUTDOWN
55b462702fSRuslan ErmilovThis node shuts down upon receipt of a
56b462702fSRuslan Ermilov.Dv NGM_SHUTDOWN
57*25972509SEdward Tomasz Napieralacontrol message, or when all hooks have been disconnected.
58*25972509SEdward Tomasz NapieralaSetting the persistent flag via a
59f8aab721SMarko Zec.Dv NGM_HUB_SET_PERSISTENT
60f8aab721SMarko Zeccontrol message disables automatic node shutdown when the last hook gets
61f8aab721SMarko Zecdisconnected.
62b462702fSRuslan Ermilov.Sh SEE ALSO
63b462702fSRuslan Ermilov.Xr netgraph 4 ,
64b462702fSRuslan Ermilov.Xr ng_bridge 4 ,
65b462702fSRuslan Ermilov.Xr ng_ether 4 ,
66b462702fSRuslan Ermilov.Xr ng_one2many 4 ,
67b462702fSRuslan Ermilov.Xr ngctl 8 ,
68b462702fSRuslan Ermilov.Xr nghook 8
69b462702fSRuslan Ermilov.Sh HISTORY
70b462702fSRuslan ErmilovThe
71b462702fSRuslan Ermilov.Nm
72b462702fSRuslan Ermilovnode type appeared in
73b462702fSRuslan Ermilov.Fx 5.3 .
74b462702fSRuslan Ermilov.Sh AUTHORS
756c899950SBaptiste Daroussin.An Ruslan Ermilov Aq Mt ru@FreeBSD.org
76