]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/Mtftp6Dxe/Mtftp6Option.h
NetworkPkg/Mtftp6Dxe: Support windowsize in read request operation.
[mirror_edk2.git] / NetworkPkg / Mtftp6Dxe / Mtftp6Option.h
index 8e2671fa218ed2712498be045be27a9ef0a4c271..08aa45ff633a0615d07287282c4fb0c6e2ed5ff7 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Mtftp6 option parse functions 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
@@ -26,7 +26,7 @@
 #include <Library/MemoryAllocationLib.h>\r
 #include <Library/UefiRuntimeServicesTableLib.h>\r
 \r
-#define MTFTP6_SUPPORTED_OPTIONS_NUM  4\r
+#define MTFTP6_SUPPORTED_OPTIONS_NUM  5\r
 #define MTFTP6_OPCODE_LEN             2\r
 #define MTFTP6_ERRCODE_LEN            2\r
 #define MTFTP6_BLKNO_LEN              2\r
 #define MTFTP6_OPT_TIMEOUT_BIT        0x02\r
 #define MTFTP6_OPT_TSIZE_BIT          0x04\r
 #define MTFTP6_OPT_MCAST_BIT          0x08\r
+#define MTFTP6_OPT_WINDOWSIZE_BIT     0X10\r
 \r
 extern CHAR8 *mMtftp6SupportedOptions[MTFTP6_SUPPORTED_OPTIONS_NUM];\r
 \r
 typedef struct {\r
   UINT16                    BlkSize;\r
+  UINT16                    WindowSize;\r
   UINT8                     Timeout;\r
   UINT32                    Tsize;\r
   EFI_IPv6_ADDRESS          McastIp;\r
@@ -76,11 +78,12 @@ Mtftp6ParseMcastOption (
   @param[in]  Count         The num of the extension options.\r
   @param[in]  IsRequest     If FALSE, the extension options is included\r
                             by a request packet.\r
+  @param[in]  Operation     The current performed operation.\r
   @param[in]  ExtInfo       The pointer to the option information to be filled.\r
 \r
-  @retval EFI_SUCCESS            Parse the multi-cast option successfully.\r
-  @retval EFI_INVALID_PARAMETER  An option is malformatted.\r
-  @retval EFI_UNSUPPORTED        An option is not supported.\r
+  @retval EFI_SUCCESS            Parse the multicast option successfully.\r
+  @retval EFI_INVALID_PARAMETER  There is one option is malformatted at least.\r
+  @retval EFI_UNSUPPORTED        There is one option is not supported at least.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -88,6 +91,7 @@ Mtftp6ParseExtensionOption (
   IN EFI_MTFTP6_OPTION        *Options,\r
   IN UINT32                   Count,\r
   IN BOOLEAN                  IsRequest,\r
+  IN UINT16                   Operation,\r
   IN MTFTP6_EXT_OPTION_INFO   *ExtInfo\r
   );\r
 \r