summaryrefslogtreecommitdiff
path: root/include/net-common.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net-common.h')
-rw-r--r--include/net-common.h46
1 files changed, 15 insertions, 31 deletions
diff --git a/include/net-common.h b/include/net-common.h
index 6a39091a5d4..e536968a92b 100644
--- a/include/net-common.h
+++ b/include/net-common.h
@@ -471,40 +471,13 @@ static inline struct in_addr env_get_ip(char *var)
int net_init(void);
+/* Called when a network operation fails to know if it should be re-tried */
+int net_start_again(void);
+
/* NET compatibility */
enum proto_t;
int net_loop(enum proto_t protocol);
-/* internal function: do not use! */
-int netboot_run_(enum proto_t proto, ulong addr, const char *fname, ulong size,
- bool fname_explicit, bool ipv6);
-
-/**
- * netboot_run() - Run a network operation
- *
- * The following proto values are NOT supported:
- * PING, since net_ping_ip cannot be set
- * NETCONS, since its parameters cannot bet set
- * RS, since first_call cannot be set, along with perhaps other things
- * UDP, since udp_ops cannot be set
- * DNS, since net_dns_resolve and net_dns_env_var cannot be set
- * WGET, since DNS must be done first and that is not supported
- * DHCP6, since the required parameters cannot be passed in
- *
- * To support one of these, either add the required arguments or perhaps a
- * separate function and a struct to hold the information.
- *
- * @proto: Operation to run: TFTPGET, FASTBOOT_UDP, FASTBOOT_TCP, BOOTP,
- * TFTPPUT, RARP, NFS, DHCP
- * @addr: Load/save address
- * @fname: Filename
- * @size: Save size (not used for TFTPGET)
- * @ipv6: true to use IPv6, false to use IPv4
- * Return 0 on success, else -ve error code
- */
-int netboot_run(enum proto_t proto, ulong addr, const char *fname, ulong size,
- bool ipv6);
-
/**
* dhcp_run() - Run DHCP on the current ethernet device
*
@@ -520,6 +493,18 @@ int netboot_run(enum proto_t proto, ulong addr, const char *fname, ulong size,
*/
int dhcp_run(ulong addr, const char *fname, bool autoload);
+
+/**
+ * do_ping - Run the ping command
+ *
+ * @cmdtp: Unused
+ * @flag: Command flags (CMD_FLAG_...)
+ * @argc: Number of arguments
+ * @argv: List of arguments
+ * Return: result (see enum command_ret_t)
+ */
+int do_ping(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
+
/**
* do_tftpb - Run the tftpboot command
*
@@ -549,7 +534,6 @@ int wget_do_request(ulong dst_addr, char *uri);
* Return: true if uri is valid, false if uri is invalid
*/
bool wget_validate_uri(char *uri);
-//int do_wget(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[]);
/**
* enum wget_http_method - http method