]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - usr.sbin/ngctl/ngctl.8
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / usr.sbin / ngctl / ngctl.8
1 .\" Copyright (c) 1996-1999 Whistle Communications, Inc.
2 .\" All rights reserved.
3 .\"
4 .\" Subject to the following obligations and disclaimer of warranty, use and
5 .\" redistribution of this software, in source or object code forms, with or
6 .\" without modifications are expressly permitted by Whistle Communications;
7 .\" provided, however, that:
8 .\" 1. Any and all reproductions of the source or object code must include the
9 .\"    copyright notice above and the following disclaimer of warranties; and
10 .\" 2. No rights are granted, in any manner or form, to use Whistle
11 .\"    Communications, Inc. trademarks, including the mark "WHISTLE
12 .\"    COMMUNICATIONS" on advertising, endorsements, or otherwise except as
13 .\"    such appears in the above copyright notice or in the software.
14 .\"
15 .\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
16 .\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
17 .\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
18 .\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
19 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
20 .\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
21 .\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
22 .\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
23 .\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
24 .\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
25 .\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
26 .\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
27 .\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
28 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30 .\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
31 .\" OF SUCH DAMAGE.
32 .\"
33 .\" $FreeBSD$
34 .\" $Whistle: ngctl.8,v 1.6 1999/01/20 03:19:44 archie Exp $
35 .\"
36 .Dd January 19, 1999
37 .Dt NGCTL 8
38 .Os
39 .Sh NAME
40 .Nm ngctl
41 .Nd netgraph control utility
42 .Sh SYNOPSIS
43 .Nm
44 .Op Fl d
45 .Op Fl f Ar filename
46 .Op Fl n Ar nodename
47 .Op Ar command ...
48 .Sh DESCRIPTION
49 The
50 .Nm
51 utility creates a new netgraph node of type
52 .Em socket
53 which can be used to issue netgraph commands.
54 If no
55 .Fl f
56 flag is given, no
57 command is supplied on the command line, and standard input is a tty,
58 .Nm
59 will enter interactive mode.
60 Otherwise
61 .Nm
62 will execute the supplied command(s) and exit immediately.
63 .Pp
64 Nodes can be created, removed, joined together, etc.
65 .Tn ASCII
66 formatted control messages can be sent to any node if that node
67 supports binary/ASCII control message conversion.
68 .Pp
69 In interactive mode,
70 .Nm
71 will display any control messages and data packets received by the socket node.
72 In the case of control messages, the message arguments are displayed in
73 .Tn ASCII
74 form if the originating node supports conversion.
75 .Pp
76 The options are as follows:
77 .Bl -tag -width indent
78 .It Fl f Ar nodeinfo
79 Read commands from the named file.
80 A single dash represents the standard input.
81 Blank lines and lines starting with a
82 .Dq #
83 are ignored.
84 .It Fl n Ar nodename
85 Assign
86 .Em nodename
87 to the newly created netgraph node.
88 The default name is
89 .Em ngctlXXX
90 where XXX is the process ID number.
91 .It Fl d
92 Increase the debugging verbosity level.
93 .El
94 .Sh COMMANDS
95 The currently supported commands in
96 .Nm
97 are:
98 .Pp
99 .Bd -literal -offset indent -compact
100 config     get or set configuration of node at <path>
101 connect    Connects hook <peerhook> of the node at <relpath> to <hook>
102 debug      Get/set debugging verbosity level
103 dot        Produce a GraphViz (.dot) of the entire netgraph.
104 help       Show command summary or get more help on a specific command
105 list       Show information about all nodes
106 mkpeer     Create and connect a new node to the node at "path"
107 msg        Send a netgraph control message to the node at "path"
108 name       Assign name <name> to the node at <path>
109 read       Read and execute commands from a file
110 rmhook     Disconnect hook "hook" of the node at "path"
111 show       Show information about the node at <path>
112 shutdown   Shutdown the node at <path>
113 status     Get human readable status information from the node at <path>
114 types      Show information about all installed node types
115 write      Send a data packet down the hook named by "hook".
116 quit       Exit program
117 .Ed
118 .Pp
119 Some commands have aliases, e.g.,
120 .Dq ls
121 is the same as
122 .Dq list .
123 The
124 .Dq help
125 command displays the available
126 commands, their usage and aliases, and a brief description.
127 .Sh EXIT STATUS
128 .Ex -std
129 .Sh SEE ALSO
130 .Xr netgraph 3 ,
131 .Xr netgraph 4 ,
132 .Xr nghook 8
133 .Sh HISTORY
134 The
135 .Nm netgraph
136 system was designed and first implemented at Whistle Communications, Inc.\& in
137 a version of
138 .Fx 2.2
139 customized for the Whistle InterJet.
140 .Sh AUTHORS
141 .An Archie Cobbs Aq archie@whistle.com