Skip to content

wget: Expose wget to applications

Adriano Cordova u-boot 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest7 patches 2 repliesIn review
  2. v17 patches 12 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7net: Kconfig: add CONFIG_WGET symbolcmd/Kconfig net/Kconfig net/Makefile +1 more+12 -61 reply
2/7net: wget: add definition of struct wget_http_infoinclude/net-common.h+48 -01 reply
3/7net: wget: Add interface to issue wget_requests using wget_http_infoinclude/net-common.h net/net-common.c+18 -00 replies
4/7net: wget: integrate struct wget_info into legacy wget codecmd/net.c net/wget.c+72 -210 replies
5/7net: wget: make wget_with_dns return value compatible with its lwip versioninclude/net-common.h include/net-lwip.h net/wget.c+2 -110 replies
6/7net/lwip: wget: put server_name and port into wget_ctxnet/lwip/wget.c+4 -40 replies
7/7net/lwip: wget: integrate struct wget_info into wget codenet/lwip/wget.c+40 -20 replies

Reviews trailers per patch

2 of 7 patches have a Reviewed-by or Acked-by.

PatchHeinrich Schuchardt
1/7R-b
2/7R-b
3/7
4/7
5/7
6/7
7/7

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/7] wget: Expose wget to applications

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(-)
Signature · 1 line
2.43.0