2 This EFI_MTFTP6_PROTOCOL interface implementation.
4 It supports the following RFCs:
5 RFC1350 - THE TFTP PROTOCOL (REVISION 2)
6 RFC2090 - TFTP Multicast Option
7 RFC2347 - TFTP Option Extension
8 RFC2348 - TFTP Blocksize Option
9 RFC2349 - TFTP Timeout Interval and Transfer Size Options
11 Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
13 This program and the accompanying materials
14 are licensed and made available under the terms and conditions of the BSD License
15 which accompanies this distribution. The full text of the license may be found at
16 http://opensource.org/licenses/bsd-license.php.
18 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
19 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
23 #include "Mtftp6Impl.h"
25 EFI_MTFTP6_PROTOCOL gMtftp6ProtocolTemplate
= {
29 EfiMtftp6ParseOptions
,
32 EfiMtftp6ReadDirectory
,
37 Returns the current operating mode data for the MTFTP6 instance.
39 The GetModeData() function returns the current operating mode and
40 cached data packet for the MTFTP6 instance.
42 @param[in] This Pointer to the EFI_MTFTP6_PROTOCOL instance.
43 @param[out] ModeData The buffer in which the EFI MTFTPv6 Protocol driver mode
46 @retval EFI_SUCCESS The configuration data was returned successfully.
47 @retval EFI_OUT_OF_RESOURCES The required mode data could not be allocated.
48 @retval EFI_INVALID_PARAMETER This is NULL or ModeData is NULL.
53 EfiMtftp6GetModeData (
54 IN EFI_MTFTP6_PROTOCOL
*This
,
55 OUT EFI_MTFTP6_MODE_DATA
*ModeData
58 MTFTP6_INSTANCE
*Instance
;
61 if (This
== NULL
|| ModeData
== NULL
) {
62 return EFI_INVALID_PARAMETER
;
65 OldTpl
= gBS
->RaiseTPL (TPL_CALLBACK
);
66 Instance
= MTFTP6_INSTANCE_FROM_THIS (This
);
69 // Copy back the configure data if the instance already configured.
71 if (Instance
->Config
!= NULL
) {
73 &ModeData
->ConfigData
,
75 sizeof (EFI_MTFTP6_CONFIG_DATA
)
79 &ModeData
->ConfigData
,
80 sizeof (EFI_MTFTP6_CONFIG_DATA
)
85 // Set the current support options in mode data.
87 ModeData
->SupportedOptionCount
= MTFTP6_SUPPORTED_OPTIONS_NUM
;
88 ModeData
->SupportedOptions
= (UINT8
**) mMtftp6SupportedOptions
;
90 gBS
->RestoreTPL (OldTpl
);
97 Initializes, changes, or resets the default operational setting for
98 this EFI MTFTPv6 Protocol driver instance.
100 The Configure() function is used to set and change the configuration
101 data for this EFI MTFTPv6 Protocol driver instance. The configuration
102 data can be reset to startup defaults by calling Configure() with
103 MtftpConfigData set to NULL. Whenever the instance is reset, any
104 pending operation is aborted. By changing the EFI MTFTPv6 Protocol
105 driver instance configuration data, the client can connect to
106 different MTFTPv6 servers. The configuration parameters in
107 MtftpConfigData are used as the default parameters in later MTFTPv6
108 operations and can be overridden in later operations.
110 @param[in] This Pointer to the EFI_MTFTP6_PROTOCOL instance.
111 @param[in] MtftpConfigData Pointer to the configuration data structure.
113 @retval EFI_SUCCESS The EFI MTFTPv6 Protocol instance was configured successfully.
114 @retval EFI_INVALID_PARAMETER One or more following conditions are TRUE:
116 - MtftpConfigData.StationIp is neither zero nor one
117 of the configured IP addresses in the underlying IPv6 driver.
118 - MtftpCofigData.ServerIp is not a valid IPv6 unicast address.
119 Note: It does not match the UEFI 2.3 Specification.
120 @retval EFI_ACCESS_DENIED - The configuration could not be changed at this time because there
121 is some MTFTP background operation in progress.
122 - MtftpCofigData.LocalPort is already in use.
123 Note: It does not match the UEFI 2.3 Specification.
124 @retval EFI_NO_MAPPING The underlying IPv6 driver was responsible for choosing a source
125 address for this instance, but no source address was available for use.
126 @retval EFI_OUT_OF_RESOURCES The EFI MTFTPv6 Protocol driver instance data could not be
128 Note: It is not defined in the UEFI 2.3 Specification.
129 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. The EFI
130 MTFTPv6 Protocol driver instance is not configured.
131 Note: It is not defined in the UEFI 2.3 Specification.
137 IN EFI_MTFTP6_PROTOCOL
*This
,
138 IN EFI_MTFTP6_CONFIG_DATA
*MtftpConfigData OPTIONAL
141 MTFTP6_SERVICE
*Service
;
142 MTFTP6_INSTANCE
*Instance
;
143 EFI_UDP6_PROTOCOL
*Udp6
;
144 EFI_UDP6_CONFIG_DATA Udp6Cfg
;
149 return EFI_INVALID_PARAMETER
;
152 if (MtftpConfigData
!= NULL
&& !NetIp6IsValidUnicast (&MtftpConfigData
->ServerIp
)) {
153 return EFI_INVALID_PARAMETER
;
156 OldTpl
= gBS
->RaiseTPL (TPL_CALLBACK
);
157 Instance
= MTFTP6_INSTANCE_FROM_THIS (This
);
158 Service
= Instance
->Service
;
159 Status
= EFI_SUCCESS
;
161 if (MtftpConfigData
== NULL
) {
163 // Configure the instance as NULL to abort the current session.
165 Mtftp6OperationClean (Instance
, EFI_ABORTED
);
166 FreePool (Instance
->Config
);
167 Instance
->Config
= NULL
;
170 // It's not allowed to configure one instance twice without configure null.
172 if (Instance
->Config
!= NULL
) {
173 Status
= EFI_ACCESS_DENIED
;
177 // Allocate the configure buffer of the instance and store the user's data.
179 Instance
->Config
= AllocateZeroPool (sizeof (EFI_MTFTP6_CONFIG_DATA
));
181 if (Instance
->Config
== NULL
) {
182 Status
= EFI_OUT_OF_RESOURCES
;
186 CopyMem (Instance
->Config
, MtftpConfigData
, sizeof (EFI_MTFTP6_CONFIG_DATA
));
189 // Don't configure the udpio here because each operation might override
190 // the configuration, so delay udpio configuration in each operation.
192 if (Instance
->UdpIo
== NULL
) {
193 Instance
->UdpIo
= UdpIoCreateIo (
196 Mtftp6ConfigDummyUdpIo
,
200 if (Instance
->UdpIo
!= NULL
) {
201 Status
= gBS
->OpenProtocol (
202 Instance
->UdpIo
->UdpHandle
,
203 &gEfiUdp6ProtocolGuid
,
207 EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
209 if (EFI_ERROR (Status
)) {
215 if (Instance
->UdpIo
== NULL
) {
216 Status
= EFI_OUT_OF_RESOURCES
;
221 // Continue to configure the downside Udp6 instance by user's data.
223 ZeroMem (&Udp6Cfg
, sizeof (EFI_UDP6_CONFIG_DATA
));
225 Udp6Cfg
.AcceptPromiscuous
= FALSE
;
226 Udp6Cfg
.AcceptAnyPort
= FALSE
;
227 Udp6Cfg
.AllowDuplicatePort
= FALSE
;
228 Udp6Cfg
.TrafficClass
= 0;
229 Udp6Cfg
.HopLimit
= 128;
230 Udp6Cfg
.ReceiveTimeout
= 0;
231 Udp6Cfg
.TransmitTimeout
= 0;
232 Udp6Cfg
.StationPort
= Instance
->Config
->LocalPort
;
233 Udp6Cfg
.RemotePort
= Instance
->Config
->InitialServerPort
;
236 &Udp6Cfg
.StationAddress
,
237 &Instance
->Config
->StationIp
,
238 sizeof(EFI_IPv6_ADDRESS
)
242 &Udp6Cfg
.RemoteAddress
,
243 &Instance
->Config
->ServerIp
,
244 sizeof (EFI_IPv6_ADDRESS
)
247 Udp6
= Instance
->UdpIo
->Protocol
.Udp6
;
248 Status
= Udp6
->Configure (Udp6
, &Udp6Cfg
);
250 if (EFI_ERROR (Status
)) {
256 if (EFI_ERROR (Status
)) {
257 if (Instance
->Config
!= NULL
) {
258 FreePool (Instance
->Config
);
259 Instance
->Config
= NULL
;
261 if (Instance
->UdpIo
!= NULL
) {
262 UdpIoFreeIo (Instance
->UdpIo
);
263 Instance
->UdpIo
= NULL
;
266 gBS
->RestoreTPL (OldTpl
);
272 Get the information of the download from the server.
274 The GetInfo() function assembles an MTFTPv6 request packet
275 with options, sends it to the MTFTPv6 server, and may return
276 an MTFTPv6 OACK, MTFTPv6 ERROR, or ICMP ERROR packet. Retries
277 occur only if no response packets are received from the MTFTPv6
278 server before the timeout expires.
280 @param[in] This Pointer to the EFI_MTFTP6_PROTOCOL instance.
281 @param[in] OverrideData Data that is used to override the existing parameters. If NULL, the
282 default parameters that were set in the EFI_MTFTP6_PROTOCOL.Configure()
284 @param[in] Filename Pointer to null-terminated ASCII file name string.
285 @param[in] ModeStr Pointer to null-terminated ASCII mode string. If NULL, octet will be used.
286 @param[in] OptionCount Number of option/value string pairs in OptionList.
287 @param[in] OptionList Pointer to array of option/value string pairs. Ignored if
289 @param[out] PacketLength The number of bytes in the returned packet.
290 @param[out] Packet The pointer to the received packet. This buffer must be freed by
293 @retval EFI_SUCCESS An MTFTPv6 OACK packet was received and is in the Packet.
294 Note: It does not match the UEFI 2.3 Specification.
295 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
298 - OptionCount is not zero and OptionList is NULL.
299 - One or more options in OptionList have wrong format.
300 - PacketLength is NULL.
301 - OverrideData.ServerIp is not valid unicast IPv6 addresses.
302 @retval EFI_UNSUPPORTED One or more options in the OptionList are unsupported by
304 @retval EFI_NOT_STARTED The EFI MTFTPv6 Protocol driver has not been started.
305 @retval EFI_NO_MAPPING The underlying IPv6 driver was responsible for choosing a source
306 address for this instance, but no source address was available for use.
307 @retval EFI_ACCESS_DENIED The previous operation has not completed yet.
308 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
309 @retval EFI_TFTP_ERROR An MTFTPv6 ERROR packet was received and is in the Packet.
310 @retval EFI_NETWORK_UNREACHABLE An ICMP network unreachable error packet was received and the Packet is set to NULL.
311 Note: It is not defined in UEFI 2.3 Specification.
312 @retval EFI_HOST_UNREACHABLE An ICMP host unreachable error packet was received and the Packet is set to NULL.
313 Note: It is not defined in the UEFI 2.3 Specification.
314 @retval EFI_PROTOCOL_UNREACHABLE An ICMP protocol unreachable error packet was received and the Packet is set to NULL.
315 Note: It is not defined in the UEFI 2.3 Specification.
316 @retval EFI_PORT_UNREACHABLE An ICMP port unreachable error packet was received and the Packet is set to NULL.
317 @retval EFI_ICMP_ERROR Some other ICMP ERROR packet was received and the Packet is set to NULL.
318 Note: It does not match the UEFI 2.3 Specification.
319 @retval EFI_PROTOCOL_ERROR An unexpected MTFTPv6 packet was received and is in the Packet.
320 @retval EFI_TIMEOUT No responses were received from the MTFTPv6 server.
321 @retval EFI_DEVICE_ERROR An unexpected network error or system error occurred.
322 @retval EFI_NO_MEDIA There was a media error.
328 IN EFI_MTFTP6_PROTOCOL
*This
,
329 IN EFI_MTFTP6_OVERRIDE_DATA
*OverrideData OPTIONAL
,
331 IN UINT8
*ModeStr OPTIONAL
,
332 IN UINT8 OptionCount
,
333 IN EFI_MTFTP6_OPTION
*OptionList OPTIONAL
,
334 OUT UINT32
*PacketLength
,
335 OUT EFI_MTFTP6_PACKET
**Packet OPTIONAL
339 EFI_MTFTP6_TOKEN Token
;
340 MTFTP6_GETINFO_CONTEXT Context
;
344 PacketLength
== NULL
||
345 (OptionCount
!= 0 && OptionList
== NULL
) ||
346 (OverrideData
!= NULL
&& !NetIp6IsValidUnicast (&OverrideData
->ServerIp
))
348 return EFI_INVALID_PARAMETER
;
351 if (Packet
!= NULL
) {
357 Context
.Packet
= Packet
;
358 Context
.PacketLen
= PacketLength
;
359 Context
.Status
= EFI_SUCCESS
;
362 // Fill fields of the Token for GetInfo operation.
364 Token
.Status
= EFI_SUCCESS
;
366 Token
.OverrideData
= OverrideData
;
367 Token
.Filename
= Filename
;
368 Token
.ModeStr
= ModeStr
;
369 Token
.OptionCount
= OptionCount
;
370 Token
.OptionList
= OptionList
;
371 Token
.BufferSize
= 0;
373 Token
.Context
= &Context
;
374 Token
.CheckPacket
= Mtftp6CheckPacket
;
375 Token
.TimeoutCallback
= NULL
;
376 Token
.PacketNeeded
= NULL
;
379 // Start the GetInfo operation by issue the Token.
381 Status
= Mtftp6OperationStart (This
, &Token
, EFI_MTFTP6_OPCODE_RRQ
);
383 if (Status
== EFI_ABORTED
) {
385 // Return the status if failed to issue.
387 return Context
.Status
;
395 Parse the options in an MTFTPv6 OACK packet.
397 The ParseOptions() function parses the option fields in an MTFTPv6 OACK
398 packet and returns the number of options that were found, and optionally,
399 a list of pointers to the options in the packet. If one or more of the
400 option fields are not valid, then EFI_PROTOCOL_ERROR is returned and
401 *OptionCount and *OptionList stop at the last valid option.
403 @param[in] This Pointer to the EFI_MTFTP6_PROTOCOL instance.
404 @param[in] PacketLen Length of the OACK packet to be parsed.
405 @param[in] Packet Pointer to the OACK packet to be parsed.
406 @param[out] OptionCount Pointer to the number of options in the following OptionList.
407 @param[out] OptionList Pointer to EFI_MTFTP6_OPTION storage. Each pointer in the
408 OptionList points to the corresponding MTFTP option buffer
409 in the Packet. Call the EFI Boot Service FreePool() to
410 release the OptionList if the options in this OptionList
411 are not needed anymore.
413 @retval EFI_SUCCESS The OACK packet was valid and the OptionCount and
414 OptionList parameters have been updated.
415 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
417 - Packet is NULL or Packet is not a valid MTFTPv6 packet.
418 - OptionCount is NULL.
419 @retval EFI_NOT_FOUND No options were found in the OACK packet.
420 @retval EFI_OUT_OF_RESOURCES Storage for the OptionList array can not be allocated.
421 @retval EFI_PROTOCOL_ERROR One or more of the option fields is invalid.
426 EfiMtftp6ParseOptions (
427 IN EFI_MTFTP6_PROTOCOL
*This
,
429 IN EFI_MTFTP6_PACKET
*Packet
,
430 OUT UINT32
*OptionCount
,
431 OUT EFI_MTFTP6_OPTION
**OptionList OPTIONAL
435 return EFI_INVALID_PARAMETER
;
438 return Mtftp6ParseStart (Packet
, PacketLen
, OptionCount
, OptionList
);
443 Download a file from an MTFTPv6 server.
445 The ReadFile() function is used to initialize and start an MTFTPv6 download
446 process, and optionally, wait for completion. When the download operation
447 completes, whether successfully or not, the Token.Status field is updated
448 by the EFI MTFTPv6 Protocol driver, and then Token.Event is signaled if it
450 Data can be downloaded from the MTFTPv6 server into either of the following
452 - A fixed buffer that is pointed to by Token.Buffer
453 - A download service function that is pointed to by Token.CheckPacket.
454 If both Token.Buffer and Token.CheckPacket are used, then Token.CheckPacket
455 will be called first. If the call is successful, the packet will be stored
458 @param[in] This Pointer to the EFI_MTFTP6_PROTOCOL instance.
459 @param[in] Token Pointer to the token structure to provide the parameters that are
460 used in this operation.
462 @retval EFI_SUCCESS The data file has been transferred successfully.
463 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
464 @retval EFI_BUFFER_TOO_SMALL BufferSize is not zero but not large enough to hold the
465 downloaded data in downloading process.
466 Note: It does not match the UEFI 2.3 Specification.
467 @retval EFI_ABORTED Current operation is aborted by user.
468 @retval EFI_NETWORK_UNREACHABLE An ICMP network unreachable error packet was received.
469 Note: It is not defined in the UEFI 2.3 Specification.
470 @retval EFI_HOST_UNREACHABLE An ICMP host unreachable error packet was received.
471 Note: It is not defined in the UEFI 2.3 Specification.
472 @retval EFI_PROTOCOL_UNREACHABLE An ICMP protocol unreachable error packet was received.
473 Note: It is not defined in the UEFI 2.3 Specification.
474 @retval EFI_PORT_UNREACHABLE An ICMP port unreachable error packet was received.
475 Note: It is not defined in the UEFI 2.3 Specification.
476 @retval EFI_ICMP_ERROR An ICMP ERROR packet was received.
477 @retval EFI_TIMEOUT No responses were received from the MTFTPv6 server.
478 @retval EFI_TFTP_ERROR An MTFTPv6 ERROR packet was received.
479 @retval EFI_DEVICE_ERROR An unexpected network error or system error occurred.
480 @retval EFI_NO_MEDIA There was a media error.
486 IN EFI_MTFTP6_PROTOCOL
*This
,
487 IN EFI_MTFTP6_TOKEN
*Token
490 return Mtftp6OperationStart (This
, Token
, EFI_MTFTP6_OPCODE_RRQ
);
495 Send a file to an MTFTPv6 server.
497 The WriteFile() function is used to initialize an uploading operation
498 with the given option list and optionally wait for completion. If one
499 or more of the options is not supported by the server, the unsupported
500 options are ignored and a standard TFTP process starts instead. When
501 the upload process completes, whether successfully or not, Token.Event
502 is signaled, and the EFI MTFTPv6 Protocol driver updates Token.Status.
503 The caller can supply the data to be uploaded in the following two modes:
504 - Through the user-provided buffer
505 - Through a callback function
506 With the user-provided buffer, the Token.BufferSize field indicates
507 the length of the buffer, and the driver will upload the data in the
508 buffer. With an EFI_MTFTP6_PACKET_NEEDED callback function, the driver
509 will call this callback function to get more data from the user to upload.
511 @param[in] This Pointer to the EFI_MTFTP6_PROTOCOL instance.
512 @param[in] Token Pointer to the token structure to provide the parameters that are
513 used in this operation.
515 @retval EFI_SUCCESS The upload session has started.
516 @retval EFI_UNSUPPORTED The operation is not supported by this implementation.
517 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
520 - Token.Filename is NULL.
521 - Token.OptionCount is not zero and Token.OptionList is NULL.
522 - One or more options in Token.OptionList have wrong format.
523 - Token.Buffer and Token.PacketNeeded are both NULL.
524 - Token.OverrideData.ServerIp is not a valid unicast IPv6 address.
525 @retval EFI_UNSUPPORTED One or more options in the Token.OptionList are not
526 supported by this implementation.
527 @retval EFI_NOT_STARTED The EFI MTFTPv6 Protocol driver has not been started.
528 @retval EFI_NO_MAPPING The underlying IPv6 driver was responsible for choosing a source
529 address for this instance, but no source address was available for use.
530 @retval EFI_ALREADY_STARTED This Token is already being used in another MTFTPv6 session.
531 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
532 @retval EFI_ACCESS_DENIED The previous operation has not completed yet.
533 @retval EFI_DEVICE_ERROR An unexpected network error or system error occurred.
539 IN EFI_MTFTP6_PROTOCOL
*This
,
540 IN EFI_MTFTP6_TOKEN
*Token
543 return Mtftp6OperationStart (This
, Token
, EFI_MTFTP6_OPCODE_WRQ
);
548 Download a data file directory from an MTFTPv6 server.
550 The ReadDirectory() function is used to return a list of files on the
551 MTFTPv6 server that are logically (or operationally) related to
552 Token.Filename. The directory request packet that is sent to the server
553 is built with the option list that was provided by the caller, if present.
554 The file information that the server returns is put into either of
555 the following locations:
556 - A fixed buffer that is pointed to by Token.Buffer.
557 - A download service function that is pointed to by Token.CheckPacket.
558 If both Token.Buffer and Token.CheckPacket are used, then Token.CheckPacket
559 will be called first. If the call is successful, the packet will be stored
562 @param[in] This Pointer to the EFI_MTFTP6_PROTOCOL instance.
563 @param[in] Token Pointer to the token structure to provide the parameters that are
564 used in this operation.
566 @retval EFI_SUCCESS The MTFTPv6 related file "directory" has been downloaded.
567 @retval EFI_UNSUPPORTED The EFI MTFTPv6 Protocol driver does not support this function.
568 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
571 - Token.Filename is NULL.
572 - Token.OptionCount is not zero and Token.OptionList is NULL.
573 - One or more options in Token.OptionList have wrong format.
574 - Token.Buffer and Token.CheckPacket are both NULL.
575 - Token.OverrideData.ServerIp is not valid unicast IPv6 addresses.
576 @retval EFI_UNSUPPORTED One or more options in the Token.OptionList are not
577 supported by this implementation.
578 @retval EFI_NOT_STARTED The EFI MTFTPv6 Protocol driver has not been started.
579 @retval EFI_NO_MAPPING The underlying IPv6 driver was responsible for choosing a source
580 address for this instance, but no source address was available for use.
581 @retval EFI_ALREADY_STARTED This Token is already being used in another MTFTPv6 session.
582 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
583 @retval EFI_ACCESS_DENIED The previous operation has not completed yet.
584 @retval EFI_DEVICE_ERROR An unexpected network error or system error occurred.
589 EfiMtftp6ReadDirectory (
590 IN EFI_MTFTP6_PROTOCOL
*This
,
591 IN EFI_MTFTP6_TOKEN
*Token
594 return Mtftp6OperationStart (This
, Token
, EFI_MTFTP6_OPCODE_DIR
);
599 Polls for incoming data packets and processes outgoing data packets.
601 The Poll() function can be used by network drivers and applications
602 to increase the rate that data packets are moved between the
603 communications device and the transmit and receive queues. In some
604 systems, the periodic timer event in the managed network driver may
605 not poll the underlying communications device fast enough to transmit
606 and/or receive all data packets without missing incoming packets or
607 dropping outgoing packets. Drivers and applications that are
608 experiencing packet loss should try calling the Poll() function
611 @param[in] This The MTFTP6 protocol instance.
614 @retval EFI_SUCCESS Incoming or outgoing data was processed.
615 @retval EFI_NOT_STARTED This EFI MTFTPv6 Protocol instance has not been started.
616 @retval EFI_INVALID_PARAMETER This is NULL.
617 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
618 @retval EFI_TIMEOUT Data was dropped out of the transmit and/or receive queue.
619 Consider increasing the polling rate.
625 IN EFI_MTFTP6_PROTOCOL
*This
628 MTFTP6_INSTANCE
*Instance
;
629 EFI_UDP6_PROTOCOL
*Udp6
;
632 return EFI_INVALID_PARAMETER
;
635 Instance
= MTFTP6_INSTANCE_FROM_THIS (This
);
638 // Check the instance whether configured or in destroy.
640 if (Instance
->Config
== NULL
) {
641 return EFI_NOT_STARTED
;
644 Udp6
= Instance
->UdpIo
->Protocol
.Udp6
;
646 return Udp6
->Poll (Udp6
);