From patchwork Mon Oct 17 07:00:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Liu X-Patchwork-Id: 615682 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp1793332pvb; Mon, 17 Oct 2022 00:00:43 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4TpuqxpJwZ+FNL10zq+FDN+KPPv/cKzGsX4cm+imw8Mb4gmC3Y4UwBqGBuUeAHl4ySsjuK X-Received: by 2002:a17:906:8a66:b0:78b:da52:b752 with SMTP id hy6-20020a1709068a6600b0078bda52b752mr7414446ejc.365.1665990043053; Mon, 17 Oct 2022 00:00:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665990043; cv=none; d=google.com; s=arc-20160816; b=HC/VbiD5+fxOdtoqVipVdIqkibCWSkhFoT+cEmytdNYw0Sx7YCDSLFup8imwnHAkaT xIkkpaqsB8LDwRj2IxYyiDYkl+OtV+cgmXVo/g/lUh3qhpZ1WwOAcj011elDNW+Tb0OC dHcuPPvTpe3e7WJwKgcuiozSu/caCDsaNdnzhBofQvKxVuW1FEJf1IG8vapTOwjYIMHC KQEDs+ivs9GOKFux0/m5Xfw543JVJpdQuUc/8G9nBqRjDPbsE6aeNSmdU8Zm/Q8XhH+x /5szpCoF51mZfHq4+L6yZixuAUjbcgA9csbKGwQSdbdB7/6DdEzggWm2I3NZWYgLXnzc XHIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=2F2hxoIwXfbydjY9M4YvseCrKNZ72P1WbT62xyo9UQA=; b=S+6LGtPhXIkH7W1CNaMH7bmKw8w1K24IAuO0zBht1iwDQ897rxCdk+fNGkyIJ7JJam gV1+hS24xg/xdEsNo8FSRhdPJQ2at1pZ7soOaMN5xcp4fUCLIxmBptG1+pC9XVjtswQD 0/GFcNawr8T6f8Dc+xwZwQxoFY1y3ji7r587uMKMAYtMe5+EsPdlis01aM2+2RAwOLA0 NROOf6aCczF+oY4NZlGVPUYYkuUKMlnAorrSsxDW0P2SFWVH6fpCJ525Y3FXE1QvuCRV 9jq2l8ozOdKBGoXg8PfYGdLThRz2xlRJI2U4soZW9QybTGCnfi1tmfDDOzqRmQqw2/lc YwWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nyPTYN9S; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id l7-20020a056402254700b00458ea275c22si10176787edb.325.2022.10.17.00.00.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Oct 2022 00:00:43 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nyPTYN9S; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7499A84C90; Mon, 17 Oct 2022 09:00:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="nyPTYN9S"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B0D7384F44; Mon, 17 Oct 2022 09:00:36 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7E50584BBA for ; Mon, 17 Oct 2022 09:00:33 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=paul.liu@linaro.org Received: by mail-pl1-x636.google.com with SMTP id b2so9951381plc.7 for ; Mon, 17 Oct 2022 00:00:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=2F2hxoIwXfbydjY9M4YvseCrKNZ72P1WbT62xyo9UQA=; b=nyPTYN9S12L0rSdehpINCKUyAtgiB5V7PHHSpvoN5xBxEW0gmTgB0WhG6M3VLhVF3U DAk+OHyxMaM8Lr/OMEDs0JmEv8x9M5yIdQPrnF/YaQ2uXugB2tppQtyFCeYQLT03MIOS hq3aTJi+HVoLJt0AMipAszc6C2ENWDBKO2iQeODZ1Ows5I+VC4MsD9N2f7K0tQVZ5mpx P+6lwVjz6rIM9xVN4qVzuvDrl3qBIKI6MUUxeuFQ+4nSajZfSeEgiwFbk+uI5eDa164f RIkPG7ULzFHuRDgcu3WK7LIcRFHIxSbiYMSza20yD4u4zF7smOhV6FhSAB0rUXYT6y0a vLaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=2F2hxoIwXfbydjY9M4YvseCrKNZ72P1WbT62xyo9UQA=; b=SNUXXFw9bY7YvnSQeBlwrNjOa9kNZtPLRcVl39i2uWVvuoy5inYLWWOPXoewn3foIz 0KRk04fJhYo7O3SBuXsPurEQawvzeVk6pb1f5bx9uzwUe1YG5xHZ7Ss7p8R7dlpqRbn+ mJoabrP/ZN1AA6BzNFUQnmctL3DcZU3tJUBceESzpyPtUrg4ARHqx1mwWVTkTyvEiRmJ dQHNSR3RODGsRjy1NlyAbgCGxA2LcPN6kJtRv73b1uTi9VQs1Qze9iR2TLmCLjgKG/FH cixsUeNn+RZEuCPYEGCe/keGnlgPsjhCz2o2+rxsobG1y62h/izbg/NbexoPvlzsuima roUQ== X-Gm-Message-State: ACrzQf24y3rnWVRfRPv3h4GrIZq32KrbAIQyUjSFMMO3iLbR9aVteKt2 iv/NarZdBza5zJ60aE5qBzV0fbnQHF4qJQ== X-Received: by 2002:a17:902:b70c:b0:179:eb79:cf9a with SMTP id d12-20020a170902b70c00b00179eb79cf9amr10582482pls.130.1665990031446; Mon, 17 Oct 2022 00:00:31 -0700 (PDT) Received: from localhost ([111.184.129.17]) by smtp.gmail.com with ESMTPSA id l9-20020a170903120900b0017808db132bsm5807945plh.137.2022.10.17.00.00.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Oct 2022 00:00:30 -0700 (PDT) From: "Ying-Chun Liu (PaulLiu)" To: u-boot@lists.denx.de Cc: "Ying-Chun Liu (PaulLiu)" Subject: [PATCH v18 0/3] add TCP and HTTP for downloading images Date: Mon, 17 Oct 2022 15:00:18 +0800 Message-Id: <20221017070021.2019592-1-paul.liu@linaro.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean This patch is a refresh from previous patches made by Duncan Hare . I've contacted him and continue to work on this patch. This patch introduce a TCP stack with SACK. And a simple wget command to download images from http server. v1-v12: Made by Duncan, didn't tracked. v13: Fix some issues which is reviewed by Christian v14: Add options to enable/disable SACK. v15: Fix various syntax errors reviewed by Michal. Remove magic numbers. Use kernel-doc format. v16: Add more kernel-doc. Fix more double spaces. v17: Fix wget with address timeout issue reported by Ramon. v18: Add documentation for wget command. Ying-Chun Liu (PaulLiu) (3): net: Add TCP protocol net: Add wget application doc: cmd: wget: add documentation cmd/Kconfig | 7 + cmd/net.c | 13 + doc/usage/cmd/wget.rst | 61 ++++ doc/usage/index.rst | 1 + include/net.h | 38 ++- include/net/tcp.h | 312 ++++++++++++++++++ include/net/wget.h | 22 ++ net/Kconfig | 16 + net/Makefile | 2 + net/net.c | 36 +++ net/tcp.c | 720 +++++++++++++++++++++++++++++++++++++++++ net/wget.c | 428 ++++++++++++++++++++++++ 12 files changed, 1646 insertions(+), 10 deletions(-) create mode 100644 doc/usage/cmd/wget.rst create mode 100644 include/net/tcp.h create mode 100644 include/net/wget.h create mode 100644 net/tcp.c create mode 100644 net/wget.c