aboutsummaryrefslogtreecommitdiff
path: root/networking/nc_bloaty.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-06-27 04:22:02 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-06-27 04:22:02 +0200
commit77cc2c5738d780b97b56af49510ed64d61ad2e2d (patch)
treecbb8bd5787da4cfb0fca2710e35bd649d77b1371 /networking/nc_bloaty.c
parenta73b87e9343df2a6f14e328a977e7b70eb3ed707 (diff)
downloadbusybox-77cc2c5738d780b97b56af49510ed64d61ad2e2d.tar.gz
nc: introduce CONFIG_NC_110_COMPAT option.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/nc_bloaty.c')
-rw-r--r--networking/nc_bloaty.c40
1 files changed, 38 insertions, 2 deletions
diff --git a/networking/nc_bloaty.c b/networking/nc_bloaty.c
index 8d27e9682..c44133b5d 100644
--- a/networking/nc_bloaty.c
+++ b/networking/nc_bloaty.c
@@ -36,9 +36,9 @@
* - source routing
* - multiple DNS checks
* Functionalty which is different from nc 1.10:
- * - Prog in '-e prog' can have prog's parameters and options.
+ * - Prog in '-e PROG' can have prog's parameters and options.
* Because of this -e option must be last.
- * - nc doesn't redirect stderr to the network socket for the -e prog.
+ * - nc doesn't redirect stderr to the network socket for the -e PROG.
* - numeric addresses are printed in (), not [] (IPv6 looks better),
* port numbers are inside (): (1.2.3.4:5678)
* - network read errors are reported on verbose levels > 1
@@ -50,6 +50,42 @@
/* done in nc.c: #include "libbb.h" */
+//usage:#if ENABLE_NC_110_COMPAT
+//usage:
+//usage:#define nc_trivial_usage
+//usage: "[OPTIONS] HOST PORT - connect"
+//usage: IF_NC_SERVER("\n"
+//usage: "nc [OPTIONS] -l -p PORT [HOST] [PORT] - listen")
+//usage:#define nc_full_usage "\n\n"
+//usage: "Options:"
+//usage: "\n -e PROG Run PROG after connect (must be last)"
+//usage: IF_NC_SERVER(
+//usage: "\n -l Listen mode, for inbound connects"
+//usage: )
+//usage: "\n -p PORT Local port"
+//usage: "\n -s ADDR Local address"
+//usage: "\n -w SEC Timeout for connects and final net reads"
+//usage: IF_NC_EXTRA(
+//usage: "\n -i SEC Delay interval for lines sent" /* ", ports scanned" */
+//usage: )
+//usage: "\n -n Don't do DNS resolution"
+//usage: "\n -u UDP mode"
+//usage: "\n -v Verbose"
+//usage: IF_NC_EXTRA(
+//usage: "\n -o FILE Hex dump traffic"
+//usage: "\n -z Zero-I/O mode (scanning)"
+//usage: )
+//usage:#endif
+
+/* "\n -r Randomize local and remote ports" */
+/* "\n -g gateway Source-routing hop point[s], up to 8" */
+/* "\n -G num Source-routing pointer: 4, 8, 12, ..." */
+/* "\nport numbers can be individual or ranges: lo-hi [inclusive]" */
+
+/* -e PROG can take ARGS too: "nc ... -e ls -l", but we don't document it
+ * in help text: nc 1.10 does not allow that. We don't want to entice
+ * users to use this incompatibility */
+
enum {
SLEAZE_PORT = 31337, /* for UDP-scan RTT trick, change if ya want */
BIGSIZ = 8192, /* big buffers */