summaryrefslogtreecommitdiff
path: root/net/net-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/net-common.c')
-rw-r--r--net/net-common.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/net/net-common.c b/net/net-common.c
index a7f767d5e9c..45288fe5f80 100644
--- a/net/net-common.c
+++ b/net/net-common.c
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
+#include <net-common.h>
void copy_filename(char *dst, const char *src, int size)
{
@@ -11,3 +12,16 @@ void copy_filename(char *dst, const char *src, int size)
*dst++ = *src++;
*dst = '\0';
}
+
+struct wget_http_info default_wget_info = {
+ .method = WGET_HTTP_METHOD_GET,
+ .set_bootdev = true,
+};
+
+struct wget_http_info *wget_info;
+
+int wget_request(ulong dst_addr, char *uri, struct wget_http_info *info)
+{
+ wget_info = info ? info : &default_wget_info;
+ return wget_with_dns(dst_addr, uri);
+}