diff options
| author | Masahisa Kojima <[email protected]> | 2023-11-10 13:25:35 +0900 |
|---|---|---|
| committer | Ilias Apalodimas <[email protected]> | 2023-11-18 10:08:08 +0200 |
| commit | 8cf18da1a971dbfe121c1fc1836bb4af942d06dc (patch) | |
| tree | 256a204decb4fa30ee039ba73401fd7481369c95 /include | |
| 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 <[email protected]>
Reviewed-by: Ilias Apalodimas <[email protected]>
Reviewed-by: Ramon Fried <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Signed-off-by: Ilias Apalodimas <[email protected]>
Diffstat (limited to 'include')
| -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 e63a946002d..61f9018769a 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__ */ |
