]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.h
MdeModulePke/Mtftp4Dxe: Support windowsize in read request operation.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Mtftp4Dxe / Mtftp4Impl.h
index e24890cce82cfeeb8a77353496276df12d252e15..de304f4e707e94df9dd3b8af25476534b7a65dee 100644 (file)
@@ -8,6 +8,7 @@
   RFC2347 - TFTP Option Extension\r
   RFC2348 - TFTP Blocksize Option\r
   RFC2349 - TFTP Timeout Interval and Transfer Size Options\r
+  RFC7440 - TFTP Windowsize Option\r
 \r
 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
@@ -56,6 +57,7 @@ typedef struct _MTFTP4_PROTOCOL MTFTP4_PROTOCOL;
 #define MTFTP4_DEFAULT_TIMEOUT      3\r
 #define MTFTP4_DEFAULT_RETRY        5\r
 #define MTFTP4_DEFAULT_BLKSIZE      512\r
+#define MTFTP4_DEFAULT_WINDOWSIZE   1\r
 #define MTFTP4_TIME_TO_GETMAP       5\r
 \r
 #define MTFTP4_STATE_UNCONFIGED     0\r
@@ -121,6 +123,14 @@ struct _MTFTP4_PROTOCOL {
   UINT16                        LastBlock;\r
   LIST_ENTRY                    Blocks;\r
 \r
+  UINT16                        WindowSize;\r
+\r
+  //\r
+  // Record the total received block number and the already acked block number.\r
+  //\r
+  UINT64                        TotalBlock;\r
+  UINT64                        AckedBlock;\r
+\r
   //\r
   // The server's communication end point: IP and two ports. one for\r
   // initial request, one for its selected port.\r