u-boot/include/net/wget.h
Marek Vasut 4caacb2f29 net: wget: Support non-default HTTP port
Currently the wget command is hard wired to HTTP port 80. This is
inconvenient, as it is extremely easy to start trivial HTTP server
as an unprivileged user using e.g. python http module to serve the
files, but such a server has to run on one of the higher ports:
"
$ python3 -m http.server -d $(pwd) 8080
"

Make it possible to configure HTTP server port the same way it is
possible to configure TFTP server port, using environment variable
'httpdstp' (similar to 'tftpdstp'). Retain port 80 as the default
fallback port. This way, users can start their own trivial server
and conveniently download whatever files they need into U-Boot.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-12-19 08:01:59 -05:00

21 lines
360 B
C

/* SPDX-License-Identifier: GPL-2.0 */
/*
* Duncan Hare Copyright 2017
*/
/**
* wget_start() - begin wget
*/
void wget_start(void);
enum wget_state {
WGET_CLOSED,
WGET_CONNECTING,
WGET_CONNECTED,
WGET_TRANSFERRING,
WGET_TRANSFERRED
};
#define DEBUG_WGET 0 /* Set to 1 for debug messages */
#define WGET_RETRY_COUNT 30
#define WGET_TIMEOUT 2000UL