NGHOOK(8)
β¨ NAME β¨
okay so bestie, this is nghook(8) from the System Managerβs Manual β and itβs literally the little connector between your terminal and a netgraph(4) node. The whole mood: 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 omitted, "debug" is assumed. no cap π
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 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. In this case, the nghook utility exits when EOF is detected on standard input. π
The options are as follows, bestie:
π OPTIONS π
-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-emode), 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. Thenghookutility will continue reading from the node until stopped by a signal.-Sβ Use file descriptor0for output instead of the default1.-sβ Use file descriptor1for input instead of the default0.
π SEE ALSO π
π§ 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. iconic origin story, honestly π
π AUTHORS π
Archie Cobbs <archie@whistle.com> π
π BUGS π
Although all input is read in unbuffered mode, there is no way to control the packetization of the input. likeβ¦ none. zero. the packetization is gonna do what itβs gonna do π
If the node sends a response to a message specified by -m, this response is lost. yep, lost-lost. gone. π
okay thatβs the whole NGHOOK(8) moment, bestie β source/version: Debian, dated October 24, 2003. bye and slay πβ¨
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 1996-1999 Whistle Communications, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms