.BI \-B \ BITPATTERN\c
]
[\c
+.BI \-G \ GRACEPERIOD\c
+]
+[\c
.BI \-Q \ TOS\c
]
[\c
.I NUM
is greater than 255, a random pattern is used.
.TP
+.B \-G \fISECONDS\fR, \fB\-\-graceperiod \fISECONDS
+Use this option to specify the positive number of seconds to wait for responses
+after the final request. The default value is five seconds.
+.TP
.B \-Q \fINUM\fR, \fB\-\-tos \fINUM
Specifies value for type of service field in IP header. Should be within range 0
- 255.
int MaxPing = 10;
int ForceMaxPing = 0;
float WaitTime = 1.0;
+float GraceTime = 5.0;
char *Hostname = NULL;
char *InterfaceAddress = NULL;
char LocalHostname[128];
{ "port", 1, NULL, 'P' }, /* target port number for TCP/SCTP/UDP */
{ "localport", 1, NULL, 'L' }, /* source port number for UDP */
{ "timeout", 1, NULL, 'Z' }, /* timeout for TCP sockets */
+ { "gracetime", 1, NULL, 'G' }, /* graceperiod for replies after last probe */
#ifdef SO_MARK
{ "mark", 1, NULL, 'M' }, /* use SO_MARK */
#endif
opt = 0;
while(1) {
opt = getopt_long(argc, argv,
- "hv46F:rwxtglCpnbo:y:zi:c:s:B:Q:ea:f:m:U:uTSP:L:Z:M:", long_options, NULL);
+ "hv46F:rwxtglCpnbo:y:zi:c:s:B:Q:ea:f:m:U:uTSP:L:Z:G:M:", long_options, NULL);
if(opt == -1)
break;
if (bitpattern > 255)
bitpattern = -1;
break;
+ case 'G':
+ GraceTime = atof (optarg);
+ if (GraceTime <= 0.0) {
+ fprintf (stderr, "mtr: wait time must be positive\n");
+ exit (1);
+ }
+ break;
case 'Q':
tos = atoi (optarg);
if (tos > 255 || tos < 0) {
"\t\t[-Q TOS] [--mpls]\n"
"\t\t[-a ADDRESS] [-f FIRST-TTL] [-m MAX-TTL] [-U MAX_UNKNOWN]\n"
"\t\t[--udp] [--tcp] [--sctp] [-P PORT] [-L LOCALPORT] [-Z TIMEOUT]\n"
- "\t\t[-M MARK] HOSTNAME\n", argv[0]);
+ "\t\t[-G GRACEPERIOD] [-M MARK] HOSTNAME\n", argv[0]);
printf("See the man page for details.\n");
exit(0);
}