mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
* Add support for RMU board
* Add support for TQM862L at 100/50 MHz * Patch by Pantelis Antoniou, 02 Jun 2003: major reconstruction of networking code; add "ping" support (outgoing only!)
This commit is contained in:
parent
08eaea9c9f
commit
73a8b27c57
26 changed files with 1907 additions and 234 deletions
|
@ -95,6 +95,10 @@ static void netboot_update_env(void)
|
|||
ip_to_string (NetOurDNSIP, tmp);
|
||||
setenv("dnsip", tmp);
|
||||
}
|
||||
|
||||
if (NetOurNISDomain[0])
|
||||
setenv("domain", NetOurNISDomain);
|
||||
|
||||
}
|
||||
static int
|
||||
netboot_common (int proto, cmd_tbl_t *cmdtp, int argc, char *argv[])
|
||||
|
@ -165,4 +169,27 @@ netboot_common (int proto, cmd_tbl_t *cmdtp, int argc, char *argv[])
|
|||
return rcode;
|
||||
}
|
||||
|
||||
#if (CONFIG_COMMANDS & CFG_CMD_PING)
|
||||
int do_ping (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
||||
{
|
||||
if (argc < 2)
|
||||
return -1;
|
||||
|
||||
NetPingIP = string_to_ip(argv[1]);
|
||||
if (NetPingIP == 0) {
|
||||
printf ("Usage:\n%s\n", cmdtp->usage);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (NetLoop(PING) < 0) {
|
||||
printf("ping failed; host %s is not alive\n", argv[1]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
printf("host %s is alive\n", argv[1]);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif /* CFG_CMD_PING */
|
||||
|
||||
#endif /* CFG_CMD_NET */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue