public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH v2 0/7] wget: Expose wget to applications
@ 2024-11-11 21:08 Adriano Cordova
  2024-11-11 21:08 ` [PATCH v2 1/7] net: Kconfig: add CONFIG_WGET symbol Adriano Cordova
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Adriano Cordova @ 2024-11-11 21:08 UTC (permalink / raw)
  To: u-boot
  Cc: joe.hershberger, rfried.dev, jerome.forissier, xypron.glpk,
	ilias.apalodimas, Adriano Cordova

Currently the wget command is focused on downloading the next boot stage.
This series proposes to set wget as a general purpose HTTP request interface.
This series splits the wget code from the wget command and exposes wget HTTP
requests for applications to use. This comes in preparation for an efi HTTP 
driver.

This series proposes to expose wget via the following struct:

/**
 * struct wget_http_info - wget parameters
 * @method:		HTTP Method. Filled by client.
 * @status_code:	HTTP status code. Filled by wget.
 * @file_size:		download size. Filled by wget.
 * @buffer_size:	size of client-provided buffer. Filled by client.
 * @set_bootdev:	set boot device with download. Filled by client.
 * @check_buffer_size:	check download does not exceed buffer size.
 *			Filled by client.
 * @hdr_cont_len:	content length according to headers. Filled by wget
 * @headers:		buffer for headers. Filled by wget.
 */
struct wget_http_info {
	enum wget_http_method method;
	u32 status_code;
	ulong file_size;
	ulong buffer_size;
	bool set_bootdev;
	bool check_buffer_size;
	u32 hdr_cont_len;
	char *headers;
};

The client can then pass such struct to wget in a network stack 
agnostic way.


Adriano Cordova (7):
  net: Kconfig: add CONFIG_WGET symbol
  net: wget: add definition of struct wget_http_info
  net: wget: Add interface to issue wget_requests using wget_http_info
  net: wget: integrate struct wget_info into legacy wget code
  net: wget: make wget_with_dns return value compatible with its lwip
    version
  net/lwip: wget: put server_name and port into wget_ctx
  net/lwip: wget: integrate struct wget_info into wget code

 cmd/Kconfig          |  5 +--
 cmd/net.c            |  2 +
 include/net-common.h | 54 ++++++++++++++++++++++++-
 include/net-lwip.h   |  9 -----
 net/Kconfig          |  9 +++++
 net/Makefile         |  2 +-
 net/lwip/Makefile    |  2 +-
 net/lwip/wget.c      | 50 +++++++++++++++++++++---
 net/net-common.c     | 14 +++++++
 net/wget.c           | 93 +++++++++++++++++++++++++++++++++-----------
 10 files changed, 196 insertions(+), 44 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-11-16 20:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-11 21:08 [PATCH v2 0/7] wget: Expose wget to applications Adriano Cordova
2024-11-11 21:08 ` [PATCH v2 1/7] net: Kconfig: add CONFIG_WGET symbol Adriano Cordova
2024-11-16 20:33   ` Heinrich Schuchardt
2024-11-11 21:08 ` [PATCH v2 2/7] net: wget: add definition of struct wget_http_info Adriano Cordova
2024-11-16 20:29   ` Heinrich Schuchardt
2024-11-11 21:08 ` [PATCH v2 3/7] net: wget: Add interface to issue wget_requests using wget_http_info Adriano Cordova
2024-11-11 21:08 ` [PATCH v2 4/7] net: wget: integrate struct wget_info into legacy wget code Adriano Cordova
2024-11-11 21:08 ` [PATCH v2 5/7] net: wget: make wget_with_dns return value compatible with its lwip version Adriano Cordova
2024-11-11 21:09 ` [PATCH v2 6/7] net/lwip: wget: put server_name and port into wget_ctx Adriano Cordova
2024-11-11 21:09 ` [PATCH v2 7/7] net/lwip: wget: integrate struct wget_info into wget code Adriano Cordova

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox