Visit Our UNIX and Linux User Community

Linux and UNIX Man Pages

Test Your Knowledge in Computers #169
Difficulty: Easy
Red Hat, Inc. is an Canadian multinational software company.
True or False?
Linux & Unix Commands - Search Man Pages

ngctl(8) [freebsd man page]

NGCTL(8)						    BSD System Manager's Manual 						  NGCTL(8)

ngctl -- netgraph control utility SYNOPSIS
ngctl [-d] [-f filename] [-n nodename] [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 com- mand is supplied on the command line, and standard input is a tty, ngctl will enter interactive mode. Otherwise ngctl will execute the sup- plied 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 binary/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 nodeinfo Read commands from the named file. A single dash represents the standard input. Blank lines and lines starting with a ``#'' are ignored. -n nodename Assign nodename to the newly created netgraph node. The default 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 Communications, Inc. in a version of FreeBSD 2.2 customized for the Whistle InterJet. AUTHORS
Archie Cobbs <> BSD
January 19, 1999 BSD

Check Out this Related Man Page

NGHOOK(8)						    BSD System Manager's Manual 						 NGHOOK(8)

nghook -- connect to a netgraph(4) node SYNOPSIS
nghook [-adlnSs] [-m msg] path [hookname] nghook -e [-n] [-m msg] path hookname program [args ...] DESCRIPTION
The nghook utility creates a ng_socket(4) socket type node and connects it to hook hookname of the node found at path. If hookname is omit- ted, ``debug'' is assumed. If the -e option is given, the third argument is interpreted as the path to a program, and this program is executed with the remaining argu- ments as its arguments. Before executing, the program Netgraph messages (specified by the -m option) are sent to the node. The program is executed with its standard input (unless closed by -n) and output connected to the hook. If the -e option is not given, all data written to standard input is sent to the node, and all data received from the node is relayed to standard output. Messages specified with -m are sent to the node before the loop is entered. The nghook utility exits when EOF is detected on standard input in this case. The options are as follows: -a Output each packet read in human-readable decoded ASCII form instead of raw binary. -d Increase the debugging verbosity level. -e Execute the program specified by the third argument. -l Loops all received data back to the hook in addition to writing it to standard output. -m msg Before executing the program (in -e mode) send the given ASCII control message to the node. This option may be given more than once. -n Do not attempt to read any data from standard input. The nghook utility will continue reading from the node until stopped by a sig- nal. -S Use file descriptor 0 for output instead of the default 1. -s Use file descriptor 1 for input instead of the default 0. SEE ALSO
netgraph(3), netgraph(4), ngctl(8) HISTORY
The netgraph system was designed and first implemented at Whistle Communications, Inc. in a version of FreeBSD 2.2 customized for the Whistle InterJet. AUTHORS
Archie Cobbs <> BUGS
Although all input is read in unbuffered mode, there is no way to control the packetization of the input. If the node sends a response to a message (specified by -m), this response is lost. BSD
October 24, 2003 BSD

Featured Tech Videos