xref: /freebsd/usr.sbin/ngctl/ngctl.8 (revision a03411e84728e9b267056fd31c7d1d9d1dc1b01e)
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.\" $Whistle: ngctl.8,v 1.6 1999/01/20 03:19:44 archie Exp $
33.\"
34.Dd January 19, 1999
35.Dt NGCTL 8
36.Os
37.Sh NAME
38.Nm ngctl
39.Nd netgraph control utility
40.Sh SYNOPSIS
41.Nm
42.Op Fl d
43.Op Fl f Ar filename
44.Op Fl n Ar nodename
45.Op Ar command ...
46.Sh DESCRIPTION
47The
48.Nm
49utility creates a new netgraph node of type
50.Em socket
51which can be used to issue netgraph commands.
52If no
53.Fl f
54flag is given, no
55command is supplied on the command line, and standard input is a tty,
56.Nm
57will enter interactive mode.
58Otherwise
59.Nm
60will execute the supplied command(s) and exit immediately.
61.Pp
62Nodes can be created, removed, joined together, etc.
63.Tn ASCII
64formatted control messages can be sent to any node if that node
65supports binary/ASCII control message conversion.
66.Pp
67In interactive mode,
68.Nm
69will display any control messages and data packets received by the socket node.
70In the case of control messages, the message arguments are displayed in
71.Tn ASCII
72form if the originating node supports conversion.
73.Pp
74The options are as follows:
75.Bl -tag -width indent
76.It Fl f Ar nodeinfo
77Read commands from the named file.
78A single dash represents the standard input.
79Blank lines and lines starting with a
80.Dq #
81are ignored.
82.It Fl n Ar nodename
83Assign
84.Em nodename
85to the newly created netgraph node.
86The default name is
87.Em ngctlXXX
88where XXX is the process ID number.
89.It Fl d
90Increase the debugging verbosity level.
91.El
92.Sh COMMANDS
93The currently supported commands in
94.Nm
95are:
96.Pp
97.Bd -literal -offset indent -compact
98config     get or set configuration of node at <path>
99connect    Connects hook <peerhook> of the node at <relpath> to <hook>
100debug      Get/set debugging verbosity level
101dot        Produce a GraphViz (.dot) of the entire netgraph.
102help       Show command summary or get more help on a specific command
103list       Show information about all nodes
104mkpeer     Create and connect a new node to the node at "path"
105msg        Send a netgraph control message to the node at "path"
106name       Assign name <name> to the node at <path>
107read       Read and execute commands from a file
108rmhook     Disconnect hook "hook" of the node at "path"
109show       Show information about the node at <path>
110shutdown   Shutdown the node at <path>
111status     Get human readable status information from the node at <path>
112types      Show information about all installed node types
113write      Send a data packet down the hook named by "hook".
114quit       Exit program
115.Ed
116.Pp
117Some commands have aliases, e.g.,
118.Dq ls
119is the same as
120.Dq list .
121The
122.Dq help
123command displays the available
124commands, their usage and aliases, and a brief description.
125.Sh EXIT STATUS
126.Ex -std
127.Sh SEE ALSO
128.Xr netgraph 3 ,
129.Xr netgraph 4 ,
130.Xr nghook 8
131.Sh HISTORY
132The
133.Nm netgraph
134system was designed and first implemented at Whistle Communications, Inc.\& in
135a version of
136.Fx 2.2
137customized for the Whistle InterJet.
138.Sh AUTHORS
139.An Archie Cobbs Aq Mt archie@whistle.com
140