Add the "-c <count>" option to the "ping" command, allowing for automatic termination after a specified number of packets. When a number of packets is specified: - if a serious error (i.e. length mismatch or content mismatch) occurs, then the ping will be immediately terminated with the relevant status code; - if at least one response is received successfully, and all errors are non-serious (i.e. timeouts or out-of-sequence responses), then the ping will be terminated after the final response (or timeout) with a success status; - if no responses are received successfully, then the ping will be terminated after the final timeout with ETIMEDOUT. If no number of packets is specified, then the ping will continue until manually interrupted. Originally-implemented-by: Cedric Levasseur <cyr-ius@ipocus.net> Signed-off-by: Michael Brown <mcb30@ipxe.org>tags/v1.20.1
|
|
||
70 |
|
70 |
|
71 |
|
71 |
|
72 |
|
72 |
|
|
73 |
|
|
|
74 |
|
|
|
75 |
|
|
|
76 |
|
|
73 |
|
77 |
|
74 |
|
78 |
|
75 |
|
79 |
|
|
|
||
164 |
|
168 |
|
165 |
|
169 |
|
166 |
|
170 |
|
167 |
|
|
|
|
171 |
|
|
|
172 |
|
|
|
173 |
|
|
|
174 |
|
|
|
175 |
|
|
|
176 |
|
|
168 |
|
177 |
|
169 |
|
178 |
|
170 |
|
179 |
|
|
|
||
173 |
|
182 |
|
174 |
|
183 |
|
175 |
|
184 |
|
|
185 |
|
|
176 |
|
186 |
|
177 |
|
187 |
|
178 |
|
188 |
|
|
|
||
210 |
|
220 |
|
211 |
|
221 |
|
212 |
|
222 |
|
|
223 |
|
|
213 |
|
224 |
|
214 |
|
225 |
|
215 |
|
226 |
|
|
|
||
218 |
|
229 |
|
219 |
|
230 |
|
220 |
|
231 |
|
|
232 |
|
|
|
233 |
|
|
|
234 |
|
|
221 |
|
235 |
|
222 |
|
236 |
|
223 |
|
237 |
|
|
238 |
|
|
224 |
|
239 |
|
|
240 |
|
|
|
241 |
|
|
|
242 |
|
|
225 |
|
243 |
|
226 |
|
244 |
|
|
245 |
|
|
227 |
|
246 |
|
|
247 |
|
|
|
248 |
|
|
|
249 |
|
|
228 |
|
250 |
|
229 |
|
251 |
|
230 |
|
252 |
|
|
253 |
|
|
231 |
|
254 |
|
|
255 |
|
|
|
256 |
|
|
|
257 |
|
|
232 |
|
258 |
|
|
259 |
|
|
|
260 |
|
|
233 |
|
261 |
|
234 |
|
262 |
|
235 |
|
263 |
|
|
|
||
238 |
|
266 |
|
239 |
|
267 |
|
240 |
|
268 |
|
|
269 |
|
|
|
270 |
|
|
|
271 |
|
|
|
272 |
|
|
241 |
|
273 |
|
242 |
|
274 |
|
243 |
|
275 |
|
|
|
||
268 |
|
300 |
|
269 |
|
301 |
|
270 |
|
302 |
|
|
303 |
|
|
271 |
|
304 |
|
272 |
|
305 |
|
273 |
|
306 |
|
274 |
|
|
|
|
307 |
|
|
275 |
|
308 |
|
276 |
|
309 |
|
277 |
|
310 |
|
|
|
||
292 |
|
325 |
|
293 |
|
326 |
|
294 |
|
327 |
|
|
328 |
|
|
295 |
|
329 |
|
|
330 |
|
|
296 |
|
331 |
|
297 |
|
332 |
|
298 |
|
333 |
|
|
|
||
48 |
|
48 |
|
49 |
|
49 |
|
50 |
|
50 |
|
|
51 |
|
|
|
52 |
|
|
51 |
|
53 |
|
52 |
|
54 |
|
53 |
|
55 |
|
|
|
||
56 |
|
58 |
|
57 |
|
59 |
|
58 |
|
60 |
|
|
61 |
|
|
|
62 |
|
|
59 |
|
63 |
|
60 |
|
64 |
|
61 |
|
65 |
|
|
|
||
87 |
|
91 |
|
88 |
|
92 |
|
89 |
|
93 |
|
90 |
|
|
|
|
94 |
|
|
|
95 |
|
|
91 |
|
96 |
|
92 |
|
97 |
|
93 |
|
98 |
|
|
|
||
15 |
|
15 |
|
16 |
|
16 |
|
17 |
|
17 |
|
|
18 |
|
|
18 |
|
19 |
|
19 |
|
20 |
|
20 |
|
21 |
|
|
|
||
11 |
|
11 |
|
12 |
|
12 |
|
13 |
|
13 |
|
14 |
|
|
|
|
14 |
|
|
|
15 |
|
|
15 |
|
16 |
|
16 |
|
17 |
|
|
|
||
58 |
|
58 |
|
59 |
|
59 |
|
60 |
|
60 |
|
|
61 |
|
|
61 |
|
62 |
|
62 |
|
63 |
|
63 |
|
|
|
|
64 |
|
|
|
65 |
|
|
64 |
|
66 |
|
65 |
|
67 |
|
66 |
|
68 |
|
67 |
|
|
|
68 |
|
|
|
|
69 |
|
|
|
70 |
|
|
69 |
|
71 |
|
70 |
|
72 |
|
71 |
|
73 |
|