|
EFI_STATUS | Mtftp6InitBlockRange (IN LIST_ENTRY *Head, IN UINT16 Start, IN UINT16 End) |
|
INTN | Mtftp6GetNextBlockNum (IN LIST_ENTRY *Head) |
|
VOID | Mtftp6SetLastBlockNum (IN LIST_ENTRY *Head, IN UINT16 Last) |
|
EFI_STATUS | Mtftp6RemoveBlockNum (IN LIST_ENTRY *Head, IN UINT16 Num, IN BOOLEAN Completed, OUT UINT64 *BlockCounter) |
|
EFI_STATUS | Mtftp6SendRequest (IN MTFTP6_INSTANCE *Instance, IN UINT16 Operation) |
|
EFI_STATUS | Mtftp6SendError (IN MTFTP6_INSTANCE *Instance, IN UINT16 ErrCode, IN UINT8 *ErrInfo) |
|
EFI_STATUS | Mtftp6TransmitPacket (IN MTFTP6_INSTANCE *Instance, IN NET_BUF *Packet) |
|
EFI_STATUS EFIAPI | Mtftp6CheckPacket (IN EFI_MTFTP6_PROTOCOL *This, IN EFI_MTFTP6_TOKEN *Token, IN UINT16 PacketLen, IN EFI_MTFTP6_PACKET *Packet) |
|
EFI_STATUS EFIAPI | Mtftp6ConfigDummyUdpIo (IN UDP_IO *UdpIo, IN VOID *Context) |
|
EFI_STATUS | Mtftp6ConfigUdpIo (IN UDP_IO *UdpIo, IN EFI_IPv6_ADDRESS *ServerIp, IN UINT16 ServerPort, IN EFI_IPv6_ADDRESS *LocalIp, IN UINT16 LocalPort) |
|
VOID | Mtftp6OperationClean (IN MTFTP6_INSTANCE *Instance, IN EFI_STATUS Result) |
|
EFI_STATUS | Mtftp6OperationStart (IN EFI_MTFTP6_PROTOCOL *This, IN EFI_MTFTP6_TOKEN *Token, IN UINT16 OpCode) |
|
VOID EFIAPI | Mtftp6OnTimerTick (IN EFI_EVENT Event, IN VOID *Context) |
|
VOID EFIAPI | Mtftp6WrqInput (IN NET_BUF *UdpPacket, IN UDP_END_POINT *UdpEpt, IN EFI_STATUS IoStatus, IN VOID *Context) |
|
EFI_STATUS | Mtftp6WrqStart (IN MTFTP6_INSTANCE *Instance, IN UINT16 Operation) |
|
VOID EFIAPI | Mtftp6RrqInput (IN NET_BUF *UdpPacket, IN UDP_END_POINT *UdpEpt, IN EFI_STATUS IoStatus, IN VOID *Context) |
|
EFI_STATUS | Mtftp6RrqStart (IN MTFTP6_INSTANCE *Instance, IN UINT16 Operation) |
|
Mtftp6 support functions declaration.
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file Mtftp6Support.h.
Initialize the block range for either RRQ or WRQ. RRQ and WRQ have different requirements for Start and End. For example, during startup, WRQ initializes its whole valid block range to [0, 0xffff]. This is because the server will send an ACK0 to inform the user to start the upload. When the client receives an ACK0, it will remove 0 from the range, get the next block number, which is 1, then upload the BLOCK1. For RRQ without option negotiation, the server will directly send us the BLOCK1 in response to the client's RRQ. When BLOCK1 is received, the client will remove it from the block range and send an ACK. It also works if there is option negotiation.
- Parameters
-
[in] | Head | The block range head to initialize. |
[in] | Start | The Start block number. |
[in] | End | The last block number. |
- Return values
-
EFI_OUT_OF_RESOURCES | Failed to allocate memory for initial block range. |
EFI_SUCCESS | The initial block range is created. |
Initialize the block range for either RRQ or WRQ. RRQ and WRQ have different requirements for Start and End. For example, during startup, WRQ initializes its whole valid block range to [0, 0xffff]. This is because the server will send an ACK0 to inform the user to start the upload. When the client receives an ACK0, it will remove 0 from the range, get the next block number, which is 1, then upload the BLOCK1. For RRQ without option negotiation, the server will directly send the BLOCK1 in response to the client's RRQ. When received BLOCK1, the client will remove it from the block range and send an ACK. It also works if there is option negotiation.
- Parameters
-
[in] | Head | The block range head to initialize. |
[in] | Start | The Start block number. |
[in] | End | The last block number. |
- Return values
-
EFI_OUT_OF_RESOURCES | Failed to allocate memory for initial block range. |
EFI_SUCCESS | The initial block range is created. |
Definition at line 64 of file Mtftp6Support.c.
Start the Mtftp6 instance to perform the operation, such as read file, write file, and read directory.
- Parameters
-
[in] | This | The MTFTP session |
[in] | Token | The token that encapsulates the user's request. |
[in] | OpCode | The operation to perform. |
- Return values
-
EFI_INVALID_PARAMETER | Some of the parameters are invalid. |
EFI_NOT_STARTED | The MTFTP session hasn't been configured. |
EFI_ALREADY_STARTED | There is pending operation for the session. |
EFI_SUCCESS | The operation was successfully started. |
Start the Mtftp6 instance to perform the operation, such as read file, write file, and read directory.
- Parameters
-
[in] | This | The MTFTP session. |
[in] | Token | The token than encapsules the user's request. |
[in] | OpCode | The operation to perform. |
- Return values
-
EFI_INVALID_PARAMETER | Some of the parameters are invalid. |
EFI_NOT_STARTED | The MTFTP session hasn't been configured. |
EFI_ALREADY_STARTED | There is pending operation for the session. |
EFI_SUCCESS | The operation is successfully started. |
Definition at line 984 of file Mtftp6Support.c.
Start the Mtftp6 instance to download. It first initializes some of the internal states then builds and sends an RRQ request packet. Finally, it starts receive for the downloading.
- Parameters
-
[in] | Instance | The pointer to the Mtftp6 instance. |
[in] | Operation | The operation code of current packet. |
- Return values
-
EFI_SUCCESS | The Mtftp6 was started to download. |
Others | Failed to start to download. |
Start the Mtftp6 instance to download. It first initializes some of the internal states, then builds and sends an RRQ request packet. Finally, it starts receive for the downloading.
- Parameters
-
[in] | Instance | The pointer to the Mtftp6 instance. |
[in] | Operation | The operation code of current packet. |
- Return values
-
EFI_SUCCESS | The Mtftp6 is started to download. |
Others | Failed to start to download. |
Definition at line 905 of file Mtftp6Rrq.c.
Start the Mtftp6 instance to upload. It will first init some states, then send the WRQ request packet, and start to receive the packet.
- Parameters
-
[in] | Instance | The pointer to the Mtftp6 instance. |
[in] | Operation | The operation code of current packet. |
- Return values
-
EFI_SUCCESS | The Mtftp6 was started to upload. |
Others | Failed to start to upload. |
Start the Mtftp6 instance to upload. It will first init some states, then send the WRQ request packet, and start to receive the packet.
- Parameters
-
[in] | Instance | The pointer to the Mtftp6 instance. |
[in] | Operation | The operation code of the current packet. |
- Return values
-
EFI_SUCCESS | The Mtftp6 was started to upload. |
Others | Failed to start to upload. |
Definition at line 561 of file Mtftp6Wrq.c.