diff options
| author | Jerome Forissier <[email protected]> | 2024-10-16 12:04:06 +0200 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-10-16 11:11:56 -0600 |
| commit | 7a5e00d5c349ee6e123d7c17904730b9deaa8047 (patch) | |
| tree | 8d35ff1b17fdf7f0a8d4ab1c774b7745a22eb06e /cmd | |
| parent | 4d4d7838127ec8a95d256285759e8cc781041408 (diff) | |
net: lwip: add ping command
Add support for the the ping command with NET_LWIP. The implementation
is derived from lwIP's contrib/apps/ping/ping.c.
Signed-off-by: Jerome Forissier <[email protected]>
Acked-by: Ilias Apalodimas <[email protected]>
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/Kconfig | 11 | ||||
| -rw-r--r-- | cmd/net-lwip.c | 8 |
2 files changed, 14 insertions, 5 deletions
diff --git a/cmd/Kconfig b/cmd/Kconfig index 7173f3da0b0..b7d1dd028a1 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -2009,11 +2009,6 @@ config CMD_WGET wget is a simple command to download kernel, or other files, from a http server over TCP. -config CMD_PING - bool "ping" - help - Send ICMP ECHO_REQUEST to network host - config CMD_PING6 bool "ping6" depends on IPV6 @@ -2107,6 +2102,12 @@ config CMD_MDIO The MDIO interface is orthogonal to the MII interface and extends it by adding access to more registers through indirect addressing. +config CMD_PING + bool "ping" + select PROT_RAW_LWIP if NET_LWIP + help + Send ICMP ECHO_REQUEST to network host + config CMD_TFTPBOOT bool "tftp" select PROT_UDP_LWIP if NET_LWIP diff --git a/cmd/net-lwip.c b/cmd/net-lwip.c index 80f0872bb8f..feed719beef 100644 --- a/cmd/net-lwip.c +++ b/cmd/net-lwip.c @@ -12,6 +12,14 @@ U_BOOT_CMD( ); #endif +#if defined(CONFIG_CMD_PING) +U_BOOT_CMD( + ping, 2, 1, do_ping, + "send ICMP ECHO_REQUEST to network host", + "pingAddress" +); +#endif + #if defined(CONFIG_CMD_TFTPBOOT) U_BOOT_CMD( tftpboot, 3, 0, do_tftpb, |
