diff options
author | Masahisa Kojima <masahisa.kojima@linaro.org> | 2023-11-10 13:25:35 +0900 |
---|---|---|
committer | Ilias Apalodimas <ilias.apalodimas@linaro.org> | 2023-11-18 10:08:08 +0200 |
commit | 8cf18da1a971dbfe121c1fc1836bb4af942d06dc (patch) | |
tree | 256a204decb4fa30ee039ba73401fd7481369c95 /include/net.h | |
parent | 04592adbdb997081acccdd7191a9bd661a791d91 (diff) |
net: wget: add wget with dns utility function
Current wget takes the target uri in this format:
"<http server ip>:<file path>" e.g.) 192.168.1.1:/bar
The http server ip address must be resolved before
calling wget.
This commit adds the utility function runs wget with dhs.
User can call wget with the uri like "http://foo/bar".
Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'include/net.h')
-rw-r--r-- | include/net.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/net.h b/include/net.h index e63a946002..61f9018769 100644 --- a/include/net.h +++ b/include/net.h @@ -930,4 +930,13 @@ void eth_set_enable_bootdevs(bool enable); static inline void eth_set_enable_bootdevs(bool enable) {} #endif +/** + * wget_with_dns() - runs dns host IP address resulution before wget + * + * @dst_addr: destination address to download the file + * @uri: uri string of target file of wget + * Return: downloaded file size, negative if failed + */ +int wget_with_dns(ulong dst_addr, char *uri); + #endif /* __NET_H__ */ |