TianoCore EDK2 master
|
#include "Mtftp6Impl.h"
Go to the source code of this file.
Functions | |
EFI_STATUS | Mtftp6WrqSendBlock (IN MTFTP6_INSTANCE *Instance, IN UINT16 BlockNum) |
EFI_STATUS | Mtftp6WrqHandleAck (IN MTFTP6_INSTANCE *Instance, IN EFI_MTFTP6_PACKET *Packet, IN UINT32 Len, OUT NET_BUF **UdpPacket, OUT BOOLEAN *IsCompleted) |
BOOLEAN | Mtftp6WrqOackValid (IN MTFTP6_EXT_OPTION_INFO *ReplyInfo, IN MTFTP6_EXT_OPTION_INFO *RequestInfo) |
EFI_STATUS | Mtftp6WrqHandleOack (IN MTFTP6_INSTANCE *Instance, IN EFI_MTFTP6_PACKET *Packet, IN UINT32 Len, OUT NET_BUF **UdpPacket, OUT BOOLEAN *IsCompleted) |
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) |
Mtftp6 Wrq process functions implementation.
Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file Mtftp6Wrq.c.
EFI_STATUS Mtftp6WrqHandleAck | ( | IN MTFTP6_INSTANCE * | Instance, |
IN EFI_MTFTP6_PACKET * | Packet, | ||
IN UINT32 | Len, | ||
OUT NET_BUF ** | UdpPacket, | ||
OUT BOOLEAN * | IsCompleted | ||
) |
Function to handle received ACK packet. If the ACK number matches the expected block number, with more data pending, send the next block. Otherwise, tell the caller that we are done.
[in] | Instance | The pointer to the Mtftp6 instance. |
[in] | Packet | The pointer to the received packet. |
[in] | Len | The length of the packet. |
[out] | UdpPacket | The net buf of received packet. |
[out] | IsCompleted | If TRUE, the upload has been completed. Otherwise, the upload has not been completed. |
EFI_SUCCESS | The ACK packet successfully processed. |
EFI_TFTP_ERROR | The block number loops back. |
Others | Failed to transmit the next data packet. |
Definition at line 137 of file Mtftp6Wrq.c.
EFI_STATUS Mtftp6WrqHandleOack | ( | IN MTFTP6_INSTANCE * | Instance, |
IN EFI_MTFTP6_PACKET * | Packet, | ||
IN UINT32 | Len, | ||
OUT NET_BUF ** | UdpPacket, | ||
OUT BOOLEAN * | IsCompleted | ||
) |
Process the OACK packet for Wrq.
[in] | Instance | The pointer to the Mtftp6 instance. |
[in] | Packet | The pointer to the received packet. |
[in] | Len | The length of the packet. |
[out] | UdpPacket | The net buf of received packet. |
[out] | IsCompleted | If TRUE, the upload has been completed. Otherwise, the upload has not been completed. |
EFI_SUCCESS | The OACK packet successfully processed. |
EFI_TFTP_ERROR | An TFTP communication error happened. |
Others | Failed to process the OACK packet. |
Definition at line 270 of file Mtftp6Wrq.c.
VOID EFIAPI Mtftp6WrqInput | ( | IN NET_BUF * | UdpPacket, |
IN UDP_END_POINT * | UdpEpt, | ||
IN EFI_STATUS | IoStatus, | ||
IN VOID * | Context | ||
) |
The packet process callback for Mtftp6 upload.
[in] | UdpPacket | The pointer to the packet received. |
[in] | UdpEpt | The pointer to the Udp6 access point. |
[in] | IoStatus | The status from Udp6 instance. |
[in] | Context | The pointer to the context. |
Definition at line 372 of file Mtftp6Wrq.c.
BOOLEAN Mtftp6WrqOackValid | ( | IN MTFTP6_EXT_OPTION_INFO * | ReplyInfo, |
IN MTFTP6_EXT_OPTION_INFO * | RequestInfo | ||
) |
Check whether the received OACK is valid. The OACK is valid only if:
[in] | ReplyInfo | The pointer to options information in reply packet. |
[in] | RequestInfo | The pointer to requested options information. |
TRUE | If the option in OACK is valid. |
FALSE | If the option is invalid. |
Definition at line 228 of file Mtftp6Wrq.c.
EFI_STATUS Mtftp6WrqSendBlock | ( | IN MTFTP6_INSTANCE * | Instance, |
IN UINT16 | BlockNum | ||
) |
Build and send a Mtftp6 data packet for upload.
[in] | Instance | The pointer to the Mtftp6 instance. |
[in] | BlockNum | The block num to be sent. |
EFI_OUT_OF_RESOURCES | Failed to allocate memory for the packet. |
EFI_SUCCESS | The data packet was sent. |
EFI_ABORTED | The user aborted this process. |
Definition at line 24 of file Mtftp6Wrq.c.
EFI_STATUS Mtftp6WrqStart | ( | IN MTFTP6_INSTANCE * | Instance, |
IN UINT16 | Operation | ||
) |
Start the Mtftp6 instance to upload. It will first init some states, then send the WRQ request packet, and start to receive the packet.
[in] | Instance | The pointer to the Mtftp6 instance. |
[in] | Operation | The operation code of the current packet. |
EFI_SUCCESS | The Mtftp6 was started to upload. |
Others | Failed to start to upload. |
Definition at line 561 of file Mtftp6Wrq.c.