comparison packages/redboot/current/src/net/ping.c @ 154:e2d866e32dac

Merge from eCos master repository on 2001-02-26-23:18:05-GMT
author jlarmour
date Tue, 27 Feb 2001 01:21:45 +0000
parents 25e238959bae
children b939e9cada46
comparison
equal deleted inserted replaced
153:5e8f3b328bb3 154:e2d866e32dac
51 #else 51 #else
52 52
53 static void do_ping(int argc, char *argv[]); 53 static void do_ping(int argc, char *argv[]);
54 RedBoot_cmd("ping", 54 RedBoot_cmd("ping",
55 "Network connectivity test", 55 "Network connectivity test",
56 "[-v] [-n <count>] [-t <timeout>] [-i <IP_addr>] -h <IP_addr>", 56 "[-v] [-n <count>] [-l <length>] [-t <timeout>] [-r <rate>]\n"
57 " [-i <IP_addr>] -h <IP_addr>",
57 do_ping 58 do_ping
58 ); 59 );
59 60
60 static bool icmp_received; 61 static bool icmp_received;
61 static icmp_header_t hold_hdr; 62 static icmp_header_t hold_hdr;
135 rate = DEFAULT_RATE; 136 rate = DEFAULT_RATE;
136 } 137 }
137 if (!length_set) { 138 if (!length_set) {
138 length = DEFAULT_LENGTH; 139 length = DEFAULT_LENGTH;
139 } 140 }
141 if ((length < 64) || (length > 1400)) {
142 printf("Invalid length specified: %d\n", length);
143 return;
144 }
140 if (!count_set) { 145 if (!count_set) {
141 count = DEFAULT_COUNT; 146 count = DEFAULT_COUNT;
142 } 147 }
143 if (!timeout_set) { 148 if (!timeout_set) {
144 timeout = DEFAULT_TIMEOUT; 149 timeout = DEFAULT_TIMEOUT;