*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->FreeBSD man pages -> nghook (8)              



NAME    [Toc]    [Back]

     nghook -- connect to a netgraph(4) node

SYNOPSIS    [Toc]    [Back]

     nghook [-Sadlns] [-m msg] path [hookname]

     nghook -e [-n] [-m msg] path hookname program [args...]

DESCRIPTION    [Toc]    [Back]

     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 omitted,
     ``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 arguments 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 send 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:

     -S      Use file descriptor 0 for output instead of the default 1.

     -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

     -n      Don't attempt to read any data from standard input.  The nghook
	     utility will continue reading from the node until stopped by a

     -s      Use file descriptor 1 for input instead of the default 0.

BUGS    [Toc]    [Back]

     Although all input is read in unbuffered mode, there's no way to control
     the packetization of the input.

     If the node sends a reponse to a message (specified by -m), this response
     is lost.

SEE ALSO    [Toc]    [Back]

     netgraph(3), netgraph(4), ngctl(8)

HISTORY    [Toc]    [Back]

     The netgraph system was designed and first implemented at Whistle Communications,
 Inc. in a version of FreeBSD 2.2 customized for the Whistle

AUTHORS    [Toc]    [Back]

     Archie Cobbs <archie@whistle.com>

FreeBSD 5.2.1		       January 19, 1999 		 FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
ng_uni FreeBSD netgraph UNI node type
ng_UI FreeBSD UI netgraph node type
ng_atm FreeBSD netgraph ATM node type
ng_iface FreeBSD interface netgraph node type
ng_echo FreeBSD netgraph echo node type
ng_ip_input FreeBSD netgraph IP input node type
ng_device FreeBSD device netgraph node type
ng_hole FreeBSD netgraph discard node type
ng_ether FreeBSD Ethernet netgraph node type
ng_tee FreeBSD netgraph ``tee'' node type
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service