xref: /freebsd/usr.sbin/ngctl/ngctl.8 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
14cf49a43SJulian Elischer.\" Copyright (c) 1996-1999 Whistle Communications, Inc.
24cf49a43SJulian Elischer.\" All rights reserved.
34cf49a43SJulian Elischer.\"
44cf49a43SJulian Elischer.\" Subject to the following obligations and disclaimer of warranty, use and
54cf49a43SJulian Elischer.\" redistribution of this software, in source or object code forms, with or
64cf49a43SJulian Elischer.\" without modifications are expressly permitted by Whistle Communications;
74cf49a43SJulian Elischer.\" provided, however, that:
84cf49a43SJulian Elischer.\" 1. Any and all reproductions of the source or object code must include the
94cf49a43SJulian Elischer.\"    copyright notice above and the following disclaimer of warranties; and
104cf49a43SJulian Elischer.\" 2. No rights are granted, in any manner or form, to use Whistle
114cf49a43SJulian Elischer.\"    Communications, Inc. trademarks, including the mark "WHISTLE
124cf49a43SJulian Elischer.\"    COMMUNICATIONS" on advertising, endorsements, or otherwise except as
134cf49a43SJulian Elischer.\"    such appears in the above copyright notice or in the software.
144cf49a43SJulian Elischer.\"
154cf49a43SJulian Elischer.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
164cf49a43SJulian Elischer.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
174cf49a43SJulian Elischer.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
184cf49a43SJulian Elischer.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
194cf49a43SJulian Elischer.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
204cf49a43SJulian Elischer.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
214cf49a43SJulian Elischer.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
224cf49a43SJulian Elischer.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
234cf49a43SJulian Elischer.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
244cf49a43SJulian Elischer.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
254cf49a43SJulian Elischer.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
264cf49a43SJulian Elischer.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
274cf49a43SJulian Elischer.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
284cf49a43SJulian Elischer.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
294cf49a43SJulian Elischer.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
304cf49a43SJulian Elischer.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
314cf49a43SJulian Elischer.\" OF SUCH DAMAGE.
324cf49a43SJulian Elischer.\" $Whistle: ngctl.8,v 1.6 1999/01/20 03:19:44 archie Exp $
334cf49a43SJulian Elischer.\"
344cf49a43SJulian Elischer.Dd January 19, 1999
354cf49a43SJulian Elischer.Dt NGCTL 8
36a4c37c81SRuslan Ermilov.Os
374cf49a43SJulian Elischer.Sh NAME
384cf49a43SJulian Elischer.Nm ngctl
394cf49a43SJulian Elischer.Nd netgraph control utility
404cf49a43SJulian Elischer.Sh SYNOPSIS
4151291597SJulian Elischer.Nm
424cf49a43SJulian Elischer.Op Fl d
434cf49a43SJulian Elischer.Op Fl f Ar filename
444cf49a43SJulian Elischer.Op Fl n Ar nodename
454cf49a43SJulian Elischer.Op Ar command ...
464cf49a43SJulian Elischer.Sh DESCRIPTION
474cf49a43SJulian ElischerThe
484cf49a43SJulian Elischer.Nm
494cf49a43SJulian Elischerutility creates a new netgraph node of type
504cf49a43SJulian Elischer.Em socket
514cf49a43SJulian Elischerwhich can be used to issue netgraph commands.
524cf49a43SJulian ElischerIf no
534cf49a43SJulian Elischer.Fl f
544cf49a43SJulian Elischerflag is given, no
554cf49a43SJulian Elischercommand is supplied on the command line, and standard input is a tty,
5651291597SJulian Elischer.Nm
57f2e366a1SSheldon Hearnwill enter interactive mode.
58f2e366a1SSheldon HearnOtherwise
5951291597SJulian Elischer.Nm
604cf49a43SJulian Elischerwill execute the supplied command(s) and exit immediately.
614cf49a43SJulian Elischer.Pp
62f8307e12SArchie CobbsNodes can be created, removed, joined together, etc.
6351291597SJulian Elischer.Tn ASCII
6451291597SJulian Elischerformatted control messages can be sent to any node if that node
65f8307e12SArchie Cobbssupports binary/ASCII control message conversion.
66f8307e12SArchie Cobbs.Pp
67f8307e12SArchie CobbsIn interactive mode,
68f8307e12SArchie Cobbs.Nm
69f8307e12SArchie Cobbswill display any control messages and data packets received by the socket node.
7051291597SJulian ElischerIn the case of control messages, the message arguments are displayed in
7151291597SJulian Elischer.Tn ASCII
72f8307e12SArchie Cobbsform if the originating node supports conversion.
730d6985e2SArchie Cobbs.Pp
744cf49a43SJulian ElischerThe options are as follows:
754cf49a43SJulian Elischer.Bl -tag -width indent
764cf49a43SJulian Elischer.It Fl f Ar nodeinfo
774cf49a43SJulian ElischerRead commands from the named file.
784cf49a43SJulian ElischerA single dash represents the standard input.
7951291597SJulian ElischerBlank lines and lines starting with a
8051291597SJulian Elischer.Dq #
8151291597SJulian Elischerare ignored.
824cf49a43SJulian Elischer.It Fl n Ar nodename
834cf49a43SJulian ElischerAssign
844cf49a43SJulian Elischer.Em nodename
85f2e366a1SSheldon Hearnto the newly created netgraph node.
86f2e366a1SSheldon HearnThe default name is
874cf49a43SJulian Elischer.Em ngctlXXX
884cf49a43SJulian Elischerwhere XXX is the process ID number.
894cf49a43SJulian Elischer.It Fl d
904cf49a43SJulian ElischerIncrease the debugging verbosity level.
914cf49a43SJulian Elischer.El
924cf49a43SJulian Elischer.Sh COMMANDS
934cf49a43SJulian ElischerThe currently supported commands in
9451291597SJulian Elischer.Nm
954cf49a43SJulian Elischerare:
964cf49a43SJulian Elischer.Pp
974cf49a43SJulian Elischer.Bd -literal -offset indent -compact
98bbd6d60aSBrian Feldmanconfig     get or set configuration of node at <path>
99bbd6d60aSBrian Feldmanconnect    Connects hook <peerhook> of the node at <relpath> to <hook>
1004cf49a43SJulian Elischerdebug      Get/set debugging verbosity level
101bbd6d60aSBrian Feldmandot        Produce a GraphViz (.dot) of the entire netgraph.
102bbd6d60aSBrian Feldmanhelp       Show command summary or get more help on a specific command
1034cf49a43SJulian Elischerlist       Show information about all nodes
104bbd6d60aSBrian Feldmanmkpeer     Create and connect a new node to the node at "path"
105bbd6d60aSBrian Feldmanmsg        Send a netgraph control message to the node at "path"
106bbd6d60aSBrian Feldmanname       Assign name <name> to the node at <path>
1074cf49a43SJulian Elischerread       Read and execute commands from a file
108bbd6d60aSBrian Feldmanrmhook     Disconnect hook "hook" of the node at "path"
109bbd6d60aSBrian Feldmanshow       Show information about the node at <path>
110bbd6d60aSBrian Feldmanshutdown   Shutdown the node at <path>
111bbd6d60aSBrian Feldmanstatus     Get human readable status information from the node at <path>
112bbd6d60aSBrian Feldmantypes      Show information about all installed node types
113be44fce4SArchie Cobbswrite      Send a data packet down the hook named by "hook".
1144cf49a43SJulian Elischerquit       Exit program
1154cf49a43SJulian Elischer.Ed
1164cf49a43SJulian Elischer.Pp
11751291597SJulian ElischerSome commands have aliases, e.g.,
11851291597SJulian Elischer.Dq ls
11951291597SJulian Elischeris the same as
12051291597SJulian Elischer.Dq list .
12151291597SJulian ElischerThe
12251291597SJulian Elischer.Dq help
12351291597SJulian Elischercommand displays the available
124f8307e12SArchie Cobbscommands, their usage and aliases, and a brief description.
125a866e170SRuslan Ermilov.Sh EXIT STATUS
126d628d776SRuslan Ermilov.Ex -std
1274cf49a43SJulian Elischer.Sh SEE ALSO
1284cf49a43SJulian Elischer.Xr netgraph 3 ,
12951291597SJulian Elischer.Xr netgraph 4 ,
13076a06f84SBen Smithurst.Xr nghook 8
1314cf49a43SJulian Elischer.Sh HISTORY
1324cf49a43SJulian ElischerThe
13351291597SJulian Elischer.Nm netgraph
13407bfccd7SRuslan Ermilovsystem was designed and first implemented at Whistle Communications, Inc.\& in
1353dc331b9SBill Fennera version of
13651291597SJulian Elischer.Fx 2.2
13751291597SJulian Elischercustomized for the Whistle InterJet.
13851291597SJulian Elischer.Sh AUTHORS
139*01c2b8acSBaptiste Daroussin.An Archie Cobbs Aq Mt archie@whistle.com
140