55 if ((This ==
NULL) || (ModeData ==
NULL)) {
56 return EFI_INVALID_PARAMETER;
59 OldTpl =
gBS->RaiseTPL (TPL_CALLBACK);
60 Instance = MTFTP6_INSTANCE_FROM_THIS (This);
65 if (Instance->Config !=
NULL) {
67 &ModeData->ConfigData,
73 &ModeData->ConfigData,
81 ModeData->SupportedOptionCount = MTFTP6_SUPPORTED_OPTIONS_NUM;
82 ModeData->SupportedOptions = (UINT8 **)mMtftp6SupportedOptions;
84 gBS->RestoreTPL (OldTpl);
142 return EFI_INVALID_PARAMETER;
146 return EFI_INVALID_PARAMETER;
149 OldTpl =
gBS->RaiseTPL (TPL_CALLBACK);
150 Instance = MTFTP6_INSTANCE_FROM_THIS (This);
151 Service = Instance->Service;
154 if (MtftpConfigData ==
NULL) {
160 Instance->Config =
NULL;
165 if (Instance->Config !=
NULL) {
166 Status = EFI_ACCESS_DENIED;
175 if (Instance->Config ==
NULL) {
176 Status = EFI_OUT_OF_RESOURCES;
186 if (Instance->UdpIo ==
NULL) {
194 if (Instance->UdpIo !=
NULL) {
195 Status =
gBS->OpenProtocol (
196 Instance->UdpIo->UdpHandle,
197 &gEfiUdp6ProtocolGuid,
201 EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
203 if (EFI_ERROR (Status)) {
209 if (Instance->UdpIo ==
NULL) {
210 Status = EFI_OUT_OF_RESOURCES;
241 Udp6 = Instance->UdpIo->Protocol.Udp6;
242 Status = Udp6->Configure (Udp6, &Udp6Cfg);
244 if (EFI_ERROR (Status)) {
250 if (EFI_ERROR (Status)) {
251 if (Instance->Config !=
NULL) {
253 Instance->Config =
NULL;
256 if (Instance->UdpIo !=
NULL) {
258 Instance->UdpIo =
NULL;
262 gBS->RestoreTPL (OldTpl);
326 IN UINT8 *ModeStr OPTIONAL,
327 IN UINT8 OptionCount,
329 OUT UINT32 *PacketLength,
337 if ((This ==
NULL) ||
338 (Filename ==
NULL) ||
339 (PacketLength ==
NULL) ||
340 ((OptionCount != 0) && (OptionList ==
NULL)) ||
344 return EFI_INVALID_PARAMETER;
347 if (Packet !=
NULL) {
353 Context.Packet = Packet;
354 Context.PacketLen = PacketLength;
379 if (Status == EFI_ABORTED) {
383 return Context.Status;
425 OUT UINT32 *OptionCount,
430 return EFI_INVALID_PARAMETER;
623 return EFI_INVALID_PARAMETER;
626 Instance = MTFTP6_INSTANCE_FROM_THIS (This);
631 if (Instance->Config ==
NULL) {
632 return EFI_NOT_STARTED;
635 Udp6 = Instance->UdpIo->Protocol.Udp6;
637 return Udp6->Poll (Udp6);
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
#define EFI_MTFTP6_OPCODE_WRQ
The MTFTPv6 packet is a write request.
#define EFI_MTFTP6_OPCODE_RRQ
The MTFTPv6 packet is a read request.
#define EFI_MTFTP6_OPCODE_DIR
The MTFTPv6 packet is a directory query packet.
EFI_STATUS EFIAPI EfiMtftp6GetModeData(IN EFI_MTFTP6_PROTOCOL *This, OUT EFI_MTFTP6_MODE_DATA *ModeData)
EFI_STATUS EFIAPI EfiMtftp6WriteFile(IN EFI_MTFTP6_PROTOCOL *This, IN EFI_MTFTP6_TOKEN *Token)
EFI_STATUS EFIAPI EfiMtftp6GetInfo(IN EFI_MTFTP6_PROTOCOL *This, IN EFI_MTFTP6_OVERRIDE_DATA *OverrideData OPTIONAL, IN UINT8 *Filename, IN UINT8 *ModeStr OPTIONAL, IN UINT8 OptionCount, IN EFI_MTFTP6_OPTION *OptionList OPTIONAL, OUT UINT32 *PacketLength, OUT EFI_MTFTP6_PACKET **Packet OPTIONAL)
EFI_STATUS EFIAPI EfiMtftp6ReadDirectory(IN EFI_MTFTP6_PROTOCOL *This, IN EFI_MTFTP6_TOKEN *Token)
EFI_STATUS EFIAPI EfiMtftp6Configure(IN EFI_MTFTP6_PROTOCOL *This, IN EFI_MTFTP6_CONFIG_DATA *MtftpConfigData OPTIONAL)
EFI_STATUS EFIAPI EfiMtftp6ParseOptions(IN EFI_MTFTP6_PROTOCOL *This, IN UINT32 PacketLen, IN EFI_MTFTP6_PACKET *Packet, OUT UINT32 *OptionCount, OUT EFI_MTFTP6_OPTION **OptionList OPTIONAL)
EFI_STATUS EFIAPI EfiMtftp6Poll(IN EFI_MTFTP6_PROTOCOL *This)
EFI_STATUS EFIAPI EfiMtftp6ReadFile(IN EFI_MTFTP6_PROTOCOL *This, IN EFI_MTFTP6_TOKEN *Token)
EFI_STATUS Mtftp6ParseStart(IN EFI_MTFTP6_PACKET *Packet, IN UINT32 PacketLen, IN OUT UINT32 *OptionCount, OUT EFI_MTFTP6_OPTION **OptionList OPTIONAL)
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 Mtftp6OperationStart(IN EFI_MTFTP6_PROTOCOL *This, IN EFI_MTFTP6_TOKEN *Token, IN UINT16 OpCode)
VOID Mtftp6OperationClean(IN MTFTP6_INSTANCE *Instance, IN EFI_STATUS Result)
BOOLEAN EFIAPI NetIp6IsValidUnicast(IN EFI_IPv6_ADDRESS *Ip6)
EFI_STATUS EFIAPI UdpIoFreeIo(IN UDP_IO *UdpIo)
UDP_IO *EFIAPI UdpIoCreateIo(IN EFI_HANDLE Controller, IN EFI_HANDLE ImageHandle, IN UDP_IO_CONFIG Configure, IN UINT8 UdpVersion, IN VOID *Context)
EFI_MTFTP6_PACKET_NEEDED PacketNeeded
EFI_MTFTP6_TIMEOUT_CALLBACK TimeoutCallback
EFI_MTFTP6_OPTION * OptionList
EFI_MTFTP6_OVERRIDE_DATA * OverrideData
EFI_MTFTP6_CHECK_PACKET CheckPacket
EFI_IPv6_ADDRESS StationIp
EFI_IPv6_ADDRESS ServerIp
BOOLEAN AcceptPromiscuous
BOOLEAN AllowDuplicatePort
EFI_IPv6_ADDRESS RemoteAddress
EFI_IPv6_ADDRESS StationAddress