1 .\" Copyright (c) 2002 Mark Santcroos <marks@ripe.net>
3 .\" Redistribution and use in source and binary forms, with or without
4 .\" modification, are permitted provided that the following conditions
6 .\" 1. Redistributions of source code must retain the above copyright
7 .\" notice, this list of conditions and the following disclaimer.
8 .\" 2. Redistributions in binary form must reproduce the above copyright
9 .\" notice, this list of conditions and the following disclaimer in the
10 .\" documentation and/or other materials provided with the distribution.
11 .\" 3. The name of the author may not be used to endorse or promote products
12 .\" derived from this software without specific prior written permission.
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
15 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 .Nd device netgraph node type
34 .In netgraph/ng_device.h
38 node is both a netgraph node and a system device interface.
41 node is created, a new device entry appears which is accessible via the
42 regular file operators such as
49 The first node is created as
52 .Pa /dev/ngd1 , /dev/ngd2 ,
56 node can be created is by a connection to the main
58 node by another type of
62 When a node is shut down, the corresponding device is removed
63 and the device name becomes available for reuse by future
69 node has a single hook to which it connects to the requesting
72 All data coming in over the hook will be presented to the device
75 All data coming in from the device entry by
77 will be forwarded to the hook.
81 node has no named hooks.
82 There is one hook which is used for all interactions.
83 This is the hook created by the calling node.
87 node supports no special control messages.
88 All incoming messages from the
89 hook will be returned to the sender.
90 Additionally the node accepts
92 from the device entry.
93 These will be encapsulated into
95 messages and send out to the hook.
97 This node shuts down upon receipt of a
100 The associated interface is removed and becomes available
105 Unlike most other node types, a
109 go away when all hooks have been disconnected; rather, an explicit
111 control message is required.
118 node type was first implemented in
121 .An Mark Santcroos Aq marks@ripe.net