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>
This commit is contained in:

committed by
Ilias Apalodimas

parent
04592adbdb
commit
8cf18da1a9
@@ -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__ */
|
||||
|
Reference in New Issue
Block a user