mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-11 07:25:19 +00:00
Enhanced output to NSH ping command from Max Neklyudov
This commit is contained in:
parent
862d452d9b
commit
5f17ec1fa2
1 changed files with 11 additions and 0 deletions
|
|
@ -1291,6 +1291,17 @@ int cmd_ping(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
|
|||
DEFAULT_PING_DATALEN, staddr, seqno, elapsed);
|
||||
replies++;
|
||||
}
|
||||
else if (seqno < 0)
|
||||
{
|
||||
if (seqno == -ETIMEDOUT)
|
||||
{
|
||||
nsh_output(vtbl, "seq=%d Request timeout\n", i);
|
||||
}
|
||||
else if (seqno == -ENETUNREACH)
|
||||
{
|
||||
nsh_output(vtbl, "seq=%d Network is unreachable\n", i);
|
||||
}
|
||||
}
|
||||
|
||||
/* Wait for the remainder of the interval. If the last seqno<i,
|
||||
* then this is a bad idea... we will probably lose the response
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue