xref: /freebsd/usr.sbin/ngctl/ngctl.8 (revision a14a0223ae1b172e96dd2a1d849e22026a98b692)
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 FreeBSD 3
39.Sh NAME
40.Nm ngctl
41.Nd netgraph control utility
42.Sh SYNOPSIS
43.Nm ngctl
44.Op Fl d
45.Op Fl f Ar filename
46.Op Fl n Ar nodename
47.Op Ar command ...
48.Sh DESCRIPTION
49The
50.Nm
51utility creates a new netgraph node of type
52.Em socket
53which can be used to issue netgraph commands.
54If no
55.Fl f
56flag is given, no
57command is supplied on the command line, and standard input is a tty,
58.Nm ngctl
59will enter interactive mode. Otherwise
60.Nm ngctl
61will execute the supplied command(s) and exit immediately.
62.Pp
63If the
64.Dv ng_socket.ko
65module is not installed in the kernel,
66.Nm ngctl
67will attempt to install it.
68.Pp
69The options are as follows:
70.Bl -tag -width indent
71.It Fl f Ar nodeinfo
72Read commands from the named file.
73A single dash represents the standard input.
74Blank lines and lines starting with a ``#'' are ignored.
75.It Fl n Ar nodename
76Assign
77.Em nodename
78to the newly created netgraph node. The default name is
79.Em ngctlXXX
80where XXX is the process ID number.
81.It Fl d
82Increase the debugging verbosity level.
83.El
84.Sh COMMANDS
85The currently supported commands in
86.Nm ngctl
87are:
88.Pp
89.Bd -literal -offset indent -compact
90connect    Connects two nodes
91debug      Get/set debugging verbosity level
92help       Show command summary or get help on a command
93list       Show information about all nodes
94mkpeer     Create and connect a new node to an existing node
95name       Assign a name to a node
96read       Read and execute commands from a file
97rmhook     Disconnect a node's hook
98show       Show information about a node
99shutdown   Shutdown a node
100status     Get human readable status from a node
101types      Show all installed node types
102quit       Exit program
103.Ed
104.Pp
105The ``help'' command displays the available
106commands, their usage, and a brief description.
107.Sh EXIT VALUE
108The
109.Nm
110utility exits 0 on success, and >0 if an error occurs.
111.Sh SEE ALSO
112.Xr netgraph 3 ,
113.Xr netgraph 4 .
114.Xr nghook 8 .
115.Sh AUTHOR
116Archie Cobbs <archie@whistle.com>
117.Sh HISTORY
118The
119.Em netgraph
120system was designed and first implemented at Whistle Communications, Inc.
121in a version FreeBSD 2.2 customized for the Whistle InterJet.
122