]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/Mtftp6Dxe/Mtftp6Impl.h
Maintainers.txt: update mailing list information
[mirror_edk2.git] / NetworkPkg / Mtftp6Dxe / Mtftp6Impl.h
index bf924a980c477756a5162e8406ff32af42f4f032..2c557b1928f633b9ed88e915515ed92d08168750 100644 (file)
@@ -1,15 +1,9 @@
 /** @file\r
   Mtftp6 internal data structure and definition declaration.\r
 \r
-  Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved. <BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved. <BR>\r
 \r
-  This program and the accompanying materials\r
-  are licensed and made available under the terms and conditions of the BSD License\r
-  which accompanies this distribution.  The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php.\r
-\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -29,6 +23,7 @@
 #include <Library/UefiLib.h>\r
 #include <Library/BaseLib.h>\r
 #include <Library/NetLib.h>\r
+#include <Library/PrintLib.h>\r
 \r
 typedef struct _MTFTP6_SERVICE  MTFTP6_SERVICE;\r
 typedef struct _MTFTP6_INSTANCE MTFTP6_INSTANCE;\r
@@ -45,6 +40,7 @@ typedef struct _MTFTP6_INSTANCE MTFTP6_INSTANCE;
 #define MTFTP6_GET_MAPPING_TIMEOUT     3\r
 #define MTFTP6_DEFAULT_MAX_RETRY       5\r
 #define MTFTP6_DEFAULT_BLK_SIZE        512\r
+#define MTFTP6_DEFAULT_WINDOWSIZE      1\r
 #define MTFTP6_TICK_PER_SECOND         10000000U\r
 \r
 #define MTFTP6_SERVICE_FROM_THIS(a)    CR (a, MTFTP6_SERVICE, ServiceBinding, MTFTP6_SERVICE_SIGNATURE)\r
@@ -76,6 +72,20 @@ struct _MTFTP6_INSTANCE {
   UINT16                        LastBlk;\r
   LIST_ENTRY                    BlkList;\r
 \r
+  UINT16                        Operation;\r
+\r
+  UINT16                        WindowSize;\r
+\r
+  //\r
+  // Record the total received and saved block number.\r
+  //\r
+  UINT64                        TotalBlock;\r
+\r
+  //\r
+  // Record the acked block number.\r
+  //\r
+  UINT64                        AckedBlock;\r
+\r
   EFI_IPv6_ADDRESS              ServerIp;\r
   UINT16                        ServerCmdPort;\r
   UINT16                        ServerDataPort;\r
@@ -94,7 +104,7 @@ struct _MTFTP6_INSTANCE {
   EFI_TPL                       OldTpl;\r
   BOOLEAN                       IsTransmitted;\r
   BOOLEAN                       IsMaster;\r
-  BOOLEAN                       InDestory;\r
+  BOOLEAN                       InDestroy;\r
 };\r
 \r
 //\r
@@ -117,9 +127,14 @@ struct _MTFTP6_SERVICE {
   // mtftp driver and udp driver.\r
   //\r
   UDP_IO                        *DummyUdpIo;\r
-  BOOLEAN                       InDestory;\r
 };\r
 \r
+typedef struct {\r
+  EFI_SERVICE_BINDING_PROTOCOL  *ServiceBinding;\r
+  UINTN                         NumberOfChildren;\r
+  EFI_HANDLE                    *ChildHandleBuffer;\r
+} MTFTP6_DESTROY_CHILD_IN_HANDLE_BUF_CONTEXT;\r
+\r
 /**\r
   Returns the current operating mode data for the MTFTP6 instance.\r
 \r
@@ -200,8 +215,8 @@ EfiMtftp6Configure (
   @param[in]  OverrideData       Data that is used to override the existing parameters. If NULL, the\r
                                  default parameters that were set in the EFI_MTFTP6_PROTOCOL.Configure()\r
                                  function are used.\r
-  @param[in]  Filename           Pointer to ASCIIZ file name string.\r
-  @param[in]  ModeStr            Pointer to ASCIIZ mode string. If NULL, octet will be used\r
+  @param[in]  Filename           Pointer to null-terminated ASCII file name string.\r
+  @param[in]  ModeStr            Pointer to null-terminated ASCII mode string. If NULL, octet will be used\r
   @param[in]  OptionCount        Number of option/value string pairs in OptionList.\r
   @param[in]  OptionList         Pointer to array of option/value string pairs. Ignored if\r
                                  OptionCount is zero.\r