Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ngctl(8) [freebsd man page]

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

NAME
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 <archie@whistle.com> BSD
January 19, 1999 BSD

Check Out this Related Man Page

NG_VLAN(4)						   BSD Kernel Interfaces Manual 						NG_VLAN(4)

NAME
ng_vlan -- IEEE 802.1Q VLAN tagging netgraph node type SYNOPSIS
#include <sys/types.h> #include <netgraph.h> #include <netgraph/ng_vlan.h> DESCRIPTION
The vlan node type multiplexes frames tagged according to the IEEE 802.1Q standard between different hooks. Each node has two special hooks, downstream and nomatch, and an arbitrary number of ``vlan'' hooks, each associated with a particular VLAN tag. An ETHERTYPE_VLAN frame received on the downstream hook with a tag that the node has been configured to filter is sent out the corresponding ``vlan'' hook. If it does not match any of the configured tags, or is not of a type ETHERTYPE_VLAN, it is sent out the nomatch hook. If the nomatch hook is not connected, the packet is dropped. An Ethernet frame received on the nomatch hook is passed unmodified to the downstream hook. An Ethernet frame received on any of the ``vlan'' hooks is tagged accordingly and sent out the downstream hook. HOOKS
This node type supports the following hooks: downstream Typically this hook would be connected to a ng_ether(4) node, using the lower hook. nomatch Typically this hook would also be connected to an ng_ether(4) type node using the upper hook. <any valid name> Any other hook name will be accepted and should later be associated with a particular tag. Typically this hook would be attached to an ng_eiface(4) type node using the ether hook. CONTROL MESSAGES
This node type supports the generic control messages, plus the following: NGM_VLAN_ADD_FILTER (addfilter) Associates a hook with the tag. NGM_VLAN_DEL_FILTER (delfilter) Disassociates a hook from the tag. NGM_VLAN_GET_TABLE (gettable) Returns a table of all hook/tag associations. EXAMPLES
#!/bin/sh ETHER_IF=rl0 ngctl -f- <<EOF shutdown ${ETHER_IF}: mkpeer ${ETHER_IF}: vlan lower downstream name ${ETHER_IF}:lower vlan connect ${ETHER_IF}: vlan: upper nomatch EOF ngctl mkpeer vlan: eiface vlan123 ether ngctl msg vlan: addfilter '{ vlan=123 hook="vlan123" }' SHUTDOWN
This node shuts down upon receipt of a NGM_SHUTDOWN control message, or when all hooks have been disconnected. SEE ALSO
netgraph(4), ng_eiface(4), ng_ether(4), ngctl(8), nghook(8) HISTORY
The ng_vlan node type appeared in FreeBSD 4.10. AUTHORS
Ruslan Ermilov <ru@FreeBSD.org> BSD
March 1, 2004 BSD
Man Page

Featured Tech Videos