Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
NGCTL(8)		    System Manager's Manual		      NGCTL(8)

NAME
       ngctl --	netgraph control utility

SYNOPSIS
       ngctl	 [-j	 jail]	  [-d]	  [-f	 filename]    [-n    nodename]
	     [command [argument	...]] [command ...]

DESCRIPTION
       The ngctl utility creates a new netgraph	node of	type socket which  can
       be used to issue	netgraph commands.  If no -f flag is given, no command
       is  supplied  on	 the  command line, and	standard input is a tty, ngctl
       will enter interactive mode.  Otherwise ngctl will execute the supplied
       command(s) and exit immediately.

       Nodes can be created, removed, joined together, etc.   ASCII  formatted
       control	messages  can  be  sent	 to any	node if	that node supports bi-
       nary/ASCII control message conversion.

       In interactive mode, ngctl will display any control messages  and  data
       packets	received by the	socket node.  In the case of control messages,
       the message arguments are displayed in ASCII form  if  the  originating
       node supports conversion.

       The options are as follows:

       -f filename
	       Read  commands  from  the named file.  A	single dash represents
	       the standard input.  Blank lines	and lines starting with	a  "#"
	       are  ignored.   Note that when the -j jail option is specified,
	       the file	will be	opened before attaching	to the jail  and  then
	       be processed inside the jail.

       -j jail
	       Perform the actions inside the jail.

	       ngctl  will  first attach to the	jail (by jail id or jail name)
	       before performing the effects.

	       This allows netgraph nodes of jail to be	created, modified, and
	       destroyed even if the ngctl binary is not available in jail.

       -n nodename
	       Assign nodename to the newly created netgraph  node.   The  de-
	       fault name is ngctlXXX where XXX	is the process ID number.

       -d      Increase	the debugging verbosity	level.

COMMANDS
       The currently supported commands	in ngctl are:

	     config	get or set configuration of node at <path>
	     connect	Connects hook <peerhook> of the	node at	<relpath> to <hook>
	     debug	Get/set	debugging verbosity level
	     dot	Produce	a GraphViz (.dot) of the entire	netgraph.
	     help	Show command summary or	get more help on a specific command
	     list	Show information about all nodes
	     mkpeer	Create and connect a new node to the node at "path"
	     msg	Send a netgraph	control	message	to the node at "path"
	     name	Assign name <name> to the node at <path>
	     read	Read and execute commands from a file
	     rmhook	Disconnect hook	"hook" of the node at "path"
	     show	Show information about the node	at <path>
	     shutdown	Shutdown the node at <path>
	     status	Get human readable status information from the node at <path>
	     types	Show information about all installed node types
	     write	Send a data packet down	the hook named by "hook".
	     quit	Exit program

       Some  commands  have  aliases,  e.g.,  "ls" is the same as "list".  The
       "help"  command	displays  the  available  commands,  their  usage  and
       aliases,	and a brief description.

EXIT STATUS
       The ngctl utility exits 0 on success, and >0 if an error	occurs.

SEE ALSO
       netgraph(3), netgraph(4), nghook(8)

HISTORY
       The  netgraph system was	designed and first implemented at Whistle Com-
       munications, Inc. in a version of FreeBSD 2.2 customized	for the	 Whis-
       tle InterJet.

AUTHORS
       Archie Cobbs <archie@whistle.com>

FreeBSD	15.0			August 29, 2025			      NGCTL(8)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=ngctl&sektion=8&manpath=FreeBSD+15.0-RELEASE+and+Ports>

home | help