aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2020-12-17 18:17:03 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2020-12-17 18:17:03 +0100
commita4c5cb2335dc3ef2fd21560c2205abf1e484e82a (patch)
tree61dbcfce37a250e492f02413dd4bff3633685072
parentff4ca1850131ee7dad5baf6c9d3aff055e6a00d1 (diff)
downloadbusybox-w32-a4c5cb2335dc3ef2fd21560c2205abf1e484e82a.tar.gz
busybox-w32-a4c5cb2335dc3ef2fd21560c2205abf1e484e82a.tar.bz2
busybox-w32-a4c5cb2335dc3ef2fd21560c2205abf1e484e82a.zip
traceroute: fix --help text
function old new delta traceroute_init 1151 1153 +2 packed_usage 33568 33570 +2 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 4/0) Total: 4 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--networking/traceroute.c48
1 files changed, 25 insertions, 23 deletions
diff --git a/networking/traceroute.c b/networking/traceroute.c
index 1204c5e3a..ec3ac8b6f 100644
--- a/networking/traceroute.c
+++ b/networking/traceroute.c
@@ -243,7 +243,7 @@
243//kbuild:lib-$(CONFIG_TRACEROUTE6) += traceroute.o 243//kbuild:lib-$(CONFIG_TRACEROUTE6) += traceroute.o
244 244
245//usage:#define traceroute_trivial_usage 245//usage:#define traceroute_trivial_usage
246//usage: "[-"IF_TRACEROUTE6("46")"FIlnrv] [-f 1ST_TTL] [-m MAXTTL] [-q PROBES] [-p PORT]\n" 246//usage: "[-"IF_TRACEROUTE6("46")IF_FEATURE_TRACEROUTE_USE_ICMP("I")"Flnrv] [-f 1ST_TTL] [-m MAXTTL] [-q PROBES] [-p PORT]\n"
247//usage: " [-t TOS] [-w WAIT_SEC] [-s SRC_IP] [-i IFACE]\n" 247//usage: " [-t TOS] [-w WAIT_SEC] [-s SRC_IP] [-i IFACE]\n"
248//usage: " [-z PAUSE_MSEC] HOST [BYTES]" 248//usage: " [-z PAUSE_MSEC] HOST [BYTES]"
249//usage:#define traceroute_full_usage "\n\n" 249//usage:#define traceroute_full_usage "\n\n"
@@ -271,15 +271,20 @@
271//usage: "\n -s IP Source address" 271//usage: "\n -s IP Source address"
272//usage: "\n -i IFACE Source interface" 272//usage: "\n -i IFACE Source interface"
273//usage: "\n -t N Type-of-service in probe packets (default 0)" 273//usage: "\n -t N Type-of-service in probe packets (default 0)"
274//usage: "\n -w SEC Time to wait for a response (default 3)" 274//usage: "\n -w SEC Wait for a response (default 3)"
275//usage: "\n -g IP Loose source route gateway (8 max)" 275//usage: "\n -z MSEC Wait before each send"
276//usage: 276//usage:
277//usage:#define traceroute6_trivial_usage 277//usage:#define traceroute6_trivial_usage
278//usage: "[-nrv] [-m MAXTTL] [-q PROBES] [-p PORT]\n" 278//usage: "[-"IF_FEATURE_TRACEROUTE_USE_ICMP("I")"nrv] [-f 1ST_TTL] [-m MAXTTL] [-q PROBES] [-p PORT]\n"
279//usage: " [-t TOS] [-w WAIT_SEC] [-s SRC_IP] [-i IFACE]\n" 279//usage: " [-t TOS] [-w WAIT_SEC] [-s SRC_IP] [-i IFACE]\n"
280//usage: " HOST [BYTES]" 280//usage: " [-z PAUSE_MSEC] HOST [BYTES]"
281//usage:#define traceroute6_full_usage "\n\n" 281//usage:#define traceroute6_full_usage "\n\n"
282//usage: "Trace the route to HOST\n" 282//usage: "Trace the route to HOST\n"
283////NOP? "\n -F Set don't fragment bit"
284//usage: IF_FEATURE_TRACEROUTE_USE_ICMP(
285//usage: "\n -I Use ICMP ECHO instead of UDP datagrams"
286//usage: )
287////NOP: "\n -l Display TTL value of the returned packet"
283//Currently disabled (TRACEROUTE_SO_DEBUG==0) 288//Currently disabled (TRACEROUTE_SO_DEBUG==0)
284////usage: "\n -d Set SO_DEBUG options to socket" 289////usage: "\n -d Set SO_DEBUG options to socket"
285//usage: "\n -n Print numeric addresses" 290//usage: "\n -n Print numeric addresses"
@@ -287,6 +292,7 @@
287//usage: IF_FEATURE_TRACEROUTE_VERBOSE( 292//usage: IF_FEATURE_TRACEROUTE_VERBOSE(
288//usage: "\n -v Verbose" 293//usage: "\n -v Verbose"
289//usage: ) 294//usage: )
295//usage: "\n -f N First number of hops (default 1)"
290//usage: "\n -m N Max number of hops" 296//usage: "\n -m N Max number of hops"
291//usage: "\n -q N Number of probes per hop (default 3)" 297//usage: "\n -q N Number of probes per hop (default 3)"
292//usage: "\n -p N Base UDP port number used in probes" 298//usage: "\n -p N Base UDP port number used in probes"
@@ -294,7 +300,8 @@
294//usage: "\n -s IP Source address" 300//usage: "\n -s IP Source address"
295//usage: "\n -i IFACE Source interface" 301//usage: "\n -i IFACE Source interface"
296//usage: "\n -t N Type-of-service in probe packets (default 0)" 302//usage: "\n -t N Type-of-service in probe packets (default 0)"
297//usage: "\n -w SEC Time wait for a response (default 3)" 303//usage: "\n -w SEC Wait for a response (default 3)"
304//usage: "\n -z MSEC Wait before each send"
298 305
299#define TRACEROUTE_SO_DEBUG 0 306#define TRACEROUTE_SO_DEBUG 0
300 307
@@ -334,7 +341,7 @@
334 341
335 342
336#define OPT_STRING \ 343#define OPT_STRING \
337 "FIlnrdvxt:i:m:p:q:s:w:z:f:" \ 344 "FIlnrdvt:i:m:p:q:s:w:z:f:" \
338 "4" IF_TRACEROUTE6("6") 345 "4" IF_TRACEROUTE6("6")
339enum { 346enum {
340 OPT_DONT_FRAGMNT = (1 << 0), /* F */ 347 OPT_DONT_FRAGMNT = (1 << 0), /* F */
@@ -344,18 +351,17 @@ enum {
344 OPT_BYPASS_ROUTE = (1 << 4), /* r */ 351 OPT_BYPASS_ROUTE = (1 << 4), /* r */
345 OPT_DEBUG = (1 << 5), /* d */ 352 OPT_DEBUG = (1 << 5), /* d */
346 OPT_VERBOSE = (1 << 6) * ENABLE_FEATURE_TRACEROUTE_VERBOSE, /* v */ 353 OPT_VERBOSE = (1 << 6) * ENABLE_FEATURE_TRACEROUTE_VERBOSE, /* v */
347 OPT_IP_CHKSUM = (1 << 7), /* x */ 354 OPT_TOS = (1 << 7), /* t */
348 OPT_TOS = (1 << 8), /* t */ 355 OPT_DEVICE = (1 << 8), /* i */
349 OPT_DEVICE = (1 << 9), /* i */ 356 OPT_MAX_TTL = (1 << 9), /* m */
350 OPT_MAX_TTL = (1 << 10), /* m */ 357 OPT_PORT = (1 << 10), /* p */
351 OPT_PORT = (1 << 11), /* p */ 358 OPT_NPROBES = (1 << 11), /* q */
352 OPT_NPROBES = (1 << 12), /* q */ 359 OPT_SOURCE = (1 << 12), /* s */
353 OPT_SOURCE = (1 << 13), /* s */ 360 OPT_WAITTIME = (1 << 13), /* w */
354 OPT_WAITTIME = (1 << 14), /* w */ 361 OPT_PAUSE_MS = (1 << 14), /* z */
355 OPT_PAUSE_MS = (1 << 15), /* z */ 362 OPT_FIRST_TTL = (1 << 15), /* f */
356 OPT_FIRST_TTL = (1 << 16), /* f */ 363 OPT_IPV4 = (1 << 16), /* 4 */
357 OPT_IPV4 = (1 << 17), /* 4 */ 364 OPT_IPV6 = (1 << 17) * ENABLE_TRACEROUTE6, /* 6 */
358 OPT_IPV6 = (1 << 18) * ENABLE_TRACEROUTE6, /* 6 */
359}; 365};
360#if ENABLE_FEATURE_TRACEROUTE_VERBOSE 366#if ENABLE_FEATURE_TRACEROUTE_VERBOSE
361# define verbose (option_mask32 & OPT_VERBOSE) 367# define verbose (option_mask32 & OPT_VERBOSE)
@@ -896,10 +902,6 @@ traceroute_init(int op, char **argv)
896 ); 902 );
897 argv += optind; 903 argv += optind;
898 904
899#if 0 /* IGNORED */
900 if (op & OPT_IP_CHKSUM)
901 bb_error_msg("warning: ip checksums disabled");
902#endif
903 if (op & OPT_MAX_TTL) 905 if (op & OPT_MAX_TTL)
904 G.max_ttl = xatou_range(max_ttl_str, 1, 255); 906 G.max_ttl = xatou_range(max_ttl_str, 1, 255);
905 if (op & OPT_PORT) 907 if (op & OPT_PORT)