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 August 29, 2025 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 j Ar jail 43.Op Fl d 44.Op Fl f Ar filename 45.Op Fl n Ar nodename 46.Op Ar command Op Ns Ar argument ... 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 59will enter interactive mode. 60Otherwise 61.Nm 62will execute the supplied command(s) and exit immediately. 63.Pp 64Nodes can be created, removed, joined together, etc. 65.Tn ASCII 66formatted control messages can be sent to any node if that node 67supports binary/ASCII control message conversion. 68.Pp 69In interactive mode, 70.Nm 71will display any control messages and data packets received by the socket node. 72In the case of control messages, the message arguments are displayed in 73.Tn ASCII 74form if the originating node supports conversion. 75.Pp 76The options are as follows: 77.Bl -tag -width indent 78.It Fl f Ar filename 79Read commands from the named file. 80A single dash represents the standard input. 81Blank lines and lines starting with a 82.Dq # 83are ignored. 84Note that when the 85.Fl j Ar jail 86option is specified, the file will be opened before attaching to the jail and 87then be processed inside the jail. 88.It Fl j Ar jail 89Perform the actions inside the 90.Ar jail . 91.Pp 92.Nm 93will first attach to the 94.Ar jail 95(by jail id or jail name) before performing the effects. 96.Pp 97This allows netgraph nodes of 98.Ar jail 99to be created, modified, and destroyed even if the 100.Nm 101binary is not available in 102.Ar jail . 103.It Fl n Ar nodename 104Assign 105.Em nodename 106to the newly created netgraph node. 107The default name is 108.Em ngctlXXX 109where XXX is the process ID number. 110.It Fl d 111Increase the debugging verbosity level. 112.El 113.Sh COMMANDS 114The currently supported commands in 115.Nm 116are: 117.Pp 118.Bd -literal -offset indent -compact 119config get or set configuration of node at <path> 120connect Connects hook <peerhook> of the node at <relpath> to <hook> 121debug Get/set debugging verbosity level 122dot Produce a GraphViz (.dot) of the entire netgraph. 123help Show command summary or get more help on a specific command 124list Show information about all nodes 125mkpeer Create and connect a new node to the node at "path" 126msg Send a netgraph control message to the node at "path" 127name Assign name <name> to the node at <path> 128read Read and execute commands from a file 129rmhook Disconnect hook "hook" of the node at "path" 130show Show information about the node at <path> 131shutdown Shutdown the node at <path> 132status Get human readable status information from the node at <path> 133types Show information about all installed node types 134write Send a data packet down the hook named by "hook". 135quit Exit program 136.Ed 137.Pp 138Some commands have aliases, e.g., 139.Dq ls 140is the same as 141.Dq list . 142The 143.Dq help 144command displays the available 145commands, their usage and aliases, and a brief description. 146.Sh EXIT STATUS 147.Ex -std 148.Sh SEE ALSO 149.Xr netgraph 3 , 150.Xr netgraph 4 , 151.Xr nghook 8 152.Sh HISTORY 153The 154.Nm netgraph 155system was designed and first implemented at Whistle Communications, Inc.\& in 156a version of 157.Fx 2.2 158customized for the Whistle InterJet. 159.Sh AUTHORS 160.An Archie Cobbs Aq Mt archie@whistle.com 161