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