]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Support.h
BaseTools:Change the path of the file that Binary Cache
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Mtftp4Dxe / Mtftp4Support.h
index 802e3867db810472b32fd8c60da60bc1bd6042ea..cfa7582faa4b9b4cb3a24bbdfb3b8598ade9b811 100644 (file)
@@ -1,14 +1,8 @@
 /** @file\r
   Support routines for MTFTP.\r
 /** @file\r
   Support routines for MTFTP.\r
-  \r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\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<BR>\r
 \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
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
 \r
 **/\r
 \r
@@ -30,16 +24,16 @@ typedef struct {
 \r
 \r
 /**\r
 \r
 \r
 /**\r
-  Initialize the block range for either RRQ or WRQ. \r
-  \r
-  RRQ and WRQ have different requirements for Start and End. \r
-  For example, during start up, WRQ initializes its whole valid block range \r
-  to [0, 0xffff]. This is bacause the server will send us a ACK0 to inform us \r
-  to start the upload. When the client received ACK0, it will remove 0 from the \r
+  Initialize the block range for either RRQ or WRQ.\r
+\r
+  RRQ and WRQ have different requirements for Start and End.\r
+  For example, during start up, WRQ initializes its whole valid block range\r
+  to [0, 0xffff]. This is bacause the server will send us a ACK0 to inform us\r
+  to start the upload. When the client received ACK0, it will remove 0 from the\r
   range, get the next block number, which is 1, then upload the BLOCK1. For RRQ\r
   range, get the next block number, which is 1, then upload the BLOCK1. For RRQ\r
-  without option negotiation, the server will directly send us the BLOCK1 in \r
-  response to the client's RRQ. When received BLOCK1, the client will remove \r
-  it from the block range and send an ACK. It also works if there is option \r
+  without option negotiation, the server will directly send us the BLOCK1 in\r
+  response to the client's RRQ. When received BLOCK1, the client will remove\r
+  it from the block range and send an ACK. It also works if there is option\r
   negotiation.\r
 \r
   @param  Head                  The block range head to initialize\r
   negotiation.\r
 \r
   @param  Head                  The block range head to initialize\r
@@ -62,7 +56,7 @@ Mtftp4InitBlockRange (
 \r
   @param  Head                  The block range head\r
 \r
 \r
   @param  Head                  The block range head\r
 \r
-  @return The first valid block number, -1 if the block range is empty. \r
+  @return The first valid block number, -1 if the block range is empty.\r
 \r
 **/\r
 INTN\r
 \r
 **/\r
 INTN\r
@@ -71,10 +65,10 @@ Mtftp4GetNextBlockNum (
   );\r
 \r
 /**\r
   );\r
 \r
 /**\r
-  Set the last block number of the block range list. \r
-  \r
+  Set the last block number of the block range list.\r
+\r
   It will remove all the blocks after the Last. MTFTP initialize the block range\r
   It will remove all the blocks after the Last. MTFTP initialize the block range\r
-  to the maximum possible range, such as [0, 0xffff] for WRQ. When it gets the \r
+  to the maximum possible range, such as [0, 0xffff] for WRQ. When it gets the\r
   last block number, it will call this function to set the last block number.\r
 \r
   @param  Head                  The block range list\r
   last block number, it will call this function to set the last block number.\r
 \r
   @param  Head                  The block range list\r
@@ -92,8 +86,8 @@ Mtftp4SetLastBlockNum (
 \r
   @param  Head                  The block range list to remove from\r
   @param  Num                   The block number to remove\r
 \r
   @param  Head                  The block range list to remove from\r
   @param  Num                   The block number to remove\r
-  @param  Completed             Wether Num is the last block number\r
-  @param  TotalBlock            The continuous block number in all \r
+  @param  Completed             Whether Num is the last block number.\r
+  @param  BlockCounter          The continuous block counter instead of the value after roll-over.\r
 \r
   @retval EFI_NOT_FOUND         The block number isn't in the block range list\r
   @retval EFI_SUCCESS           The block number has been removed from the list\r
 \r
   @retval EFI_NOT_FOUND         The block number isn't in the block range list\r
   @retval EFI_SUCCESS           The block number has been removed from the list\r
@@ -105,7 +99,7 @@ Mtftp4RemoveBlockNum (
   IN LIST_ENTRY             *Head,\r
   IN UINT16                 Num,\r
   IN BOOLEAN                Completed,\r
   IN LIST_ENTRY             *Head,\r
   IN UINT16                 Num,\r
   IN BOOLEAN                Completed,\r
-  OUT UINT64                *TotalBlock\r
+  OUT UINT64                *BlockCounter\r
   );\r
 \r
 /**\r
   );\r
 \r
 /**\r
@@ -120,10 +114,10 @@ Mtftp4SetTimeout (
   );\r
 \r
 /**\r
   );\r
 \r
 /**\r
-  Send the packet for the instance. \r
-  \r
-  It will first save a reference to the packet for later retransmission. \r
-  Then determine the destination port, listen port for requests, and connected \r
+  Send the packet for the instance.\r
+\r
+  It will first save a reference to the packet for later retransmission.\r
+  Then determine the destination port, listen port for requests, and connected\r
   port for others. At last, send the packet out.\r
 \r
   @param  Instance              The Mtftp instance\r
   port for others. At last, send the packet out.\r
 \r
   @param  Instance              The Mtftp instance\r
@@ -158,7 +152,7 @@ Mtftp4SendRequest (
   Build then send an error message.\r
 \r
   @param  Instance              The MTFTP session\r
   Build then send an error message.\r
 \r
   @param  Instance              The MTFTP session\r
-  @param  ErrCode               The error code  \r
+  @param  ErrCode               The error code\r
   @param  ErrInfo               The error message\r
 \r
   @retval EFI_OUT_OF_RESOURCES  Failed to allocate memory for the error packet\r
   @param  ErrInfo               The error message\r
 \r
   @retval EFI_OUT_OF_RESOURCES  Failed to allocate memory for the error packet\r
@@ -173,18 +167,19 @@ Mtftp4SendError (
   IN UINT8                  *ErrInfo\r
   );\r
 \r
   IN UINT8                  *ErrInfo\r
   );\r
 \r
-/**\r
-  Retransmit the last packet for the instance.\r
 \r
 \r
-  @param  Instance              The Mtftp instance\r
+/**\r
+  The timer ticking function in TPL_NOTIFY level for the Mtftp service instance.\r
 \r
 \r
-  @retval EFI_SUCCESS           The last packet is retransmitted.\r
-  @retval Others                Failed to retransmit.\r
+  @param  Event                 The ticking event\r
+  @param  Context               The Mtftp service instance\r
 \r
 **/\r
 \r
 **/\r
-EFI_STATUS\r
-Mtftp4Retransmit (\r
-  IN MTFTP4_PROTOCOL        *Instance\r
+VOID\r
+EFIAPI\r
+Mtftp4OnTimerTickNotifyLevel (\r
+  IN EFI_EVENT              Event,\r
+  IN VOID                   *Context\r
   );\r
 \r
 /**\r
   );\r
 \r
 /**\r