Commit Graph

11 Commits

Author SHA1 Message Date
harti
fb6ea7ec4f Allow nghook to execute a program with the data socket connected to
stdin and stdout instead of relaying the data. Now it is possible
to say:

	nghook -e path: hook /usr/local/bin/foo arg1 arg2

and foo will have the hook to path: at file descriptors 0 and 1.

Add an option to specify control messages to be send to the node before
either executing the program or entering the data relay loop.
2003-10-24 10:01:36 +00:00
charnier
66ad561fff add FBSDID, compare getopt() against -1, use fprintf() + exit() in usage()
instead of errx() to get the message starting with "usage:".
2003-08-17 09:06:08 +00:00
harti
d199702b34 Make this WARNS=6 clean by just constifying two local char pointers. 2003-08-13 07:51:06 +00:00
harti
f95c0bf70a Implement two command line options that allow one to change the
file descriptors that are used for input and output. That allows
one, for example, to use nghook to bi-directionally pipe the
input and output into/from another non-netgraph-aware program.
2003-08-13 07:42:07 +00:00
sheldonh
9bfb9eedcd Use STD{ERR,IN,OUT}_FILENO instead of their numeric values. The
definitions are more readable, and it's possible that they're
more portable to pathalogical platforms.

Submitted by:   David Hill <david@phobia.ms>
2001-07-26 11:02:39 +00:00
archie
ca906221f0 Add '-n' flag: don't attempt to read any data from standard input. 2000-07-27 21:55:48 +00:00
phk
bbe00ac533 Add the '-l' flag to nghook which loops the received data back. 2000-07-18 16:52:27 +00:00
archie
bc318e01df Remove extra spaces in hex dump output. 1999-11-30 02:09:36 +00:00
dillon
8c8443ab96 Put include <netgraph.h> back in - problem was due to a cvsup mess on
freefall.  There may also be a real problem w/ buildworld but the fix
    would go somewhere else, not here.
1999-10-24 02:58:39 +00:00
dillon
405fc1165a Cleanup missing includes, stale includes, and a few printf format
inconsistancies.
1999-10-23 17:45:11 +00:00
julian
c5c63975d5 Whistle's Netgraph link-layer (sometimes more) networking infrastructure.
Been in production for 3 years now. Gives Instant Frame relay to if_sr
and if_ar drivers, and PPPOE support soon. See:
ftp://ftp.whistle.com/pub/archie/netgraph/index.html
for on-line manual pages.

Reviewed by: Doug Rabson (dfr@freebsd.org)
Obtained from:  Whistle CVS tree
1999-10-21 09:06:11 +00:00