Mercurial > hg > toybox
comparison toys/netcat.c @ 237:7cb15eae1664
Zap toylist.h, moving contents of global structures into DEFINE_GLOBALS()
macros in each C file, and making generated/globals.h from that. Rename
"toy" to "this" along the way to avoid toy/toys confusion.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sun, 20 Jan 2008 17:25:44 -0600 |
parents | 163498bf547b |
children | dfbfbaeb69c9 |
comparison
equal
deleted
inserted
replaced
236:6b292ee780ab | 237:7cb15eae1664 |
---|---|
31 */ | 31 */ |
32 | 32 |
33 #include "toys.h" | 33 #include "toys.h" |
34 #include "toynet.h" | 34 #include "toynet.h" |
35 | 35 |
36 #define TT toy.netcat | 36 DEFINE_GLOBALS( |
37 char *filename; // -f read from filename instead of network | |
38 long quit_delay; // -q Exit after EOF from stdin after # seconds. | |
39 char *source_address; // -s Bind to a specific source address. | |
40 long port; // -p Bind to a specific source port. | |
41 long listen; // -l Listen for connection instead of dialing out. | |
42 long wait; // -w Wait # seconds for a connection. | |
43 long delay; // -i delay between lines sent | |
44 ) | |
45 | |
46 #define TT this.netcat | |
37 | 47 |
38 static void timeout(int signum) | 48 static void timeout(int signum) |
39 { | 49 { |
40 error_exit("Timeout"); | 50 error_exit("Timeout"); |
41 } | 51 } |