- sync traceroute with Slackware-10.1
(support -FIl -g gw -i if -z pt now). - libbb/getopt_ulflags.c support bb_opt_complementally="x-x" as trigger now
This commit is contained in:
parent
1443487c92
commit
45a8ed89c6
@ -2921,12 +2921,16 @@
|
|||||||
"hello world\n"
|
"hello world\n"
|
||||||
|
|
||||||
#define traceroute_trivial_usage \
|
#define traceroute_trivial_usage \
|
||||||
"[-dnrv] [-m max_ttl] [-p port#] [-q nqueries]\n" \
|
"[-FIldnrv] [-f 1st_ttl] [-m max_ttl] [-p port#] [-q nqueries]\n" \
|
||||||
"\t[-s src_addr] [-t tos] [-w wait] host [data size]"
|
"\t[-s src_addr] [-t tos] [-w wait] [-g gateway] [-i iface]\n" \
|
||||||
|
"\t[-z pausemsecs] host [data size]"
|
||||||
#define traceroute_full_usage \
|
#define traceroute_full_usage \
|
||||||
"trace the route ip packets follow going to \"host\"\n" \
|
"trace the route ip packets follow going to \"host\"\n" \
|
||||||
"Options:\n" \
|
"Options:\n" \
|
||||||
"\t-d\tset SO_DEBUG options to socket\n" \
|
"\t-F\tSet the don't fragment bit\n" \
|
||||||
|
"\t-I\tUse ICMP ECHO instead of UDP datagrams\n" \
|
||||||
|
"\t-l\tDisplay the ttl value of the returned packet\n" \
|
||||||
|
"\t-d\tSet SO_DEBUG options to socket\n" \
|
||||||
"\t-n\tPrint hop addresses numerically rather than symbolically\n" \
|
"\t-n\tPrint hop addresses numerically rather than symbolically\n" \
|
||||||
"\t-r\tBypass the normal routing tables and send directly to a host\n" \
|
"\t-r\tBypass the normal routing tables and send directly to a host\n" \
|
||||||
"\t-v\tVerbose output\n" \
|
"\t-v\tVerbose output\n" \
|
||||||
@ -2939,7 +2943,8 @@
|
|||||||
"\t-t tos\tSet the type-of-service in probe packets to the following value\n" \
|
"\t-t tos\tSet the type-of-service in probe packets to the following value\n" \
|
||||||
"\t\t(default 0)\n" \
|
"\t\t(default 0)\n" \
|
||||||
"\t-w wait\tSet the time (in seconds) to wait for a response to a probe\n" \
|
"\t-w wait\tSet the time (in seconds) to wait for a response to a probe\n" \
|
||||||
"\t\t(default 3 sec.)"
|
"\t\t(default 3 sec.)\n" \
|
||||||
|
"\t-g\tSpecify a loose source route gateway (8 maximum)"
|
||||||
|
|
||||||
|
|
||||||
#define true_trivial_usage \
|
#define true_trivial_usage \
|
||||||
|
@ -113,7 +113,8 @@ const char *bb_opt_complementally
|
|||||||
Special characters:
|
Special characters:
|
||||||
|
|
||||||
"-" A dash between two options causes the second of the two
|
"-" A dash between two options causes the second of the two
|
||||||
to be unset (and ignored) if it is given on the command line.
|
to be unset (and ignored or triggered) if it is given on
|
||||||
|
the command line.
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
The du applet has the options "-s" and "-d depth". If
|
The du applet has the options "-s" and "-d depth". If
|
||||||
@ -128,13 +129,15 @@ Special characters:
|
|||||||
|
|
||||||
char *smax_print_depth;
|
char *smax_print_depth;
|
||||||
|
|
||||||
bb_opt_complementally = "s-d:d-s";
|
bb_opt_complementally = "s-d:d-s:x-x";
|
||||||
opt = bb_getopt_ulflags(argc, argv, "sd:", &smax_print_depth);
|
opt = bb_getopt_ulflags(argc, argv, "sd:x", &smax_print_depth);
|
||||||
|
|
||||||
if (opt & 2) {
|
if (opt & 2) {
|
||||||
max_print_depth = bb_xgetularg10_bnd(smax_print_depth,
|
max_print_depth = bb_xgetularg10_bnd(smax_print_depth,
|
||||||
0, INT_MAX);
|
0, INT_MAX);
|
||||||
}
|
}
|
||||||
|
if(opt & 4)
|
||||||
|
printf("Detected odd -x usaging\n");
|
||||||
|
|
||||||
"~" A tilde between two options, or between an option and a group
|
"~" A tilde between two options, or between an option and a group
|
||||||
of options, means that they are mutually exclusive. Unlike
|
of options, means that they are mutually exclusive. Unlike
|
||||||
@ -297,6 +300,8 @@ bb_getopt_ulflags (int argc, char **argv, const char *applet_opts, ...)
|
|||||||
|
|
||||||
while ((c = getopt_long (argc, argv, applet_opts,
|
while ((c = getopt_long (argc, argv, applet_opts,
|
||||||
bb_applet_long_options, NULL)) > 0) {
|
bb_applet_long_options, NULL)) > 0) {
|
||||||
|
unsigned long trigger;
|
||||||
|
|
||||||
for (on_off = complementally; on_off->opt != c; on_off++) {
|
for (on_off = complementally; on_off->opt != c; on_off++) {
|
||||||
if(!on_off->opt)
|
if(!on_off->opt)
|
||||||
bb_show_usage ();
|
bb_show_usage ();
|
||||||
@ -306,8 +311,10 @@ bb_getopt_ulflags (int argc, char **argv, const char *applet_opts, ...)
|
|||||||
bb_show_usage ();
|
bb_show_usage ();
|
||||||
flags |= BB_GETOPT_ERROR;
|
flags |= BB_GETOPT_ERROR;
|
||||||
}
|
}
|
||||||
flags &= ~on_off->switch_off;
|
trigger = on_off->switch_on & on_off->switch_off;
|
||||||
flags |= on_off->switch_on;
|
flags &= ~(on_off->switch_off ^ trigger);
|
||||||
|
flags |= on_off->switch_on ^ trigger;
|
||||||
|
flags ^= trigger;
|
||||||
if(on_off->list_flg) {
|
if(on_off->list_flg) {
|
||||||
*(llist_t **)(on_off->optarg) =
|
*(llist_t **)(on_off->optarg) =
|
||||||
llist_add_to(*(llist_t **)(on_off->optarg), optarg);
|
llist_add_to(*(llist_t **)(on_off->optarg), optarg);
|
||||||
|
@ -114,7 +114,7 @@ config CONFIG_FEATURE_HTTPD_CGI
|
|||||||
depends on CONFIG_HTTPD
|
depends on CONFIG_HTTPD
|
||||||
help
|
help
|
||||||
This option allows scripts and executables to be invoked
|
This option allows scripts and executables to be invoked
|
||||||
when specific urls are requested.
|
when specific urls are requested.
|
||||||
|
|
||||||
config CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV
|
config CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV
|
||||||
bool " Support the REMOTE_PORT environment variable for CGI"
|
bool " Support the REMOTE_PORT environment variable for CGI"
|
||||||
@ -419,7 +419,7 @@ config CONFIG_NAMEIF
|
|||||||
File fields are separated by space or tab.
|
File fields are separated by space or tab.
|
||||||
File format:
|
File format:
|
||||||
# Comment
|
# Comment
|
||||||
new_interface_name XX:XX:XX:XX:XX:XX
|
new_interface_name XX:XX:XX:XX:XX:XX
|
||||||
|
|
||||||
config CONFIG_NC
|
config CONFIG_NC
|
||||||
bool "nc"
|
bool "nc"
|
||||||
@ -615,6 +615,22 @@ config CONFIG_FEATURE_TRACEROUTE_VERBOSE
|
|||||||
Add some verbosity to traceroute. This includes amongst other things
|
Add some verbosity to traceroute. This includes amongst other things
|
||||||
hostnames and ICMP response types.
|
hostnames and ICMP response types.
|
||||||
|
|
||||||
|
config CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE
|
||||||
|
bool " Enable loose source route"
|
||||||
|
default n
|
||||||
|
depends on CONFIG_TRACEROUTE
|
||||||
|
help
|
||||||
|
Add feature for can specify a loose source route gateway
|
||||||
|
(8 maximum).
|
||||||
|
|
||||||
|
config CONFIG_FEATURE_TRACEROUTE_USE_ICMP
|
||||||
|
bool " Use ICMP instead of UDP"
|
||||||
|
default n
|
||||||
|
depends on CONFIG_TRACEROUTE
|
||||||
|
help
|
||||||
|
Add feature for can use ICMP ECHO instead of UDP datagrams.
|
||||||
|
|
||||||
|
|
||||||
config CONFIG_VCONFIG
|
config CONFIG_VCONFIG
|
||||||
bool "vconfig"
|
bool "vconfig"
|
||||||
default n
|
default n
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user