xref: /freebsd/share/man/man4/ng_hub.4 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
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.\"
25f8aab721SMarko Zec.Dd May 5, 2010
26b462702fSRuslan Ermilov.Dt NG_HUB 4
27b462702fSRuslan Ermilov.Os
28b462702fSRuslan Ermilov.Sh NAME
29b462702fSRuslan Ermilov.Nm ng_hub
30b462702fSRuslan Ermilov.Nd packet distribution netgraph node type
31b462702fSRuslan Ermilov.Sh SYNOPSIS
32b462702fSRuslan Ermilov.In netgraph/ng_hub.h
33b462702fSRuslan Ermilov.Sh DESCRIPTION
34b462702fSRuslan ErmilovThe
35b462702fSRuslan Ermilov.Nm hub
36b462702fSRuslan Ermilovnode type provides a simple mechanism for distributing packets over
37b462702fSRuslan Ermilovseveral links.
38b462702fSRuslan ErmilovPackets received on any of the hooks are forwarded out the other hooks.
39b462702fSRuslan ErmilovPackets are not altered in any way.
40b462702fSRuslan Ermilov.Sh HOOKS
41b462702fSRuslan ErmilovA
42b462702fSRuslan Ermilov.Nm hub
43b462702fSRuslan Ermilovnode accepts any request to connect, regardless of the hook name,
44b462702fSRuslan Ermilovas long as the name is unique.
45b462702fSRuslan Ermilov.Sh CONTROL MESSAGES
46f8aab721SMarko ZecThis node type supports the generic control messages, plus the
47f8aab721SMarko Zecfollowing:
48f8aab721SMarko Zec.Bl -tag -width foo
49c60bda17SJoel Dahl.It Dv NGM_HUB_SET_PERSISTENT Pq Ic setpersistent
50f8aab721SMarko ZecThis command sets the persistent flag on the node, and takes no arguments.
51f8aab721SMarko Zec.El
52b462702fSRuslan Ermilov.Sh SHUTDOWN
53b462702fSRuslan ErmilovThis node shuts down upon receipt of a
54b462702fSRuslan Ermilov.Dv NGM_SHUTDOWN
55*25972509SEdward Tomasz Napieralacontrol message, or when all hooks have been disconnected.
56*25972509SEdward Tomasz NapieralaSetting the persistent flag via a
57f8aab721SMarko Zec.Dv NGM_HUB_SET_PERSISTENT
58f8aab721SMarko Zeccontrol message disables automatic node shutdown when the last hook gets
59f8aab721SMarko Zecdisconnected.
60b462702fSRuslan Ermilov.Sh SEE ALSO
61b462702fSRuslan Ermilov.Xr netgraph 4 ,
62b462702fSRuslan Ermilov.Xr ng_bridge 4 ,
63b462702fSRuslan Ermilov.Xr ng_ether 4 ,
64b462702fSRuslan Ermilov.Xr ng_one2many 4 ,
65b462702fSRuslan Ermilov.Xr ngctl 8 ,
66b462702fSRuslan Ermilov.Xr nghook 8
67b462702fSRuslan Ermilov.Sh HISTORY
68b462702fSRuslan ErmilovThe
69b462702fSRuslan Ermilov.Nm
70b462702fSRuslan Ermilovnode type appeared in
71b462702fSRuslan Ermilov.Fx 5.3 .
72b462702fSRuslan Ermilov.Sh AUTHORS
736c899950SBaptiste Daroussin.An Ruslan Ermilov Aq Mt ru@FreeBSD.org
74