TianoCore EDK2 master
|
#include "Mtftp6Impl.h"
Go to the source code of this file.
Functions | |
EFI_STATUS | Mtftp6RrqSendAck (IN MTFTP6_INSTANCE *Instance, IN UINT16 BlockNum) |
EFI_STATUS | Mtftp6RrqSaveBlock (IN MTFTP6_INSTANCE *Instance, IN EFI_MTFTP6_PACKET *Packet, IN UINT32 Len, OUT NET_BUF **UdpPacket) |
EFI_STATUS | Mtftp6RrqHandleData (IN MTFTP6_INSTANCE *Instance, IN EFI_MTFTP6_PACKET *Packet, IN UINT32 Len, OUT NET_BUF **UdpPacket, OUT BOOLEAN *IsCompleted) |
BOOLEAN | Mtftp6RrqOackValid (IN MTFTP6_INSTANCE *Instance, IN MTFTP6_EXT_OPTION_INFO *ReplyInfo, IN MTFTP6_EXT_OPTION_INFO *RequestInfo) |
EFI_STATUS EFIAPI | Mtftp6RrqConfigMcastUdpIo (IN UDP_IO *McastIo, IN VOID *Context) |
EFI_STATUS | Mtftp6RrqHandleOack (IN MTFTP6_INSTANCE *Instance, IN EFI_MTFTP6_PACKET *Packet, IN UINT32 Len, OUT NET_BUF **UdpPacket, OUT BOOLEAN *IsCompleted) |
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 Rrq process functions implementation.
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file Mtftp6Rrq.c.
EFI_STATUS EFIAPI Mtftp6RrqConfigMcastUdpIo | ( | IN UDP_IO * | McastIo, |
IN VOID * | Context | ||
) |
Configure Udp6Io to receive a packet from a multicast address.
[in] | McastIo | The pointer to the mcast Udp6Io. |
[in] | Context | The pointer to the context. |
EFI_SUCCESS | The mcast Udp6Io was successfully configured. |
Others | Failed to configure the Udp6Io. |
Definition at line 382 of file Mtftp6Rrq.c.
EFI_STATUS Mtftp6RrqHandleData | ( | IN MTFTP6_INSTANCE * | Instance, |
IN EFI_MTFTP6_PACKET * | Packet, | ||
IN UINT32 | Len, | ||
OUT NET_BUF ** | UdpPacket, | ||
OUT BOOLEAN * | IsCompleted | ||
) |
Process the received data packets. It will save the block then send back an ACK if it is active.
[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 download has been completed. Otherwise, the download has not been completed. |
EFI_SUCCESS | The data packet was successfully processed. |
EFI_ABORTED | The download was aborted by the user. |
EFI_BUFFER_TOO_SMALL | The user-provided buffer is too small. |
Definition at line 212 of file Mtftp6Rrq.c.
EFI_STATUS Mtftp6RrqHandleOack | ( | IN MTFTP6_INSTANCE * | Instance, |
IN EFI_MTFTP6_PACKET * | Packet, | ||
IN UINT32 | Len, | ||
OUT NET_BUF ** | UdpPacket, | ||
OUT BOOLEAN * | IsCompleted | ||
) |
Process the OACK packet for Rrq.
[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 download has been completed. Otherwise, the download has not been completed. |
EFI_DEVICE_ERROR | Failed to create/start a multicast Udp6 child. |
EFI_TFTP_ERROR | An error happened during the process. |
EFI_SUCCESS | The OACK packet successfully processed. |
Definition at line 451 of file Mtftp6Rrq.c.
VOID EFIAPI Mtftp6RrqInput | ( | IN NET_BUF * | UdpPacket, |
IN UDP_END_POINT * | UdpEpt, | ||
IN EFI_STATUS | IoStatus, | ||
IN VOID * | Context | ||
) |
The packet process callback for Mtftp6 download.
[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 670 of file Mtftp6Rrq.c.
BOOLEAN Mtftp6RrqOackValid | ( | IN MTFTP6_INSTANCE * | Instance, |
IN MTFTP6_EXT_OPTION_INFO * | ReplyInfo, | ||
IN MTFTP6_EXT_OPTION_INFO * | RequestInfo | ||
) |
Validate whether the options received in the server's OACK packet is valid. The options are valid only if:
[in] | Instance | The pointer to the Mtftp6 instance. |
[in] | ReplyInfo | The pointer to options information in reply packet. |
[in] | RequestInfo | The pointer to requested options info. |
TRUE | If the option in the OACK is valid. |
FALSE | If the option is invalid. |
Definition at line 322 of file Mtftp6Rrq.c.
EFI_STATUS Mtftp6RrqSaveBlock | ( | IN MTFTP6_INSTANCE * | Instance, |
IN EFI_MTFTP6_PACKET * | Packet, | ||
IN UINT32 | Len, | ||
OUT NET_BUF ** | UdpPacket | ||
) |
Deliver the received data block to the user, which can be saved in the user provide buffer or through the CheckPacket callback.
[in] | Instance | The pointer to the Mtftp6 instance. |
[in] | Packet | The pointer to the received packet. |
[in] | Len | The packet length. |
[out] | UdpPacket | The net buf of the received packet. |
EFI_SUCCESS | The data was saved successfully. |
EFI_ABORTED | The user tells to abort by return an error through CheckPacket. |
EFI_BUFFER_TOO_SMALL | The user's buffer is too small, and buffer length is updated to the actual buffer size needed. |
Definition at line 85 of file Mtftp6Rrq.c.
EFI_STATUS Mtftp6RrqSendAck | ( | IN MTFTP6_INSTANCE * | Instance, |
IN UINT16 | BlockNum | ||
) |
Build and send a ACK packet for download.
[in] | Instance | The pointer to the Mtftp6 instance. |
[in] | BlockNum | The block number to be acked. |
EFI_OUT_OF_RESOURCES | Failed to allocate memory for the packet. |
EFI_SUCCESS | The ACK has been sent. |
Others | Failed to send the ACK. |
Definition at line 24 of file Mtftp6Rrq.c.
EFI_STATUS Mtftp6RrqStart | ( | IN MTFTP6_INSTANCE * | Instance, |
IN UINT16 | Operation | ||
) |
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.
[in] | Instance | The pointer to the Mtftp6 instance. |
[in] | Operation | The operation code of current packet. |
EFI_SUCCESS | The Mtftp6 is started to download. |
Others | Failed to start to download. |
Definition at line 905 of file Mtftp6Rrq.c.