mirror of https://github.com/acidanthera/audk.git
remove some comments.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10141 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
8c5983b739
commit
bce46f7e10
File diff suppressed because it is too large
Load Diff
|
@ -1,16 +1,16 @@
|
|||
/** @file
|
||||
EFI Multicast Trivial File Tranfer Protocol Definition
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
Copyright (c) 2006 - 2010, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
@par Revision Reference:
|
||||
@par Revision Reference:
|
||||
This Protocol is introduced in UEFI Specification 2.0
|
||||
|
||||
**/
|
||||
|
@ -165,9 +165,9 @@ typedef struct {
|
|||
|
||||
typedef struct {
|
||||
EFI_MTFTP4_CONFIG_DATA ConfigData;
|
||||
UINT8 SupportedOptionCount;
|
||||
UINT8 SupportedOptionCount;
|
||||
UINT8 **SupportedOptoins;
|
||||
UINT8 UnsupportedOptionCount;
|
||||
UINT8 UnsupportedOptionCount;
|
||||
UINT8 **UnsupportedOptoins;
|
||||
} EFI_MTFTP4_MODE_DATA;
|
||||
|
||||
|
@ -185,11 +185,11 @@ typedef struct {
|
|||
//
|
||||
|
||||
/**
|
||||
A callback function that is provided by the caller to intercept
|
||||
A callback function that is provided by the caller to intercept
|
||||
the EFI_MTFTP4_OPCODE_DATA or EFI_MTFTP4_OPCODE_DATA8 packets processed in the
|
||||
EFI_MTFTP4_PROTOCOL.ReadFile() function, and alternatively to intercept
|
||||
EFI_MTFTP4_OPCODE_OACK or EFI_MTFTP4_OPCODE_ERROR packets during a call to
|
||||
EFI_MTFTP4_PROTOCOL.ReadFile(), WriteFile() or ReadDirectory().
|
||||
EFI_MTFTP4_PROTOCOL.ReadFile() function, and alternatively to intercept
|
||||
EFI_MTFTP4_OPCODE_OACK or EFI_MTFTP4_OPCODE_ERROR packets during a call to
|
||||
EFI_MTFTP4_PROTOCOL.ReadFile(), WriteFile() or ReadDirectory().
|
||||
|
||||
@param This Pointer to the EFI_MTFTP4_PROTOCOL instance.
|
||||
@param Token The token that the caller provided in the
|
||||
|
@ -202,9 +202,9 @@ typedef struct {
|
|||
@retval Others Abort transfer process
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_MTFTP4_CHECK_PACKET)(
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_MTFTP4_CHECK_PACKET)(
|
||||
IN EFI_MTFTP4_PROTOCOL *This,
|
||||
IN EFI_MTFTP4_TOKEN *Token,
|
||||
IN UINT16 PacketLen,
|
||||
|
@ -212,7 +212,7 @@ EFI_STATUS
|
|||
);
|
||||
|
||||
/**
|
||||
Timeout callback funtion.
|
||||
Timeout callback funtion.
|
||||
|
||||
@param This Pointer to the EFI_MTFTP4_PROTOCOL instance.
|
||||
@param Token The token that is provided in the
|
||||
|
@ -220,14 +220,14 @@ EFI_STATUS
|
|||
EFI_MTFTP4_PROTOCOL.WriteFile() or
|
||||
EFI_MTFTP4_PROTOCOL.ReadDirectory() functions
|
||||
by the caller.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Operation sucess
|
||||
@retval Others Aborts download process.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_MTFTP4_TIMEOUT_CALLBACK)(
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_MTFTP4_TIMEOUT_CALLBACK)(
|
||||
IN EFI_MTFTP4_PROTOCOL *This,
|
||||
IN EFI_MTFTP4_TOKEN *Token
|
||||
);
|
||||
|
@ -247,9 +247,9 @@ EFI_STATUS
|
|||
@retval Others Aborts session.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_MTFTP4_PACKET_NEEDED)(
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_MTFTP4_PACKET_NEEDED)(
|
||||
IN EFI_MTFTP4_PROTOCOL *This,
|
||||
IN EFI_MTFTP4_TOKEN *Token,
|
||||
IN OUT UINT16 *Length,
|
||||
|
@ -268,8 +268,8 @@ EFI_STATUS
|
|||
@retval EFI_INVALID_PARAMETER This is NULL or ModeData is NULL.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_MTFTP4_GET_MODE_DATA)(
|
||||
IN EFI_MTFTP4_PROTOCOL *This,
|
||||
OUT EFI_MTFTP4_MODE_DATA *ModeData
|
||||
|
@ -277,7 +277,7 @@ EFI_STATUS
|
|||
|
||||
|
||||
/**
|
||||
Initializes, changes, or resets the default operational setting for this
|
||||
Initializes, changes, or resets the default operational setting for this
|
||||
EFI MTFTPv4 Protocol driver instance.
|
||||
|
||||
@param This Pointer to the EFI_MTFTP4_PROTOCOL instance.
|
||||
|
@ -298,14 +298,14 @@ EFI_STATUS
|
|||
MTFTPv4 Protocol driver instance is not configured.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_MTFTP4_CONFIGURE)(
|
||||
IN EFI_MTFTP4_PROTOCOL *This,
|
||||
IN EFI_MTFTP4_CONFIG_DATA *MtftpConfigData OPTIONAL
|
||||
);
|
||||
|
||||
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Gets information about a file from an MTFTPv4 server.
|
||||
|
||||
|
@ -323,7 +323,6 @@ EFI_STATUS
|
|||
the caller.
|
||||
|
||||
@retval EFI_SUCCESS An MTFTPv4 OACK packet was received and is in the Packet.
|
||||
Note: It does not match UEFI 2.3 Specification.
|
||||
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
|
||||
- This is NULL.
|
||||
- Filename is NULL.
|
||||
|
@ -341,24 +340,18 @@ EFI_STATUS
|
|||
@retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
|
||||
@retval EFI_TFTP_ERROR An MTFTPv4 ERROR packet was received and is in the Packet.
|
||||
@retval EFI_NETWORK_UNREACHABLE An ICMP network unreachable error packet was received and the Packet is set to NULL.
|
||||
Note: It is not defined in UEFI 2.3 Specification.
|
||||
@retval EFI_HOST_UNREACHABLE An ICMP host unreachable error packet was received and the Packet is set to NULL.
|
||||
Note: It is not defined in UEFI 2.3 Specification.
|
||||
@retval EFI_PROTOCOL_UNREACHABLE An ICMP protocol unreachable error packet was received and the Packet is set to NULL.
|
||||
Note: It is not defined in UEFI 2.3 Specification.
|
||||
@retval EFI_PORT_UNREACHABLE An ICMP port unreachable error packet was received and the Packet is set to NULL.
|
||||
Note: It is not defined in UEFI 2.3 Specification.
|
||||
@retval EFI_ICMP_ERROR Some other ICMP ERROR packet was received and is in the Buffer.
|
||||
Note: It does not match UEFI 2.3 Specification.
|
||||
@retval EFI_PROTOCOL_ERROR An unexpected MTFTPv4 packet was received and is in the Packet.
|
||||
Note: It does not match UEFI 2.3 Specification.
|
||||
@retval EFI_TIMEOUT No responses were received from the MTFTPv4 server.
|
||||
@retval EFI_DEVICE_ERROR An unexpected network error or system error occurred.
|
||||
@retval EFI_NO_MEDIA There was a media error.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_MTFTP4_GET_INFO)(
|
||||
IN EFI_MTFTP4_PROTOCOL *This,
|
||||
IN EFI_MTFTP4_OVERRIDE_DATA *OverrideData OPTIONAL,
|
||||
|
@ -392,15 +385,15 @@ EFI_STATUS
|
|||
@retval EFI_PROTOCOL_ERROR One or more of the option fields is invalid.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_MTFTP4_PARSE_OPTIONS)(
|
||||
IN EFI_MTFTP4_PROTOCOL *This,
|
||||
IN UINT32 PacketLen,
|
||||
IN EFI_MTFTP4_PACKET *Packet,
|
||||
OUT UINT32 *OptionCount,
|
||||
OUT EFI_MTFTP4_OPTION **OptionList OPTIONAL
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
|
@ -414,31 +407,25 @@ EFI_STATUS
|
|||
@retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
|
||||
@retval EFI_BUFFER_TOO_SMALL BufferSize is not zero but not large enough to hold the
|
||||
downloaded data in downloading process.
|
||||
Note: It does not match UEFI 2.3 Specification.
|
||||
@retval EFI_ABORTED Current operation is aborted by user.
|
||||
@retval EFI_NETWORK_UNREACHABLE An ICMP network unreachable error packet was received.
|
||||
Note: It is not defined in UEFI 2.3 Specification.
|
||||
@retval EFI_HOST_UNREACHABLE An ICMP host unreachable error packet was received.
|
||||
Note: It is not defined in UEFI 2.3 Specification.
|
||||
@retval EFI_PROTOCOL_UNREACHABLE An ICMP protocol unreachable error packet was received.
|
||||
Note: It is not defined in UEFI 2.3 Specification.
|
||||
@retval EFI_PORT_UNREACHABLE An ICMP port unreachable error packet was received.
|
||||
Note: It is not defined in UEFI 2.3 Specification.
|
||||
@retval EFI_ICMP_ERROR Some other ICMP ERROR packet was received.
|
||||
Note: It does not match UEFI 2.3 Specification.
|
||||
@retval EFI_TIMEOUT No responses were received from the MTFTPv4 server.
|
||||
@retval EFI_TFTP_ERROR An MTFTPv4 ERROR packet was received.
|
||||
@retval EFI_DEVICE_ERROR An unexpected network error or system error occurred.
|
||||
@retval EFI_NO_MEDIA There was a media error.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_MTFTP4_READ_FILE)(
|
||||
IN EFI_MTFTP4_PROTOCOL *This,
|
||||
IN EFI_MTFTP4_TOKEN *Token
|
||||
);
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
@ -462,17 +449,17 @@ EFI_STATUS
|
|||
@retval EFI_DEVICE_ERROR An unexpected network error or system error occurred.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_MTFTP4_WRITE_FILE)(
|
||||
IN EFI_MTFTP4_PROTOCOL *This,
|
||||
IN EFI_MTFTP4_TOKEN *Token
|
||||
);
|
||||
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Downloads a data file "directory" from an MTFTPv4 server. May be unsupported in some EFI
|
||||
implementations.
|
||||
implementations.
|
||||
|
||||
@param This Pointer to the EFI_MTFTP4_PROTOCOL instance.
|
||||
@param Token Pointer to the token structure to provide the parameters that are
|
||||
|
@ -492,12 +479,12 @@ EFI_STATUS
|
|||
@retval EFI_DEVICE_ERROR An unexpected network error or system error occurred.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_MTFTP4_READ_DIRECTORY)(
|
||||
IN EFI_MTFTP4_PROTOCOL *This,
|
||||
IN EFI_MTFTP4_TOKEN *Token
|
||||
);
|
||||
);
|
||||
|
||||
/**
|
||||
Polls for incoming data packets and processes outgoing data packets.
|
||||
|
@ -518,13 +505,13 @@ typedef
|
|||
EFI_STATUS
|
||||
(EFIAPI *EFI_MTFTP4_POLL)(
|
||||
IN EFI_MTFTP4_PROTOCOL *This
|
||||
);
|
||||
|
||||
);
|
||||
|
||||
///
|
||||
/// The EFI_MTFTP4_PROTOCOL is designed to be used by UEFI drivers and applications
|
||||
/// to transmit and receive data files. The EFI MTFTPv4 Protocol driver uses
|
||||
/// The EFI_MTFTP4_PROTOCOL is designed to be used by UEFI drivers and applications
|
||||
/// to transmit and receive data files. The EFI MTFTPv4 Protocol driver uses
|
||||
/// the underlying EFI UDPv4 Protocol driver and EFI IPv4 Protocol driver.
|
||||
///
|
||||
///
|
||||
struct _EFI_MTFTP4_PROTOCOL {
|
||||
EFI_MTFTP4_GET_MODE_DATA GetModeData;
|
||||
EFI_MTFTP4_CONFIGURE Configure;
|
||||
|
@ -581,7 +568,7 @@ struct _EFI_MTFTP4_TOKEN {
|
|||
///
|
||||
VOID *Buffer;
|
||||
///
|
||||
/// Pointer to the context that will be used by CheckPacket,
|
||||
/// Pointer to the context that will be used by CheckPacket,
|
||||
/// TimeoutCallback and PacketNeeded.
|
||||
///
|
||||
VOID *Context;
|
||||
|
@ -600,7 +587,7 @@ struct _EFI_MTFTP4_TOKEN {
|
|||
};
|
||||
|
||||
extern EFI_GUID gEfiMtftp4ServiceBindingProtocolGuid;
|
||||
extern EFI_GUID gEfiMtftp4ProtocolGuid;
|
||||
extern EFI_GUID gEfiMtftp4ProtocolGuid;
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -3,16 +3,16 @@
|
|||
the EFI UDPv6 Protocol and provides basic services for client-side unicast and/or
|
||||
multicast TFTP operations.
|
||||
|
||||
Copyright (c) 2008 - 2010, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
Copyright (c) 2008 - 2010, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
@par Revision Reference:
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
@par Revision Reference:
|
||||
This Protocol is introduced in UEFI Specification 2.2
|
||||
|
||||
**/
|
||||
|
@ -44,7 +44,7 @@ typedef struct _EFI_MTFTP6_TOKEN EFI_MTFTP6_TOKEN;
|
|||
#define EFI_MTFTP6_OPCODE_ERROR 5 ///< The MTFTPv6 packet is an error packet.
|
||||
#define EFI_MTFTP6_OPCODE_OACK 6 ///< The MTFTPv6 packet is an option acknowledgement packet.
|
||||
#define EFI_MTFTP6_OPCODE_DIR 7 ///< The MTFTPv6 packet is a directory query packet.
|
||||
#define EFI_MTFTP6_OPCODE_DATA8 8 ///< The MTFTPv6 packet is a data packet with a big block number.
|
||||
#define EFI_MTFTP6_OPCODE_DATA8 8 ///< The MTFTPv6 packet is a data packet with a big block number.
|
||||
#define EFI_MTFTP6_OPCODE_ACK8 9 ///< The MTFTPv6 packet is an acknowledgement packet with a big block number.
|
||||
///@}
|
||||
|
||||
|
@ -52,7 +52,7 @@ typedef struct _EFI_MTFTP6_TOKEN EFI_MTFTP6_TOKEN;
|
|||
/// MTFTP ERROR Packet ErrorCodes
|
||||
///@{
|
||||
///
|
||||
/// The error code is not defined. See the error message in the packet (if any) for details.
|
||||
/// The error code is not defined. See the error message in the packet (if any) for details.
|
||||
///
|
||||
#define EFI_MTFTP6_ERRORCODE_NOT_DEFINED 0
|
||||
///
|
||||
|
@ -92,7 +92,7 @@ typedef struct _EFI_MTFTP6_TOKEN EFI_MTFTP6_TOKEN;
|
|||
#pragma pack(1)
|
||||
|
||||
///
|
||||
/// EFI_MTFTP6_REQ_HEADER
|
||||
/// EFI_MTFTP6_REQ_HEADER
|
||||
///
|
||||
typedef struct {
|
||||
///
|
||||
|
@ -107,7 +107,7 @@ typedef struct {
|
|||
} EFI_MTFTP6_REQ_HEADER;
|
||||
|
||||
///
|
||||
/// EFI_MTFTP6_OACK_HEADER
|
||||
/// EFI_MTFTP6_OACK_HEADER
|
||||
///
|
||||
typedef struct {
|
||||
///
|
||||
|
@ -121,7 +121,7 @@ typedef struct {
|
|||
} EFI_MTFTP6_OACK_HEADER;
|
||||
|
||||
///
|
||||
/// EFI_MTFTP6_DATA_HEADER
|
||||
/// EFI_MTFTP6_DATA_HEADER
|
||||
///
|
||||
typedef struct {
|
||||
///
|
||||
|
@ -139,7 +139,7 @@ typedef struct {
|
|||
} EFI_MTFTP6_DATA_HEADER;
|
||||
|
||||
///
|
||||
/// EFI_MTFTP6_ACK_HEADER
|
||||
/// EFI_MTFTP6_ACK_HEADER
|
||||
///
|
||||
typedef struct {
|
||||
///
|
||||
|
@ -153,7 +153,7 @@ typedef struct {
|
|||
} EFI_MTFTP6_ACK_HEADER;
|
||||
|
||||
///
|
||||
/// EFI_MTFTP6_DATA8_HEADER
|
||||
/// EFI_MTFTP6_DATA8_HEADER
|
||||
///
|
||||
typedef struct {
|
||||
///
|
||||
|
@ -171,7 +171,7 @@ typedef struct {
|
|||
} EFI_MTFTP6_DATA8_HEADER;
|
||||
|
||||
///
|
||||
/// EFI_MTFTP6_ACK8_HEADER
|
||||
/// EFI_MTFTP6_ACK8_HEADER
|
||||
///
|
||||
typedef struct {
|
||||
///
|
||||
|
@ -185,7 +185,7 @@ typedef struct {
|
|||
} EFI_MTFTP6_ACK8_HEADER;
|
||||
|
||||
///
|
||||
/// EFI_MTFTP6_ERROR_HEADER
|
||||
/// EFI_MTFTP6_ERROR_HEADER
|
||||
///
|
||||
typedef struct {
|
||||
///
|
||||
|
@ -193,7 +193,7 @@ typedef struct {
|
|||
///
|
||||
UINT16 OpCode;
|
||||
///
|
||||
/// The error number as defined by the MTFTPv6 packet error codes.
|
||||
/// The error number as defined by the MTFTPv6 packet error codes.
|
||||
///
|
||||
UINT16 ErrorCode;
|
||||
///
|
||||
|
@ -203,7 +203,7 @@ typedef struct {
|
|||
} EFI_MTFTP6_ERROR_HEADER;
|
||||
|
||||
///
|
||||
/// EFI_MTFTP6_PACKET
|
||||
/// EFI_MTFTP6_PACKET
|
||||
///
|
||||
typedef union {
|
||||
UINT16 OpCode; ///< Type of packets as defined by the MTFTPv6 packet opcodes.
|
||||
|
@ -224,8 +224,8 @@ typedef union {
|
|||
///
|
||||
typedef struct {
|
||||
///
|
||||
/// The local IP address to use. Set to zero to let the underlying IPv6
|
||||
/// driver choose a source address. If not zero it must be one of the
|
||||
/// The local IP address to use. Set to zero to let the underlying IPv6
|
||||
/// driver choose a source address. If not zero it must be one of the
|
||||
/// configured IP addresses in the underlying IPv6 driver.
|
||||
///
|
||||
EFI_IPv6_ADDRESS StationIp;
|
||||
|
@ -238,8 +238,8 @@ typedef struct {
|
|||
///
|
||||
EFI_IPv6_ADDRESS ServerIp;
|
||||
///
|
||||
/// The initial MTFTPv6 server port number. Request packets are
|
||||
/// sent to this port. This number is almost always 69 and using zero
|
||||
/// The initial MTFTPv6 server port number. Request packets are
|
||||
/// sent to this port. This number is almost always 69 and using zero
|
||||
/// defaults to 69.
|
||||
UINT16 InitialServerPort;
|
||||
///
|
||||
|
@ -247,7 +247,7 @@ typedef struct {
|
|||
///
|
||||
UINT16 TryCount;
|
||||
///
|
||||
/// The number of seconds to wait for a response after sending the MTFTPv6 request packet.
|
||||
/// The number of seconds to wait for a response after sending the MTFTPv6 request packet.
|
||||
///
|
||||
UINT16 TimeoutValue;
|
||||
} EFI_MTFTP6_CONFIG_DATA;
|
||||
|
@ -265,8 +265,8 @@ typedef struct {
|
|||
///
|
||||
UINT8 SupportedOptionCount;
|
||||
///
|
||||
/// An array of option strings that are recognized and supported by
|
||||
/// this EFI MTFTPv6 Protocol driver implementation. The buffer is
|
||||
/// An array of option strings that are recognized and supported by
|
||||
/// this EFI MTFTPv6 Protocol driver implementation. The buffer is
|
||||
/// read only to the caller and the caller should NOT free the buffer.
|
||||
///
|
||||
UINT8 **SupportedOptions;
|
||||
|
@ -277,24 +277,24 @@ typedef struct {
|
|||
///
|
||||
typedef struct {
|
||||
///
|
||||
/// IP address of the MTFTPv6 server. If set to all zero, the value that
|
||||
/// was set by the EFI_MTFTP6_PROTOCOL.Configure() function will be used.
|
||||
/// IP address of the MTFTPv6 server. If set to all zero, the value that
|
||||
/// was set by the EFI_MTFTP6_PROTOCOL.Configure() function will be used.
|
||||
///
|
||||
EFI_IPv6_ADDRESS ServerIp;
|
||||
///
|
||||
/// MTFTPv6 server port number. If set to zero, it will use the value
|
||||
/// that was set by the EFI_MTFTP6_PROTOCOL.Configure() function.
|
||||
/// MTFTPv6 server port number. If set to zero, it will use the value
|
||||
/// that was set by the EFI_MTFTP6_PROTOCOL.Configure() function.
|
||||
///
|
||||
UINT16 ServerPort;
|
||||
///
|
||||
/// Number of times to transmit MTFTPv6 request packets and wait
|
||||
/// for a response. If set to zero, the value that was set by
|
||||
/// Number of times to transmit MTFTPv6 request packets and wait
|
||||
/// for a response. If set to zero, the value that was set by
|
||||
/// theEFI_MTFTP6_PROTOCOL.Configure() function will be used.
|
||||
///
|
||||
UINT16 TryCount;
|
||||
///
|
||||
/// Number of seconds to wait for a response after sending the
|
||||
/// MTFTPv6 request packet. If set to zero, the value that was set by
|
||||
/// Number of seconds to wait for a response after sending the
|
||||
/// MTFTPv6 request packet. If set to zero, the value that was set by
|
||||
/// the EFI_MTFTP6_PROTOCOL.Configure() function will be used.
|
||||
///
|
||||
UINT16 TimeoutValue;
|
||||
|
@ -304,18 +304,18 @@ typedef struct {
|
|||
/// EFI_MTFTP6_OPTION
|
||||
///
|
||||
typedef struct {
|
||||
UINT8 *OptionStr; ///< Pointer to the ASCIIZ MTFTPv6 option string.
|
||||
UINT8 *OptionStr; ///< Pointer to the ASCIIZ MTFTPv6 option string.
|
||||
UINT8 *ValueStr; ///< Pointer to the ASCIIZ MTFTPv6 value string.
|
||||
} EFI_MTFTP6_OPTION;
|
||||
|
||||
/**
|
||||
EFI_MTFTP6_TIMEOUT_CALLBACK is a callback function that the caller provides to capture the
|
||||
timeout event in the EFI_MTFTP6_PROTOCOL.ReadFile(), EFI_MTFTP6_PROTOCOL.WriteFile() or
|
||||
EFI_MTFTP6_PROTOCOL.ReadDirectory() functions.
|
||||
|
||||
EFI_MTFTP6_TIMEOUT_CALLBACK is a callback function that the caller provides to capture the
|
||||
timeout event in the EFI_MTFTP6_PROTOCOL.ReadFile(), EFI_MTFTP6_PROTOCOL.WriteFile() or
|
||||
EFI_MTFTP6_PROTOCOL.ReadDirectory() functions.
|
||||
|
||||
Whenever a timeout occurs, the EFI MTFTPv6 Protocol driver will call the EFI_MTFTP6_TIMEOUT_CALLBACK
|
||||
function to notify the caller of the timeout event. Any status code other than EFI_SUCCESS
|
||||
that is returned from this function will abort the current download process.
|
||||
that is returned from this function will abort the current download process.
|
||||
|
||||
@param[in] This Pointer to the EFI_MTFTP6_PROTOCOL instance.
|
||||
@param[in] Token The token that the caller provided in the EFI_MTFTP6_PROTOCOl.ReadFile(),
|
||||
|
@ -328,8 +328,8 @@ typedef struct {
|
|||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_MTFTP6_CHECK_PACKET)(
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_MTFTP6_CHECK_PACKET)(
|
||||
IN EFI_MTFTP6_PROTOCOL *This,
|
||||
IN EFI_MTFTP6_TOKEN *Token,
|
||||
IN UINT16 PacketLen,
|
||||
|
@ -337,16 +337,16 @@ EFI_STATUS
|
|||
);
|
||||
|
||||
/**
|
||||
EFI_MTFTP6_TIMEOUT_CALLBACK is a callback function that the caller provides to capture the
|
||||
timeout event in the EFI_MTFTP6_PROTOCOL.ReadFile(), EFI_MTFTP6_PROTOCOL.WriteFile() or
|
||||
EFI_MTFTP6_PROTOCOL.ReadDirectory() functions.
|
||||
|
||||
EFI_MTFTP6_TIMEOUT_CALLBACK is a callback function that the caller provides to capture the
|
||||
timeout event in the EFI_MTFTP6_PROTOCOL.ReadFile(), EFI_MTFTP6_PROTOCOL.WriteFile() or
|
||||
EFI_MTFTP6_PROTOCOL.ReadDirectory() functions.
|
||||
|
||||
Whenever a timeout occurs, the EFI MTFTPv6 Protocol driver will call the EFI_MTFTP6_TIMEOUT_CALLBACK
|
||||
function to notify the caller of the timeout event. Any status code other than EFI_SUCCESS
|
||||
that is returned from this function will abort the current download process.
|
||||
that is returned from this function will abort the current download process.
|
||||
|
||||
@param[in] This Pointer to the EFI_MTFTP6_PROTOCOL instance.
|
||||
@param[in] Token The token that is provided in the EFI_MTFTP6_PROTOCOL.ReadFile() or
|
||||
@param[in] Token The token that is provided in the EFI_MTFTP6_PROTOCOL.ReadFile() or
|
||||
EFI_MTFTP6_PROTOCOL.WriteFile() or EFI_MTFTP6_PROTOCOL.ReadDirectory()
|
||||
functions by the caller.
|
||||
|
||||
|
@ -354,17 +354,17 @@ EFI_STATUS
|
|||
@retval Others Aborts session.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_MTFTP6_TIMEOUT_CALLBACK)(
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_MTFTP6_TIMEOUT_CALLBACK)(
|
||||
IN EFI_MTFTP6_PROTOCOL *This,
|
||||
IN EFI_MTFTP6_TOKEN *Token
|
||||
);
|
||||
|
||||
/**
|
||||
EFI_MTFTP6_PACKET_NEEDED is a callback function that the caller provides to feed data to the
|
||||
EFI_MTFTP6_PROTOCOL.WriteFile() function.
|
||||
|
||||
EFI_MTFTP6_PACKET_NEEDED is a callback function that the caller provides to feed data to the
|
||||
EFI_MTFTP6_PROTOCOL.WriteFile() function.
|
||||
|
||||
EFI_MTFTP6_PACKET_NEEDED provides another mechanism for the caller to provide data to upload
|
||||
other than a static buffer. The EFI MTFTP6 Protocol driver always calls EFI_MTFTP6_PACKET_NEEDED
|
||||
to get packet data from the caller if no static buffer was given in the initial call to
|
||||
|
@ -373,7 +373,7 @@ EFI_STATUS
|
|||
|
||||
@param[in] This Pointer to the EFI_MTFTP6_PROTOCOL instance.
|
||||
@param[in] Token The token provided in the EFI_MTFTP6_PROTOCOL.WriteFile() by the caller.
|
||||
@param[in, out] Length Indicates the length of the raw data wanted on input, and the
|
||||
@param[in, out] Length Indicates the length of the raw data wanted on input, and the
|
||||
length the data available on output.
|
||||
@param[out] Buffer Pointer to the buffer where the data is stored.
|
||||
|
||||
|
@ -381,9 +381,9 @@ EFI_STATUS
|
|||
@retval Others Aborts session.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_MTFTP6_PACKET_NEEDED)(
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_MTFTP6_PACKET_NEEDED)(
|
||||
IN EFI_MTFTP6_PROTOCOL *This,
|
||||
IN EFI_MTFTP6_TOKEN *Token,
|
||||
IN OUT UINT16 *Length,
|
||||
|
@ -392,20 +392,20 @@ EFI_STATUS
|
|||
|
||||
struct _EFI_MTFTP6_TOKEN {
|
||||
///
|
||||
/// The status that is returned to the caller at the end of the operation
|
||||
/// to indicate whether this operation completed successfully.
|
||||
/// The status that is returned to the caller at the end of the operation
|
||||
/// to indicate whether this operation completed successfully.
|
||||
/// Defined Status values are listed below.
|
||||
///
|
||||
EFI_STATUS Status;
|
||||
///
|
||||
/// The event that will be signaled when the operation completes. If
|
||||
/// set to NULL, the corresponding function will wait until the read or
|
||||
/// write operation finishes. The type of Event must be EVT_NOTIFY_SIGNAL.
|
||||
/// The event that will be signaled when the operation completes. If
|
||||
/// set to NULL, the corresponding function will wait until the read or
|
||||
/// write operation finishes. The type of Event must be EVT_NOTIFY_SIGNAL.
|
||||
///
|
||||
EFI_EVENT Event;
|
||||
///
|
||||
/// If not NULL, the data that will be used to override the existing
|
||||
/// configure data.
|
||||
/// If not NULL, the data that will be used to override the existing
|
||||
/// configure data.
|
||||
///
|
||||
EFI_MTFTP6_OVERRIDE_DATA *OverrideData;
|
||||
///
|
||||
|
@ -421,32 +421,32 @@ struct _EFI_MTFTP6_TOKEN {
|
|||
///
|
||||
UINT32 OptionCount;
|
||||
///
|
||||
/// Pointer to an array of option/value string pairs. Ignored if
|
||||
/// OptionCount is zero. Both a remote server and this driver
|
||||
/// implementation should support these options. If one or more
|
||||
/// options are unrecognized by this implementation, it is sent to the
|
||||
/// Pointer to an array of option/value string pairs. Ignored if
|
||||
/// OptionCount is zero. Both a remote server and this driver
|
||||
/// implementation should support these options. If one or more
|
||||
/// options are unrecognized by this implementation, it is sent to the
|
||||
/// remote server without being changed.
|
||||
///
|
||||
EFI_MTFTP6_OPTION *OptionList;
|
||||
///
|
||||
/// On input, the size, in bytes, of Buffer. On output, the number
|
||||
/// On input, the size, in bytes, of Buffer. On output, the number
|
||||
/// of bytes transferred.
|
||||
///
|
||||
UINT64 BufferSize;
|
||||
UINT64 BufferSize;
|
||||
///
|
||||
/// Pointer to the data buffer. Data that is downloaded from the
|
||||
/// MTFTPv6 server is stored here. Data that is uploaded to the
|
||||
/// Pointer to the data buffer. Data that is downloaded from the
|
||||
/// MTFTPv6 server is stored here. Data that is uploaded to the
|
||||
/// MTFTPv6 server is read from here. Ignored if BufferSize is zero.
|
||||
///
|
||||
VOID *Buffer;
|
||||
///
|
||||
/// Pointer to the context that will be used by CheckPacket,
|
||||
/// Pointer to the context that will be used by CheckPacket,
|
||||
/// TimeoutCallback and PacketNeeded.
|
||||
///
|
||||
VOID *Context;
|
||||
///
|
||||
/// Pointer to the callback function to check the contents of the
|
||||
/// received packet.
|
||||
/// Pointer to the callback function to check the contents of the
|
||||
/// received packet.
|
||||
///
|
||||
EFI_MTFTP6_CHECK_PACKET CheckPacket;
|
||||
///
|
||||
|
@ -454,7 +454,7 @@ struct _EFI_MTFTP6_TOKEN {
|
|||
///
|
||||
EFI_MTFTP6_TIMEOUT_CALLBACK TimeoutCallback;
|
||||
///
|
||||
/// Pointer to the function to provide the needed packet contents.
|
||||
/// Pointer to the function to provide the needed packet contents.
|
||||
/// Only used in WriteFile() operation.
|
||||
///
|
||||
EFI_MTFTP6_PACKET_NEEDED PacketNeeded;
|
||||
|
@ -462,7 +462,7 @@ struct _EFI_MTFTP6_TOKEN {
|
|||
|
||||
/**
|
||||
Read the current operational settings.
|
||||
|
||||
|
||||
The GetModeData() function reads the current operational settings of this EFI MTFTPv6
|
||||
Protocol driver instance.
|
||||
|
||||
|
@ -475,8 +475,8 @@ struct _EFI_MTFTP6_TOKEN {
|
|||
@retval EFI_INVALID_PARAMETER This is NULL or ModeData is NULL.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_MTFTP6_GET_MODE_DATA)(
|
||||
IN EFI_MTFTP6_PROTOCOL *This,
|
||||
OUT EFI_MTFTP6_MODE_DATA *ModeData
|
||||
|
@ -485,42 +485,38 @@ EFI_STATUS
|
|||
/**
|
||||
Initializes, changes, or resets the default operational setting for this EFI MTFTPv6
|
||||
Protocol driver instance.
|
||||
|
||||
The Configure() function is used to set and change the configuration data for this EFI
|
||||
MTFTPv6 Protocol driver instance. The configuration data can be reset to startup defaults by calling
|
||||
Configure() with MtftpConfigData set to NULL. Whenever the instance is reset, any
|
||||
pending operation is aborted. By changing the EFI MTFTPv6 Protocol driver instance configuration
|
||||
data, the client can connect to different MTFTPv6 servers. The configuration parameters in
|
||||
MtftpConfigData are used as the default parameters in later MTFTPv6 operations and can be
|
||||
|
||||
The Configure() function is used to set and change the configuration data for this EFI
|
||||
MTFTPv6 Protocol driver instance. The configuration data can be reset to startup defaults by calling
|
||||
Configure() with MtftpConfigData set to NULL. Whenever the instance is reset, any
|
||||
pending operation is aborted. By changing the EFI MTFTPv6 Protocol driver instance configuration
|
||||
data, the client can connect to different MTFTPv6 servers. The configuration parameters in
|
||||
MtftpConfigData are used as the default parameters in later MTFTPv6 operations and can be
|
||||
overridden in later operations.
|
||||
|
||||
@param[in] This Pointer to the EFI_MTFTP6_PROTOCOL instance.
|
||||
@param[in] MtftpConfigData Pointer to the configuration data structure.
|
||||
@param[in] MtftpConfigData Pointer to the configuration data structure.
|
||||
|
||||
@retval EFI_SUCCESS The EFI MTFTPv6 Protocol instance was configured successfully.
|
||||
@retval EFI_INVALID_PARAMETER One or more following conditions are TRUE:
|
||||
- This is NULL.
|
||||
- MtftpConfigData.StationIp is neither zero nor one
|
||||
- MtftpConfigData.StationIp is neither zero nor one
|
||||
of the configured IP addresses in the underlying IPv6 driver.
|
||||
- MtftpCofigData.ServerIp is not a valid IPv6 unicast address.
|
||||
Note: It does not match UEFI 2.3 Specification.
|
||||
@retval EFI_ACCESS_DENIED - The configuration could not be changed at this time because there
|
||||
@retval EFI_ACCESS_DENIED - The configuration could not be changed at this time because there
|
||||
is some MTFTP background operation in progress.
|
||||
- MtftpCofigData.LocalPort is already in use.
|
||||
Note: It does not match UEFI 2.3 Specification.
|
||||
@retval EFI_NO_MAPPING The underlying IPv6 driver was responsible for choosing a source
|
||||
@retval EFI_NO_MAPPING The underlying IPv6 driver was responsible for choosing a source
|
||||
address for this instance, but no source address was available for use.
|
||||
@retval EFI_OUT_OF_RESOURCES The EFI MTFTPv6 Protocol driver instance data could not be
|
||||
@retval EFI_OUT_OF_RESOURCES The EFI MTFTPv6 Protocol driver instance data could not be
|
||||
allocated.
|
||||
Note: It is not defined in UEFI 2.3 Specification.
|
||||
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred. The EFI
|
||||
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred. The EFI
|
||||
MTFTPv6 Protocol driver instance is not configured.
|
||||
Note: It is not defined in UEFI 2.3 Specification.
|
||||
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_MTFTP6_CONFIGURE)(
|
||||
IN EFI_MTFTP6_PROTOCOL *This,
|
||||
IN EFI_MTFTP6_CONFIG_DATA *MtftpConfigData OPTIONAL
|
||||
|
@ -528,27 +524,26 @@ EFI_STATUS
|
|||
|
||||
/**
|
||||
Get information about a file from an MTFTPv6 server.
|
||||
|
||||
The GetInfo() function assembles an MTFTPv6 request packet with options, sends it to the
|
||||
MTFTPv6 server, and may return an MTFTPv6 OACK, MTFTPv6 ERROR, or ICMP ERROR packet.
|
||||
Retries occur only if no response packets are received from the MTFTPv6 server before the
|
||||
|
||||
The GetInfo() function assembles an MTFTPv6 request packet with options, sends it to the
|
||||
MTFTPv6 server, and may return an MTFTPv6 OACK, MTFTPv6 ERROR, or ICMP ERROR packet.
|
||||
Retries occur only if no response packets are received from the MTFTPv6 server before the
|
||||
timeout expires.
|
||||
|
||||
@param[in] This Pointer to the EFI_MTFTP6_PROTOCOL instance.
|
||||
@param[in] OverrideData Data that is used to override the existing parameters. If NULL, the
|
||||
@param[in] OverrideData Data that is used to override the existing parameters. If NULL, the
|
||||
default parameters that were set in the EFI_MTFTP6_PROTOCOL.Configure()
|
||||
function are used.
|
||||
function are used.
|
||||
@param[in] Filename Pointer to ASCIIZ file name string.
|
||||
@param[in] ModeStr Pointer to ASCIIZ mode string. If NULL, octet will be used
|
||||
@param[in] ModeStr Pointer to ASCIIZ mode string. If NULL, octet will be used
|
||||
@param[in] OptionCount Number of option/value string pairs in OptionList.
|
||||
@param[in] OptionList Pointer to array of option/value string pairs. Ignored if
|
||||
@param[in] OptionList Pointer to array of option/value string pairs. Ignored if
|
||||
OptionCount is zero.
|
||||
@param[out] PacketLength The number of bytes in the returned packet.
|
||||
@param[out] Packet The pointer to the received packet. This buffer must be freed by
|
||||
@param[out] Packet The pointer to the received packet. This buffer must be freed by
|
||||
the caller.
|
||||
|
||||
@retval EFI_SUCCESS An MTFTPv6 OACK packet was received and is in the Packet.
|
||||
Note: It does not match UEFI 2.3 Specification.
|
||||
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
|
||||
- This is NULL.
|
||||
- Filename is NULL
|
||||
|
@ -556,31 +551,27 @@ EFI_STATUS
|
|||
- One or more options in OptionList have wrong format.
|
||||
- PacketLength is NULL.
|
||||
- OverrideData.ServerIp is not valid unicast IPv6 addresses.
|
||||
@retval EFI_UNSUPPORTED One or more options in the OptionList are unsupported by
|
||||
@retval EFI_UNSUPPORTED One or more options in the OptionList are unsupported by
|
||||
this implementation.
|
||||
@retval EFI_NOT_STARTED The EFI MTFTPv6 Protocol driver has not been started.
|
||||
@retval EFI_NO_MAPPING The underlying IPv6 driver was responsible for choosing a source
|
||||
@retval EFI_NO_MAPPING The underlying IPv6 driver was responsible for choosing a source
|
||||
address for this instance, but no source address was available for use.
|
||||
@retval EFI_ACCESS_DENIED The previous operation has not completed yet.
|
||||
@retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
|
||||
@retval EFI_TFTP_ERROR An MTFTPv6 ERROR packet was received and is in the Packet.
|
||||
@retval EFI_NETWORK_UNREACHABLE An ICMP network unreachable error packet was received and the Packet is set to NULL.
|
||||
Note: It is not defined in UEFI 2.3 Specification.
|
||||
@retval EFI_HOST_UNREACHABLE An ICMP host unreachable error packet was received and the Packet is set to NULL.
|
||||
Note: It is not defined in UEFI 2.3 Specification.
|
||||
@retval EFI_PROTOCOL_UNREACHABLE An ICMP protocol unreachable error packet was received and the Packet is set to NULL.
|
||||
Note: It is not defined in UEFI 2.3 Specification.
|
||||
@retval EFI_PORT_UNREACHABLE An ICMP port unreachable error packet was received and the Packet is set to NULL.
|
||||
@retval EFI_ICMP_ERROR Some other ICMP ERROR packet was received and the Packet is set to NULL.
|
||||
Note: It does not match UEFI 2.3 Specification.
|
||||
@retval EFI_PROTOCOL_ERROR An unexpected MTFTPv6 packet was received and is in the Packet.
|
||||
@retval EFI_TIMEOUT No responses were received from the MTFTPv6 server.
|
||||
@retval EFI_DEVICE_ERROR An unexpected network error or system error occurred.
|
||||
@retval EFI_NO_MEDIA There was a media error.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_MTFTP6_GET_INFO)(
|
||||
IN EFI_MTFTP6_PROTOCOL *This,
|
||||
IN EFI_MTFTP6_OVERRIDE_DATA *OverrideData OPTIONAL,
|
||||
|
@ -595,23 +586,23 @@ EFI_STATUS
|
|||
/**
|
||||
Parse the options in an MTFTPv6 OACK packet.
|
||||
|
||||
The ParseOptions() function parses the option fields in an MTFTPv6 OACK packet and
|
||||
returns the number of options that were found and optionally a list of pointers to
|
||||
The ParseOptions() function parses the option fields in an MTFTPv6 OACK packet and
|
||||
returns the number of options that were found and optionally a list of pointers to
|
||||
the options in the packet.
|
||||
If one or more of the option fields are not valid, then EFI_PROTOCOL_ERROR is returned
|
||||
and *OptionCount and *OptionList stop at the last valid option.
|
||||
|
||||
@param[in] This Pointer to the EFI_MTFTP6_PROTOCOL instance.
|
||||
@param[in] PacketLen Length of the OACK packet to be parsed.
|
||||
@param[in] Packet Pointer to the OACK packet to be parsed.
|
||||
@param[out] OptionCount Pointer to the number of options in the following OptionList.
|
||||
@param[out] OptionList Pointer to EFI_MTFTP6_OPTION storage. Each pointer in the
|
||||
OptionList points to the corresponding MTFTP option buffer
|
||||
in the Packet. Call the EFI Boot Service FreePool() to
|
||||
release the OptionList if the options in this OptionList
|
||||
are not needed any more.
|
||||
@param[in] Packet Pointer to the OACK packet to be parsed.
|
||||
@param[out] OptionCount Pointer to the number of options in the following OptionList.
|
||||
@param[out] OptionList Pointer to EFI_MTFTP6_OPTION storage. Each pointer in the
|
||||
OptionList points to the corresponding MTFTP option buffer
|
||||
in the Packet. Call the EFI Boot Service FreePool() to
|
||||
release the OptionList if the options in this OptionList
|
||||
are not needed any more.
|
||||
|
||||
@retval EFI_SUCCESS The OACK packet was valid and the OptionCount and
|
||||
@retval EFI_SUCCESS The OACK packet was valid and the OptionCount and
|
||||
OptionList parameters have been updated.
|
||||
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
|
||||
- PacketLen is 0.
|
||||
|
@ -622,8 +613,8 @@ EFI_STATUS
|
|||
@retval EFI_PROTOCOL_ERROR One or more of the option fields is invalid.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_MTFTP6_PARSE_OPTIONS)(
|
||||
IN EFI_MTFTP6_PROTOCOL *This,
|
||||
IN UINT32 PacketLen,
|
||||
|
@ -635,36 +626,31 @@ EFI_STATUS
|
|||
/**
|
||||
Download a file from an MTFTPv6 server.
|
||||
|
||||
The ReadFile() function is used to initialize and start an MTFTPv6 download process and
|
||||
optionally wait for completion. When the download operation completes, whether successfully or
|
||||
not, the Token.Status field is updated by the EFI MTFTPv6 Protocol driver and then
|
||||
The ReadFile() function is used to initialize and start an MTFTPv6 download process and
|
||||
optionally wait for completion. When the download operation completes, whether successfully or
|
||||
not, the Token.Status field is updated by the EFI MTFTPv6 Protocol driver and then
|
||||
Token.Event is signaled if it is not NULL.
|
||||
|
||||
Data can be downloaded from the MTFTPv6 server into either of the following locations:
|
||||
- A fixed buffer that is pointed to by Token.Buffer
|
||||
- A download service function that is pointed to by Token.CheckPacket
|
||||
|
||||
If both Token.Buffer and Token.CheckPacket are used, then Token.CheckPacket
|
||||
Data can be downloaded from the MTFTPv6 server into either of the following locations:
|
||||
- A fixed buffer that is pointed to by Token.Buffer
|
||||
- A download service function that is pointed to by Token.CheckPacket
|
||||
|
||||
If both Token.Buffer and Token.CheckPacket are used, then Token.CheckPacket
|
||||
will be called first. If the call is successful, the packet will be stored in Token.Buffer.
|
||||
|
||||
@param[in] This Pointer to the EFI_MTFTP6_PROTOCOL instance.
|
||||
@param[in] Token Pointer to the token structure to provide the parameters that are
|
||||
@param[in] Token Pointer to the token structure to provide the parameters that are
|
||||
used in this operation.
|
||||
|
||||
@retval EFI_SUCCESS The data file has been transferred successfully.
|
||||
@retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
|
||||
@retval EFI_BUFFER_TOO_SMALL BufferSize is not zero but not large enough to hold the
|
||||
downloaded data in downloading process.
|
||||
Note: It does not match UEFI 2.3 Specification.
|
||||
@retval EFI_ABORTED Current operation is aborted by user.
|
||||
@retval EFI_NETWORK_UNREACHABLE An ICMP network unreachable error packet was received.
|
||||
Note: It is not defined in UEFI 2.3 Specification.
|
||||
@retval EFI_HOST_UNREACHABLE An ICMP host unreachable error packet was received.
|
||||
Note: It is not defined in UEFI 2.3 Specification.
|
||||
@retval EFI_PROTOCOL_UNREACHABLE An ICMP protocol unreachable error packet was received.
|
||||
Note: It is not defined in UEFI 2.3 Specification.
|
||||
@retval EFI_PORT_UNREACHABLE An ICMP port unreachable error packet was received.
|
||||
Note: It is not defined in UEFI 2.3 Specification.
|
||||
@retval EFI_ICMP_ERROR An ICMP ERROR packet was received.
|
||||
@retval EFI_TIMEOUT No responses were received from the MTFTPv6 server.
|
||||
@retval EFI_TFTP_ERROR An MTFTPv6 ERROR packet was received.
|
||||
|
@ -672,8 +658,8 @@ EFI_STATUS
|
|||
@retval EFI_NO_MEDIA There was a media error.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_MTFTP6_READ_FILE)(
|
||||
IN EFI_MTFTP6_PROTOCOL *This,
|
||||
IN EFI_MTFTP6_TOKEN *Token
|
||||
|
@ -682,25 +668,25 @@ EFI_STATUS
|
|||
/**
|
||||
Send a file to an MTFTPv6 server. May be unsupported in some implementations.
|
||||
|
||||
The WriteFile() function is used to initialize an uploading operation with the given option list
|
||||
and optionally wait for completion. If one or more of the options is not supported by the server, the
|
||||
unsupported options are ignored and a standard TFTP process starts instead. When the upload
|
||||
process completes, whether successfully or not, Token.Event is signaled, and the EFI MTFTPv6
|
||||
The WriteFile() function is used to initialize an uploading operation with the given option list
|
||||
and optionally wait for completion. If one or more of the options is not supported by the server, the
|
||||
unsupported options are ignored and a standard TFTP process starts instead. When the upload
|
||||
process completes, whether successfully or not, Token.Event is signaled, and the EFI MTFTPv6
|
||||
Protocol driver updates Token.Status.
|
||||
|
||||
The caller can supply the data to be uploaded in the following two modes:
|
||||
- Through the user-provided buffer
|
||||
- Through a callback function
|
||||
|
||||
With the user-provided buffer, the Token.BufferSize field indicates the length of the buffer,
|
||||
and the driver will upload the data in the buffer. With an EFI_MTFTP6_PACKET_NEEDED
|
||||
callback function, the driver will call this callback function to get more data from the user to upload.
|
||||
See the definition of EFI_MTFTP6_PACKET_NEEDED for more information. These two modes
|
||||
cannot be used at the same time. The callback function will be ignored if the user provides the
|
||||
With the user-provided buffer, the Token.BufferSize field indicates the length of the buffer,
|
||||
and the driver will upload the data in the buffer. With an EFI_MTFTP6_PACKET_NEEDED
|
||||
callback function, the driver will call this callback function to get more data from the user to upload.
|
||||
See the definition of EFI_MTFTP6_PACKET_NEEDED for more information. These two modes
|
||||
cannot be used at the same time. The callback function will be ignored if the user provides the
|
||||
buffer.
|
||||
|
||||
@param[in] This Pointer to the EFI_MTFTP6_PROTOCOL instance.
|
||||
@param[in] Token Pointer to the token structure to provide the parameters that are
|
||||
@param[in] Token Pointer to the token structure to provide the parameters that are
|
||||
used in this operation.
|
||||
|
||||
@retval EFI_SUCCESS The upload session has started.
|
||||
|
@ -713,10 +699,10 @@ EFI_STATUS
|
|||
- One or more options in Token.OptionList have wrong format.
|
||||
- Token.Buffer and Token.PacketNeeded are both NULL.
|
||||
- Token.OverrideData.ServerIp is not valid unicast IPv6 addresses.
|
||||
@retval EFI_UNSUPPORTED One or more options in the Token.OptionList are not
|
||||
@retval EFI_UNSUPPORTED One or more options in the Token.OptionList are not
|
||||
supported by this implementation.
|
||||
@retval EFI_NOT_STARTED The EFI MTFTPv6 Protocol driver has not been started.
|
||||
@retval EFI_NO_MAPPING The underlying IPv6 driver was responsible for choosing a source
|
||||
@retval EFI_NO_MAPPING The underlying IPv6 driver was responsible for choosing a source
|
||||
address for this instance, but no source address was available for use.
|
||||
@retval EFI_ALREADY_STARTED This Token is already being used in another MTFTPv6 session.
|
||||
@retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
|
||||
|
@ -724,8 +710,8 @@ EFI_STATUS
|
|||
@retval EFI_DEVICE_ERROR An unexpected network error or system error occurred.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_MTFTP6_WRITE_FILE)(
|
||||
IN EFI_MTFTP6_PROTOCOL *This,
|
||||
IN EFI_MTFTP6_TOKEN *Token
|
||||
|
@ -734,31 +720,31 @@ EFI_STATUS
|
|||
/**
|
||||
Download a data file directory from an MTFTPv6 server. May be unsupported in some implementations.
|
||||
|
||||
The ReadDirectory() function is used to return a list of files on the MTFTPv6 server that are
|
||||
logically (or operationally) related to Token.Filename. The directory request packet that is sent
|
||||
The ReadDirectory() function is used to return a list of files on the MTFTPv6 server that are
|
||||
logically (or operationally) related to Token.Filename. The directory request packet that is sent
|
||||
to the server is built with the option list that was provided by caller, if present.
|
||||
|
||||
|
||||
The file information that the server returns is put into either of the following locations:
|
||||
- A fixed buffer that is pointed to by Token.Buffer
|
||||
- A download service function that is pointed to by Token.CheckPacket
|
||||
|
||||
If both Token.Buffer and Token.CheckPacket are used, then Token.CheckPacket
|
||||
- A fixed buffer that is pointed to by Token.Buffer
|
||||
- A download service function that is pointed to by Token.CheckPacket
|
||||
|
||||
If both Token.Buffer and Token.CheckPacket are used, then Token.CheckPacket
|
||||
will be called first. If the call is successful, the packet will be stored in Token.Buffer.
|
||||
|
||||
The returned directory listing in the Token.Buffer or EFI_MTFTP6_PACKET consists of a list
|
||||
of two or three variable-length ASCII strings, each terminated by a null character, for each file in the
|
||||
directory. If the multicast option is involved, the first field of each directory entry is the static
|
||||
multicast IP address and UDP port number that is associated with the file name. The format of the
|
||||
field is ip:ip:ip:ip:port. If the multicast option is not involved, this field and its terminating
|
||||
|
||||
The returned directory listing in the Token.Buffer or EFI_MTFTP6_PACKET consists of a list
|
||||
of two or three variable-length ASCII strings, each terminated by a null character, for each file in the
|
||||
directory. If the multicast option is involved, the first field of each directory entry is the static
|
||||
multicast IP address and UDP port number that is associated with the file name. The format of the
|
||||
field is ip:ip:ip:ip:port. If the multicast option is not involved, this field and its terminating
|
||||
null character are not present.
|
||||
|
||||
The next field of each directory entry is the file name and the last field is the file information string.
|
||||
The information string contains the file size and the create/modify timestamp. The format of the
|
||||
information string is filesize yyyy-mm-dd hh:mm:ss:ffff. The timestamp is
|
||||
|
||||
The next field of each directory entry is the file name and the last field is the file information string.
|
||||
The information string contains the file size and the create/modify timestamp. The format of the
|
||||
information string is filesize yyyy-mm-dd hh:mm:ss:ffff. The timestamp is
|
||||
Coordinated Universal Time (UTC; also known as Greenwich Mean Time [GMT]).
|
||||
|
||||
@param[in] This Pointer to the EFI_MTFTP6_PROTOCOL instance.
|
||||
@param[in] Token Pointer to the token structure to provide the parameters that are
|
||||
@param[in] Token Pointer to the token structure to provide the parameters that are
|
||||
used in this operation.
|
||||
|
||||
@retval EFI_SUCCESS The MTFTPv6 related file "directory" has been downloaded.
|
||||
|
@ -771,10 +757,10 @@ EFI_STATUS
|
|||
- One or more options in Token.OptionList have wrong format.
|
||||
- Token.Buffer and Token.CheckPacket are both NULL.
|
||||
- Token.OverrideData.ServerIp is not valid unicast IPv6 addresses.
|
||||
@retval EFI_UNSUPPORTED One or more options in the Token.OptionList are not
|
||||
@retval EFI_UNSUPPORTED One or more options in the Token.OptionList are not
|
||||
supported by this implementation.
|
||||
@retval EFI_NOT_STARTED The EFI MTFTPv6 Protocol driver has not been started.
|
||||
@retval EFI_NO_MAPPING The underlying IPv6 driver was responsible for choosing a source
|
||||
@retval EFI_NO_MAPPING The underlying IPv6 driver was responsible for choosing a source
|
||||
address for this instance, but no source address was available for use.
|
||||
@retval EFI_ALREADY_STARTED This Token is already being used in another MTFTPv6 session.
|
||||
@retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
|
||||
|
@ -782,29 +768,29 @@ EFI_STATUS
|
|||
@retval EFI_DEVICE_ERROR An unexpected network error or system error occurred.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_MTFTP6_READ_DIRECTORY)(
|
||||
IN EFI_MTFTP6_PROTOCOL *This,
|
||||
IN EFI_MTFTP6_TOKEN *Token
|
||||
);
|
||||
|
||||
/**
|
||||
Polls for incoming data packets and processes outgoing data packets.
|
||||
Polls for incoming data packets and processes outgoing data packets.
|
||||
|
||||
The Poll() function can be used by network drivers and applications to increase the rate that data
|
||||
The Poll() function can be used by network drivers and applications to increase the rate that data
|
||||
packets are moved between the communications device and the transmit and receive queues.
|
||||
In some systems, the periodic timer event in the managed network driver may not poll the
|
||||
underlying communications device fast enough to transmit and/or receive all data packets without
|
||||
missing incoming packets or dropping outgoing packets. Drivers and applications that are
|
||||
experiencing packet loss should try calling the Poll() function more often.
|
||||
In some systems, the periodic timer event in the managed network driver may not poll the
|
||||
underlying communications device fast enough to transmit and/or receive all data packets without
|
||||
missing incoming packets or dropping outgoing packets. Drivers and applications that are
|
||||
experiencing packet loss should try calling the Poll() function more often.
|
||||
|
||||
@param[in] This Pointer to the EFI_MTFTP6_PROTOCOL instance.
|
||||
|
||||
@retval EFI_SUCCESS Incoming or outgoing data was processed.
|
||||
@retval EFI_NOT_STARTED This EFI MTFTPv6 Protocol instance has not been started.
|
||||
@retval EFI_INVALID_PARAMETER This is NULL.
|
||||
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
|
||||
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
|
||||
@retval EFI_TIMEOUT Data was dropped out of the transmit and/or receive queue.
|
||||
Consider increasing the polling rate.
|
||||
|
||||
|
@ -816,8 +802,8 @@ EFI_STATUS
|
|||
);
|
||||
|
||||
///
|
||||
/// The EFI_MTFTP6_PROTOCOL is designed to be used by UEFI drivers and applications to transmit
|
||||
/// and receive data files. The EFI MTFTPv6 Protocol driver uses the underlying EFI UDPv6 Protocol
|
||||
/// The EFI_MTFTP6_PROTOCOL is designed to be used by UEFI drivers and applications to transmit
|
||||
/// and receive data files. The EFI MTFTPv6 Protocol driver uses the underlying EFI UDPv6 Protocol
|
||||
/// driver and EFI IPv6 Protocol driver.
|
||||
///
|
||||
struct _EFI_MTFTP6_PROTOCOL {
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
@par Revision Reference:
|
||||
@par Revision Reference:
|
||||
This Protocol is introduced in UEFI Specification 2.0
|
||||
|
||||
**/
|
||||
|
@ -119,32 +119,31 @@ typedef struct {
|
|||
|
||||
typedef struct {
|
||||
///
|
||||
/// The Status in the CompletionToken will be set to one of
|
||||
/// the following values if the active open succeeds or an unexpected
|
||||
/// The Status in the CompletionToken will be set to one of
|
||||
/// the following values if the active open succeeds or an unexpected
|
||||
/// error happens:
|
||||
/// EFI_SUCCESS: The active open succeeds and the instance's
|
||||
/// EFI_SUCCESS: The active open succeeds and the instance's
|
||||
/// state is Tcp4StateEstablished.
|
||||
/// EFI_CONNECTION_RESET: The connect fails because the connection is reset
|
||||
/// either by instance itself or the communication peer.
|
||||
/// EFI_CONNECTION_REFUSED: The connect fails because this connection is initiated with
|
||||
/// an active open and the connection is refused.
|
||||
/// Note: It is not defined in UEFI 2.3 Specification.
|
||||
/// EFI_ABORTED: The active open is aborted.
|
||||
/// EFI_TIMEOUT: The connection establishment timer expires and
|
||||
/// EFI_TIMEOUT: The connection establishment timer expires and
|
||||
/// no more specific information is available.
|
||||
/// EFI_NETWORK_UNREACHABLE: The active open fails because
|
||||
/// an ICMP network unreachable error is received.
|
||||
/// EFI_HOST_UNREACHABLE: The active open fails because an
|
||||
/// ICMP host unreachable error is received.
|
||||
/// EFI_PROTOCOL_UNREACHABLE: The active open fails
|
||||
/// EFI_NETWORK_UNREACHABLE: The active open fails because
|
||||
/// an ICMP network unreachable error is received.
|
||||
/// EFI_HOST_UNREACHABLE: The active open fails because an
|
||||
/// ICMP host unreachable error is received.
|
||||
/// EFI_PROTOCOL_UNREACHABLE: The active open fails
|
||||
/// because an ICMP protocol unreachable error is received.
|
||||
/// EFI_PORT_UNREACHABLE: The connection establishment
|
||||
/// EFI_PORT_UNREACHABLE: The connection establishment
|
||||
/// timer times out and an ICMP port unreachable error is received.
|
||||
/// EFI_ICMP_ERROR: The connection establishment timer timeout and some other ICMP
|
||||
/// error is received.
|
||||
/// EFI_DEVICE_ERROR: An unexpected system or network error occurred.
|
||||
/// EFI_NO_MEDIA: There was a media error.
|
||||
///
|
||||
///
|
||||
EFI_TCP4_COMPLETION_TOKEN CompletionToken;
|
||||
} EFI_TCP4_CONNECTION_TOKEN;
|
||||
|
||||
|
@ -174,31 +173,30 @@ typedef struct {
|
|||
} EFI_TCP4_TRANSMIT_DATA;
|
||||
|
||||
typedef struct {
|
||||
///
|
||||
/// When transmission finishes or meets any unexpected error it will
|
||||
///
|
||||
/// When transmission finishes or meets any unexpected error it will
|
||||
/// be set to one of the following values:
|
||||
/// EFI_SUCCESS: The receiving or transmission operation
|
||||
/// EFI_SUCCESS: The receiving or transmission operation
|
||||
/// completes successfully.
|
||||
/// EFI_CONNECTION_FIN: The receiving operation fails because the communication peer
|
||||
/// has closed the connection and there is no more data in the
|
||||
/// EFI_CONNECTION_FIN: The receiving operation fails because the communication peer
|
||||
/// has closed the connection and there is no more data in the
|
||||
/// receive buffer of the instance.
|
||||
/// Note: It is not defined in UEFI 2.3 Specification.
|
||||
/// EFI_CONNECTION_RESET: The receiving or transmission operation fails
|
||||
/// because this connection is reset either by instance
|
||||
/// because this connection is reset either by instance
|
||||
/// itself or the communication peer.
|
||||
/// EFI_ABORTED: The receiving or transmission is aborted.
|
||||
/// EFI_TIMEOUT: The transmission timer expires and no more
|
||||
/// EFI_TIMEOUT: The transmission timer expires and no more
|
||||
/// specific information is available.
|
||||
/// EFI_NETWORK_UNREACHABLE: The transmission fails
|
||||
/// because an ICMP network unreachable error is received.
|
||||
/// EFI_HOST_UNREACHABLE: The transmission fails because an
|
||||
/// ICMP host unreachable error is received.
|
||||
/// EFI_PROTOCOL_UNREACHABLE: The transmission fails
|
||||
/// because an ICMP protocol unreachable error is received.
|
||||
/// EFI_PORT_UNREACHABLE: The transmission fails and an
|
||||
/// ICMP port unreachable error is received.
|
||||
/// EFI_ICMP_ERROR: The transmission fails and some other
|
||||
/// ICMP error is received.
|
||||
/// EFI_NETWORK_UNREACHABLE: The transmission fails
|
||||
/// because an ICMP network unreachable error is received.
|
||||
/// EFI_HOST_UNREACHABLE: The transmission fails because an
|
||||
/// ICMP host unreachable error is received.
|
||||
/// EFI_PROTOCOL_UNREACHABLE: The transmission fails
|
||||
/// because an ICMP protocol unreachable error is received.
|
||||
/// EFI_PORT_UNREACHABLE: The transmission fails and an
|
||||
/// ICMP port unreachable error is received.
|
||||
/// EFI_ICMP_ERROR: The transmission fails and some other
|
||||
/// ICMP error is received.
|
||||
/// EFI_DEVICE_ERROR: An unexpected system or network error occurs.
|
||||
/// EFI_NO_MEDIA: There was a media error.
|
||||
///
|
||||
|
@ -512,11 +510,10 @@ EFI_STATUS
|
|||
@retval EFI_NOT_STARTED This instance hasn't been configured.
|
||||
@retval EFI_NO_MAPPING When using the default address, configuration
|
||||
(DHCP, BOOTP,RARP, etc.) hasn't finished yet.
|
||||
@retval EFI_NOT_FOUND The asynchronous I/O request isn't found in the
|
||||
transmission or receive queue. It has either
|
||||
@retval EFI_NOT_FOUND The asynchronous I/O request isn't found in the
|
||||
transmission or receive queue. It has either
|
||||
completed or wasn't issued by Transmit() and Receive().
|
||||
@retval EFI_UNSUPPORTED The implementation does not support this function.
|
||||
Note: It is not defined in UEFI 2.3 Specification.
|
||||
|
||||
**/
|
||||
typedef
|
||||
|
@ -547,10 +544,10 @@ EFI_STATUS
|
|||
);
|
||||
|
||||
///
|
||||
/// The EFI_TCP4_PROTOCOL defines the EFI TCPv4 Protocol child to be used by
|
||||
/// any network drivers or applications to send or receive data stream.
|
||||
/// It can either listen on a specified port as a service or actively connected
|
||||
/// to remote peer as a client. Each instance has its own independent settings,
|
||||
/// The EFI_TCP4_PROTOCOL defines the EFI TCPv4 Protocol child to be used by
|
||||
/// any network drivers or applications to send or receive data stream.
|
||||
/// It can either listen on a specified port as a service or actively connected
|
||||
/// to remote peer as a client. Each instance has its own independent settings,
|
||||
/// such as the routing table.
|
||||
///
|
||||
struct _EFI_TCP4_PROTOCOL {
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
@par Revision Reference:
|
||||
@par Revision Reference:
|
||||
This Protocol is introduced in UEFI Specification 2.2
|
||||
|
||||
**/
|
||||
|
@ -42,33 +42,33 @@ typedef struct _EFI_TCP6_PROTOCOL EFI_TCP6_PROTOCOL;
|
|||
///
|
||||
typedef struct {
|
||||
///
|
||||
/// The EFI TCPv6 Protocol instance handle that is using this
|
||||
/// The EFI TCPv6 Protocol instance handle that is using this
|
||||
/// address/port pair.
|
||||
///
|
||||
EFI_HANDLE InstanceHandle;
|
||||
///
|
||||
/// The local IPv6 address to which this TCP instance is bound. Set
|
||||
/// to 0::/128, if this TCP instance is configured to listen on all
|
||||
///
|
||||
/// The local IPv6 address to which this TCP instance is bound. Set
|
||||
/// to 0::/128, if this TCP instance is configured to listen on all
|
||||
/// available source addresses.
|
||||
///
|
||||
///
|
||||
EFI_IPv6_ADDRESS LocalAddress;
|
||||
///
|
||||
///
|
||||
/// The local port number in host byte order.
|
||||
///
|
||||
///
|
||||
UINT16 LocalPort;
|
||||
///
|
||||
/// The remote IPv6 address. It may be 0::/128 if this TCP instance is
|
||||
/// not connected to any remote host.
|
||||
///
|
||||
///
|
||||
/// The remote IPv6 address. It may be 0::/128 if this TCP instance is
|
||||
/// not connected to any remote host.
|
||||
///
|
||||
EFI_IPv6_ADDRESS RemoteAddress;
|
||||
///
|
||||
/// The remote port number in host byte order. It may be zero if this
|
||||
///
|
||||
/// The remote port number in host byte order. It may be zero if this
|
||||
/// TCP instance is not connected to any remote host.
|
||||
///
|
||||
///
|
||||
UINT16 RemotePort;
|
||||
} EFI_TCP6_SERVICE_POINT;
|
||||
|
||||
///
|
||||
///
|
||||
/// EFI_TCP6_VARIABLE_DATA
|
||||
///
|
||||
typedef struct {
|
||||
|
@ -81,46 +81,46 @@ typedef struct {
|
|||
/// EFI_TCP6_ACCESS_POINT
|
||||
///
|
||||
typedef struct {
|
||||
///
|
||||
/// The local IP address assigned to this TCP instance. The EFI
|
||||
/// TCPv6 driver will only deliver incoming packets whose
|
||||
/// destination addresses exactly match the IP address. Set to zero to
|
||||
/// let the underlying IPv6 driver choose a source address. If not zero
|
||||
/// it must be one of the configured IP addresses in the underlying
|
||||
///
|
||||
/// The local IP address assigned to this TCP instance. The EFI
|
||||
/// TCPv6 driver will only deliver incoming packets whose
|
||||
/// destination addresses exactly match the IP address. Set to zero to
|
||||
/// let the underlying IPv6 driver choose a source address. If not zero
|
||||
/// it must be one of the configured IP addresses in the underlying
|
||||
/// IPv6 driver.
|
||||
///
|
||||
///
|
||||
EFI_IPv6_ADDRESS StationAddress;
|
||||
///
|
||||
/// The local port number to which this EFI TCPv6 Protocol instance
|
||||
/// is bound. If the instance doesn't care the local port number, set
|
||||
///
|
||||
/// The local port number to which this EFI TCPv6 Protocol instance
|
||||
/// is bound. If the instance doesn't care the local port number, set
|
||||
/// StationPort to zero to use an ephemeral port.
|
||||
///
|
||||
///
|
||||
UINT16 StationPort;
|
||||
///
|
||||
/// The remote IP address to which this EFI TCPv6 Protocol instance
|
||||
/// is connected. If ActiveFlag is FALSE (i.e. a passive TCPv6
|
||||
/// instance), the instance only accepts connections from the
|
||||
/// RemoteAddress. If ActiveFlag is TRUE the instance will
|
||||
/// connect to the RemoteAddress, i.e., outgoing segments will be
|
||||
/// sent to this address and only segments from this address will be
|
||||
/// delivered to the application. When ActiveFlag is FALSE, it
|
||||
/// can be set to zero and means that incoming connection requests
|
||||
///
|
||||
/// The remote IP address to which this EFI TCPv6 Protocol instance
|
||||
/// is connected. If ActiveFlag is FALSE (i.e. a passive TCPv6
|
||||
/// instance), the instance only accepts connections from the
|
||||
/// RemoteAddress. If ActiveFlag is TRUE the instance will
|
||||
/// connect to the RemoteAddress, i.e., outgoing segments will be
|
||||
/// sent to this address and only segments from this address will be
|
||||
/// delivered to the application. When ActiveFlag is FALSE, it
|
||||
/// can be set to zero and means that incoming connection requests
|
||||
/// from any address will be accepted.
|
||||
///
|
||||
///
|
||||
EFI_IPv6_ADDRESS RemoteAddress;
|
||||
///
|
||||
/// The remote port to which this EFI TCPv6 Protocol instance
|
||||
/// connects or from which connection request will be accepted by
|
||||
/// this EFI TCPv6 Protocol instance. If ActiveFlag is FALSE it
|
||||
/// can be zero and means that incoming connection request from
|
||||
/// any port will be accepted. Its value can not be zero when
|
||||
///
|
||||
/// The remote port to which this EFI TCPv6 Protocol instance
|
||||
/// connects or from which connection request will be accepted by
|
||||
/// this EFI TCPv6 Protocol instance. If ActiveFlag is FALSE it
|
||||
/// can be zero and means that incoming connection request from
|
||||
/// any port will be accepted. Its value can not be zero when
|
||||
/// ActiveFlag is TRUE.
|
||||
///
|
||||
///
|
||||
UINT16 RemotePort;
|
||||
///
|
||||
/// Set it to TRUE to initiate an active open. Set it to FALSE to
|
||||
///
|
||||
/// Set it to TRUE to initiate an active open. Set it to FALSE to
|
||||
/// initiate a passive open to act as a server.
|
||||
///
|
||||
///
|
||||
BOOLEAN ActiveFlag;
|
||||
} EFI_TCP6_ACCESS_POINT;
|
||||
|
||||
|
@ -128,94 +128,94 @@ typedef struct {
|
|||
/// EFI_TCP6_OPTION
|
||||
///
|
||||
typedef struct {
|
||||
///
|
||||
///
|
||||
/// The size of the TCP receive buffer.
|
||||
///
|
||||
///
|
||||
UINT32 ReceiveBufferSize;
|
||||
///
|
||||
///
|
||||
/// The size of the TCP send buffer.
|
||||
///
|
||||
///
|
||||
UINT32 SendBufferSize;
|
||||
///
|
||||
/// The length of incoming connect request queue for a passive
|
||||
///
|
||||
/// The length of incoming connect request queue for a passive
|
||||
/// instance. When set to zero, the value is implementation specific.
|
||||
///
|
||||
///
|
||||
UINT32 MaxSynBackLog;
|
||||
///
|
||||
/// The maximum seconds a TCP instance will wait for before a TCP
|
||||
/// connection established. When set to zero, the value is
|
||||
///
|
||||
/// The maximum seconds a TCP instance will wait for before a TCP
|
||||
/// connection established. When set to zero, the value is
|
||||
/// implementation specific.
|
||||
///
|
||||
///
|
||||
UINT32 ConnectionTimeout;
|
||||
///
|
||||
///The number of times TCP will attempt to retransmit a packet on
|
||||
///an established connection. When set to zero, the value is
|
||||
///The number of times TCP will attempt to retransmit a packet on
|
||||
///an established connection. When set to zero, the value is
|
||||
///implementation specific.
|
||||
///
|
||||
UINT32 DataRetries;
|
||||
///
|
||||
/// How many seconds to wait in the FIN_WAIT_2 states for a final
|
||||
/// FIN flag before the TCP instance is closed. This timeout is in
|
||||
/// effective only if the application has called Close() to
|
||||
/// disconnect the connection completely. It is also called
|
||||
/// FIN_WAIT_2 timer in other implementations. When set to zero,
|
||||
/// it should be disabled because the FIN_WAIT_2 timer itself is
|
||||
///
|
||||
/// How many seconds to wait in the FIN_WAIT_2 states for a final
|
||||
/// FIN flag before the TCP instance is closed. This timeout is in
|
||||
/// effective only if the application has called Close() to
|
||||
/// disconnect the connection completely. It is also called
|
||||
/// FIN_WAIT_2 timer in other implementations. When set to zero,
|
||||
/// it should be disabled because the FIN_WAIT_2 timer itself is
|
||||
/// against the standard. The default value is 60.
|
||||
///
|
||||
///
|
||||
UINT32 FinTimeout;
|
||||
///
|
||||
/// How many seconds to wait in TIME_WAIT state before the TCP
|
||||
/// instance is closed. The timer is disabled completely to provide a
|
||||
/// method to close the TCP connection quickly if it is set to zero. It
|
||||
///
|
||||
/// How many seconds to wait in TIME_WAIT state before the TCP
|
||||
/// instance is closed. The timer is disabled completely to provide a
|
||||
/// method to close the TCP connection quickly if it is set to zero. It
|
||||
/// is against the related RFC documents.
|
||||
///
|
||||
///
|
||||
UINT32 TimeWaitTimeout;
|
||||
///
|
||||
/// The maximum number of TCP keep-alive probes to send before
|
||||
/// giving up and resetting the connection if no response from the
|
||||
///
|
||||
/// The maximum number of TCP keep-alive probes to send before
|
||||
/// giving up and resetting the connection if no response from the
|
||||
/// other end. Set to zero to disable keep-alive probe.
|
||||
///
|
||||
///
|
||||
UINT32 KeepAliveProbes;
|
||||
///
|
||||
/// The number of seconds a connection needs to be idle before TCP
|
||||
/// sends out periodical keep-alive probes. When set to zero, the
|
||||
///
|
||||
/// The number of seconds a connection needs to be idle before TCP
|
||||
/// sends out periodical keep-alive probes. When set to zero, the
|
||||
/// value is implementation specific. It should be ignored if keep-
|
||||
/// alive probe is disabled.
|
||||
///
|
||||
///
|
||||
UINT32 KeepAliveTime;
|
||||
///
|
||||
/// The number of seconds between TCP keep-alive probes after the
|
||||
/// periodical keep-alive probe if no response. When set to zero, the
|
||||
///
|
||||
/// The number of seconds between TCP keep-alive probes after the
|
||||
/// periodical keep-alive probe if no response. When set to zero, the
|
||||
/// value is implementation specific. It should be ignored if keep-
|
||||
/// alive probe is disabled.
|
||||
///
|
||||
///
|
||||
UINT32 KeepAliveInterval;
|
||||
///
|
||||
/// Set it to TRUE to enable the Nagle algorithm as defined in
|
||||
///
|
||||
/// Set it to TRUE to enable the Nagle algorithm as defined in
|
||||
/// RFC896. Set it to FALSE to disable it.
|
||||
///
|
||||
///
|
||||
BOOLEAN EnableNagle;
|
||||
///
|
||||
/// Set it to TRUE to enable TCP timestamps option as defined in
|
||||
///
|
||||
/// Set it to TRUE to enable TCP timestamps option as defined in
|
||||
/// RFC1323. Set to FALSE to disable it.
|
||||
///
|
||||
///
|
||||
BOOLEAN EnableTimeStamp;
|
||||
///
|
||||
/// Set it to TRUE to enable TCP window scale option as defined in
|
||||
/// RFC1323. Set it to FALSE to disable it.
|
||||
///
|
||||
///
|
||||
/// Set it to TRUE to enable TCP window scale option as defined in
|
||||
/// RFC1323. Set it to FALSE to disable it.
|
||||
///
|
||||
BOOLEAN EnableWindowScaling;
|
||||
///
|
||||
/// Set it to TRUE to enable selective acknowledge mechanism
|
||||
/// described in RFC 2018. Set it to FALSE to disable it.
|
||||
/// Implementation that supports SACK can optionally support
|
||||
///
|
||||
/// Set it to TRUE to enable selective acknowledge mechanism
|
||||
/// described in RFC 2018. Set it to FALSE to disable it.
|
||||
/// Implementation that supports SACK can optionally support
|
||||
/// DSAK as defined in RFC 2883.
|
||||
///
|
||||
///
|
||||
BOOLEAN EnableSelectiveAck;
|
||||
///
|
||||
/// Set it to TRUE to enable path MTU discovery as defined in
|
||||
///
|
||||
/// Set it to TRUE to enable path MTU discovery as defined in
|
||||
/// RFC 1191. Set to FALSE to disable it.
|
||||
///
|
||||
///
|
||||
BOOLEAN EnablePathMtuDiscovery;
|
||||
} EFI_TCP6_OPTION;
|
||||
|
||||
|
@ -232,11 +232,11 @@ typedef struct {
|
|||
///
|
||||
UINT8 HopLimit;
|
||||
///
|
||||
/// Used to specify TCP communication end settings for a TCP instance.
|
||||
/// Used to specify TCP communication end settings for a TCP instance.
|
||||
///
|
||||
EFI_TCP6_ACCESS_POINT AccessPoint;
|
||||
///
|
||||
/// Used to configure the advance TCP option for a connection. If set
|
||||
/// Used to configure the advance TCP option for a connection. If set
|
||||
/// to NULL, implementation specific options for TCP connection will be used.
|
||||
///
|
||||
EFI_TCP6_OPTION *ControlOption;
|
||||
|
@ -261,16 +261,16 @@ typedef enum {
|
|||
|
||||
///
|
||||
/// EFI_TCP6_COMPLETION_TOKEN
|
||||
/// is used as a common header for various asynchronous tokens.
|
||||
/// is used as a common header for various asynchronous tokens.
|
||||
///
|
||||
typedef struct {
|
||||
///
|
||||
/// The Event to signal after request is finished and Status field is
|
||||
/// updated by the EFI TCPv6 Protocol driver.
|
||||
///
|
||||
/// The Event to signal after request is finished and Status field is
|
||||
/// updated by the EFI TCPv6 Protocol driver.
|
||||
///
|
||||
EFI_EVENT Event;
|
||||
///
|
||||
/// The result of the completed operation.
|
||||
/// The result of the completed operation.
|
||||
///
|
||||
EFI_STATUS Status;
|
||||
} EFI_TCP6_COMPLETION_TOKEN;
|
||||
|
@ -282,33 +282,32 @@ typedef struct {
|
|||
///
|
||||
typedef struct {
|
||||
///
|
||||
/// The Status in the CompletionToken will be set to one of
|
||||
/// the following values if the active open succeeds or an unexpected
|
||||
/// The Status in the CompletionToken will be set to one of
|
||||
/// the following values if the active open succeeds or an unexpected
|
||||
/// error happens:
|
||||
/// EFI_SUCCESS: The active open succeeds and the instance's
|
||||
/// EFI_SUCCESS: The active open succeeds and the instance's
|
||||
/// state is Tcp6StateEstablished.
|
||||
/// EFI_CONNECTION_RESET: The connect fails because the connection is reset
|
||||
/// either by instance itself or the communication peer.
|
||||
/// EFI_CONNECTION_REFUSED: The receiving or transmission operation fails because this
|
||||
/// EFI_CONNECTION_REFUSED: The receiving or transmission operation fails because this
|
||||
/// connection is refused.
|
||||
/// Note: It is not defined in UEFI 2.3 Specification.
|
||||
/// EFI_ABORTED: The active open is aborted.
|
||||
/// EFI_TIMEOUT: The connection establishment timer expires and
|
||||
/// EFI_TIMEOUT: The connection establishment timer expires and
|
||||
/// no more specific information is available.
|
||||
/// EFI_NETWORK_UNREACHABLE: The active open fails because
|
||||
/// an ICMP network unreachable error is received.
|
||||
/// EFI_HOST_UNREACHABLE: The active open fails because an
|
||||
/// ICMP host unreachable error is received.
|
||||
/// EFI_PROTOCOL_UNREACHABLE: The active open fails
|
||||
/// EFI_NETWORK_UNREACHABLE: The active open fails because
|
||||
/// an ICMP network unreachable error is received.
|
||||
/// EFI_HOST_UNREACHABLE: The active open fails because an
|
||||
/// ICMP host unreachable error is received.
|
||||
/// EFI_PROTOCOL_UNREACHABLE: The active open fails
|
||||
/// because an ICMP protocol unreachable error is received.
|
||||
/// EFI_PORT_UNREACHABLE: The connection establishment
|
||||
/// EFI_PORT_UNREACHABLE: The connection establishment
|
||||
/// timer times out and an ICMP port unreachable error is received.
|
||||
/// EFI_ICMP_ERROR: The connection establishment timer times
|
||||
/// EFI_ICMP_ERROR: The connection establishment timer times
|
||||
/// out and some other ICMP error is received.
|
||||
/// EFI_DEVICE_ERROR: An unexpected system or network error occurred.
|
||||
/// EFI_SECURITY_VIOLATION: The active open was failed because of IPSec policy check.
|
||||
/// EFI_NO_MEDIA: There was a media error.
|
||||
///
|
||||
///
|
||||
EFI_TCP6_COMPLETION_TOKEN CompletionToken;
|
||||
} EFI_TCP6_CONNECTION_TOKEN;
|
||||
|
||||
|
@ -318,10 +317,10 @@ typedef struct {
|
|||
///
|
||||
typedef struct {
|
||||
///
|
||||
/// The Status in CompletionToken will be set to the
|
||||
/// The Status in CompletionToken will be set to the
|
||||
/// following value if accept finishes:
|
||||
/// EFI_SUCCESS: A remote peer has successfully established a
|
||||
/// connection to this instance. A new TCP instance has also been
|
||||
/// EFI_SUCCESS: A remote peer has successfully established a
|
||||
/// connection to this instance. A new TCP instance has also been
|
||||
/// created for the connection.
|
||||
/// EFI_CONNECTION_RESET: The accept fails because the connection is reset either
|
||||
/// by instance itself or communication peer.
|
||||
|
@ -334,7 +333,7 @@ typedef struct {
|
|||
|
||||
///
|
||||
/// EFI_TCP6_FRAGMENT_DATA
|
||||
/// allows multiple receive or transmit buffers to be specified. The
|
||||
/// allows multiple receive or transmit buffers to be specified. The
|
||||
/// purpose of this structure is to provide scattered read and write.
|
||||
///
|
||||
typedef struct {
|
||||
|
@ -344,58 +343,58 @@ typedef struct {
|
|||
|
||||
///
|
||||
/// EFI_TCP6_RECEIVE_DATA
|
||||
/// When TCPv6 driver wants to deliver received data to the application,
|
||||
/// When TCPv6 driver wants to deliver received data to the application,
|
||||
/// it will pick up the first queued receiving token, update its
|
||||
/// Token->Packet.RxData then signal the Token->CompletionToken.Event.
|
||||
///
|
||||
typedef struct {
|
||||
///
|
||||
/// Whether the data is urgent. When this flag is set, the instance is in
|
||||
/// urgent mode.
|
||||
/// Whether the data is urgent. When this flag is set, the instance is in
|
||||
/// urgent mode.
|
||||
///
|
||||
BOOLEAN UrgentFlag;
|
||||
///
|
||||
/// When calling Receive() function, it is the byte counts of all
|
||||
/// Fragmentbuffer in FragmentTable allocated by user.
|
||||
/// When the token is signaled by TCPv6 driver it is the length of
|
||||
///
|
||||
/// When calling Receive() function, it is the byte counts of all
|
||||
/// Fragmentbuffer in FragmentTable allocated by user.
|
||||
/// When the token is signaled by TCPv6 driver it is the length of
|
||||
/// received data in the fragments.
|
||||
///
|
||||
///
|
||||
UINT32 DataLength;
|
||||
///
|
||||
///
|
||||
/// Number of fragments.
|
||||
///
|
||||
///
|
||||
UINT32 FragmentCount;
|
||||
///
|
||||
///
|
||||
/// An array of fragment descriptors.
|
||||
///
|
||||
///
|
||||
EFI_TCP6_FRAGMENT_DATA FragmentTable[1];
|
||||
} EFI_TCP6_RECEIVE_DATA;
|
||||
|
||||
///
|
||||
/// EFI_TCP6_TRANSMIT_DATA
|
||||
/// The EFI TCPv6 Protocol user must fill this data structure before sending a packet.
|
||||
/// The packet may contain multiple buffers in non-continuous memory locations.
|
||||
/// The packet may contain multiple buffers in non-continuous memory locations.
|
||||
///
|
||||
typedef struct {
|
||||
///
|
||||
/// Push If TRUE, data must be transmitted promptly, and the PUSH bit in
|
||||
/// the last TCP segment created will be set. If FALSE, data
|
||||
/// transmission may be delayed to combine with data from
|
||||
///
|
||||
/// Push If TRUE, data must be transmitted promptly, and the PUSH bit in
|
||||
/// the last TCP segment created will be set. If FALSE, data
|
||||
/// transmission may be delayed to combine with data from
|
||||
/// subsequent Transmit()s for efficiency.
|
||||
///
|
||||
///
|
||||
BOOLEAN Push;
|
||||
///
|
||||
/// The data in the fragment table are urgent and urgent point is in
|
||||
///
|
||||
/// The data in the fragment table are urgent and urgent point is in
|
||||
/// effect if TRUE. Otherwise those data are NOT considered urgent.
|
||||
///
|
||||
///
|
||||
BOOLEAN Urgent;
|
||||
///
|
||||
/// Length of the data in the fragments.
|
||||
/// Length of the data in the fragments.
|
||||
///
|
||||
UINT32 DataLength;
|
||||
///
|
||||
/// Number of fragments.
|
||||
///
|
||||
///
|
||||
UINT32 FragmentCount;
|
||||
///
|
||||
/// An array of fragment descriptors.
|
||||
|
@ -405,48 +404,47 @@ typedef struct {
|
|||
|
||||
///
|
||||
/// EFI_TCP6_IO_TOKEN
|
||||
/// returns When transmission finishes or meets any unexpected error.
|
||||
/// returns When transmission finishes or meets any unexpected error.
|
||||
///
|
||||
typedef struct {
|
||||
///
|
||||
/// When transmission finishes or meets any unexpected error it will
|
||||
///
|
||||
/// When transmission finishes or meets any unexpected error it will
|
||||
/// be set to one of the following values:
|
||||
/// EFI_SUCCESS: The receiving or transmission operation
|
||||
/// EFI_SUCCESS: The receiving or transmission operation
|
||||
/// completes successfully.
|
||||
/// EFI_CONNECTION_FIN: The receiving operation fails because the communication peer
|
||||
/// has closed the connection and there is no more data in the
|
||||
/// EFI_CONNECTION_FIN: The receiving operation fails because the communication peer
|
||||
/// has closed the connection and there is no more data in the
|
||||
/// receive buffer of the instance.
|
||||
/// Note: It is not defined in UEFI 2.3 Specification.
|
||||
/// EFI_CONNECTION_RESET: The receiving or transmission operation fails
|
||||
/// because this connection is reset either by instance
|
||||
/// because this connection is reset either by instance
|
||||
/// itself or the communication peer.
|
||||
/// EFI_ABORTED: The receiving or transmission is aborted.
|
||||
/// EFI_TIMEOUT: The transmission timer expires and no more
|
||||
/// EFI_TIMEOUT: The transmission timer expires and no more
|
||||
/// specific information is available.
|
||||
/// EFI_NETWORK_UNREACHABLE: The transmission fails
|
||||
/// because an ICMP network unreachable error is received.
|
||||
/// EFI_HOST_UNREACHABLE: The transmission fails because an
|
||||
/// ICMP host unreachable error is received.
|
||||
/// EFI_PROTOCOL_UNREACHABLE: The transmission fails
|
||||
/// because an ICMP protocol unreachable error is received.
|
||||
/// EFI_PORT_UNREACHABLE: The transmission fails and an
|
||||
/// ICMP port unreachable error is received.
|
||||
/// EFI_ICMP_ERROR: The transmission fails and some other
|
||||
/// ICMP error is received.
|
||||
/// EFI_NETWORK_UNREACHABLE: The transmission fails
|
||||
/// because an ICMP network unreachable error is received.
|
||||
/// EFI_HOST_UNREACHABLE: The transmission fails because an
|
||||
/// ICMP host unreachable error is received.
|
||||
/// EFI_PROTOCOL_UNREACHABLE: The transmission fails
|
||||
/// because an ICMP protocol unreachable error is received.
|
||||
/// EFI_PORT_UNREACHABLE: The transmission fails and an
|
||||
/// ICMP port unreachable error is received.
|
||||
/// EFI_ICMP_ERROR: The transmission fails and some other
|
||||
/// ICMP error is received.
|
||||
/// EFI_DEVICE_ERROR: An unexpected system or network error occurs.
|
||||
/// EFI_SECURITY_VIOLATION: The receiving or transmission
|
||||
/// EFI_SECURITY_VIOLATION: The receiving or transmission
|
||||
/// operation was failed because of IPSec policy check
|
||||
/// EFI_NO_MEDIA: There was a media error.
|
||||
///
|
||||
EFI_TCP6_COMPLETION_TOKEN CompletionToken;
|
||||
union {
|
||||
///
|
||||
/// When this token is used for receiving, RxData is a pointer to
|
||||
/// When this token is used for receiving, RxData is a pointer to
|
||||
/// EFI_TCP6_RECEIVE_DATA.
|
||||
///
|
||||
EFI_TCP6_RECEIVE_DATA *RxData;
|
||||
///
|
||||
/// When this token is used for transmitting, TxData is a pointer to
|
||||
///
|
||||
/// When this token is used for transmitting, TxData is a pointer to
|
||||
/// EFI_TCP6_TRANSMIT_DATA.
|
||||
///
|
||||
EFI_TCP6_TRANSMIT_DATA *TxData;
|
||||
|
@ -459,36 +457,36 @@ typedef struct {
|
|||
///
|
||||
typedef struct {
|
||||
///
|
||||
/// When close finishes or meets any unexpected error it will be set
|
||||
/// When close finishes or meets any unexpected error it will be set
|
||||
/// to one of the following values:
|
||||
/// EFI_SUCCESS: The close operation completes successfully.
|
||||
/// EFI_ABORTED: User called configure with NULL without close stopping.
|
||||
/// EFI_SECURITY_VIOLATION: The close operation was failed because of IPSec policy check.
|
||||
///
|
||||
///
|
||||
EFI_TCP6_COMPLETION_TOKEN CompletionToken;
|
||||
///
|
||||
/// Abort the TCP connection on close instead of the standard TCP
|
||||
/// close process when it is set to TRUE. This option can be used to
|
||||
///
|
||||
/// Abort the TCP connection on close instead of the standard TCP
|
||||
/// close process when it is set to TRUE. This option can be used to
|
||||
/// satisfy a fast disconnect.
|
||||
///
|
||||
///
|
||||
BOOLEAN AbortOnClose;
|
||||
} EFI_TCP6_CLOSE_TOKEN;
|
||||
|
||||
/**
|
||||
Get the current operational status.
|
||||
|
||||
|
||||
The GetModeData() function copies the current operational settings of this EFI TCPv6
|
||||
Protocol instance into user-supplied buffers. This function can also be used to retrieve
|
||||
the operational setting of underlying drivers such as IPv6, MNP, or SNP.
|
||||
|
||||
@param[in] This Pointer to the EFI_TCP6_PROTOCOL instance.
|
||||
@param[out] Tcp6State The buffer in which the current TCP state is returned.
|
||||
@param[out] Tcp6ConfigData The buffer in which the current TCP configuration is returned.
|
||||
@param[out] Ip6ModeData The buffer in which the current IPv6 configuration data used by
|
||||
the TCP instance is returned.
|
||||
@param[out] MnpConfigData The buffer in which the current MNP configuration data used
|
||||
@param[out] Tcp6ConfigData The buffer in which the current TCP configuration is returned.
|
||||
@param[out] Ip6ModeData The buffer in which the current IPv6 configuration data used by
|
||||
the TCP instance is returned.
|
||||
@param[out] MnpConfigData The buffer in which the current MNP configuration data used
|
||||
indirectly by the TCP instance is returned.
|
||||
@param[out] SnpModeData The buffer in which the current SNP mode data used indirectly by
|
||||
@param[out] SnpModeData The buffer in which the current SNP mode data used indirectly by
|
||||
the TCP instance is returned.
|
||||
|
||||
@retval EFI_SUCCESS The mode data was read.
|
||||
|
@ -514,17 +512,17 @@ EFI_STATUS
|
|||
The Configure() function does the following:
|
||||
- Initialize this TCP instance, i.e., initialize the communication end settings and
|
||||
specify active open or passive open for an instance.
|
||||
- Reset this TCP instance brutally, i.e., cancel all pending asynchronous tokens, flush
|
||||
- Reset this TCP instance brutally, i.e., cancel all pending asynchronous tokens, flush
|
||||
transmission and receiving buffer directly without informing the communication peer.
|
||||
|
||||
No other TCPv6 Protocol operation except Poll() can be executed by this instance until
|
||||
it is configured properly. For an active TCP instance, after a proper configuration it
|
||||
may call Connect() to initiates the three-way handshake. For a passive TCP instance,
|
||||
its state will transit to Tcp6StateListen after configuration, and Accept() may be
|
||||
may call Connect() to initiates the three-way handshake. For a passive TCP instance,
|
||||
its state will transit to Tcp6StateListen after configuration, and Accept() may be
|
||||
called to listen the incoming TCP connection requests. If Tcp6ConfigData is set to NULL,
|
||||
the instance is reset. Resetting process will be done brutally, the state machine will
|
||||
be set to Tcp6StateClosed directly, the receive queue and transmit queue will be flushed,
|
||||
and no traffic is allowed through this instance.
|
||||
and no traffic is allowed through this instance.
|
||||
|
||||
@param[in] This Pointer to the EFI_TCP6_PROTOCOL instance.
|
||||
@param[in] Tcp6ConfigData Pointer to the configure data to configure the instance.
|
||||
|
@ -532,19 +530,19 @@ EFI_STATUS
|
|||
|
||||
@retval EFI_SUCCESS The operational settings are set, changed, or reset
|
||||
successfully.
|
||||
@retval EFI_NO_MAPPING The underlying IPv6 driver was responsible for choosing a source
|
||||
address for this instance, but no source address was available for
|
||||
@retval EFI_NO_MAPPING The underlying IPv6 driver was responsible for choosing a source
|
||||
address for this instance, but no source address was available for
|
||||
use.
|
||||
@retval EFI_INVALID_PARAMETER One or more of the following conditions are TRUE:
|
||||
- This is NULL.
|
||||
- Tcp6ConfigData->AccessPoint.StationAddress is neither zero nor
|
||||
- Tcp6ConfigData->AccessPoint.StationAddress is neither zero nor
|
||||
one of the configured IP addresses in the underlying IPv6 driver.
|
||||
- Tcp6ConfigData->AccessPoint.RemoteAddress isn't a valid unicast
|
||||
- Tcp6ConfigData->AccessPoint.RemoteAddress isn't a valid unicast
|
||||
IPv6 address.
|
||||
- Tcp6ConfigData->AccessPoint.RemoteAddress is zero or
|
||||
Tcp6ConfigData->AccessPoint.RemotePort is zero when
|
||||
- Tcp6ConfigData->AccessPoint.RemoteAddress is zero or
|
||||
Tcp6ConfigData->AccessPoint.RemotePort is zero when
|
||||
Tcp6ConfigData->AccessPoint.ActiveFlag is TRUE.
|
||||
- A same access point has been configured in other TCP
|
||||
- A same access point has been configured in other TCP
|
||||
instance properly.
|
||||
@retval EFI_ACCESS_DENIED Configuring TCP instance when it is configured without
|
||||
calling Configure() with NULL to reset it.
|
||||
|
@ -568,9 +566,9 @@ EFI_STATUS
|
|||
The Connect() function will initiate an active open to the remote peer configured
|
||||
in current TCP instance if it is configured active. If the connection succeeds or
|
||||
fails due to any error, the ConnectionToken->CompletionToken.Event will be signaled
|
||||
and ConnectionToken->CompletionToken.Status will be updated accordingly. This
|
||||
function can only be called for the TCP instance in Tcp6StateClosed state. The
|
||||
instance will transfer into Tcp6StateSynSent if the function returns EFI_SUCCESS.
|
||||
and ConnectionToken->CompletionToken.Status will be updated accordingly. This
|
||||
function can only be called for the TCP instance in Tcp6StateClosed state. The
|
||||
instance will transfer into Tcp6StateSynSent if the function returns EFI_SUCCESS.
|
||||
If TCP three-way handshake succeeds, its state will become Tcp6StateEstablished,
|
||||
otherwise, the state will return to Tcp6StateClosed.
|
||||
|
||||
|
@ -578,7 +576,7 @@ EFI_STATUS
|
|||
@param[in] ConnectionToken Pointer to the connection token to return when the TCP three
|
||||
way handshake finishes.
|
||||
|
||||
@retval EFI_SUCCESS The connection request is successfully initiated and the state of
|
||||
@retval EFI_SUCCESS The connection request is successfully initiated and the state of
|
||||
this TCP instance has been changed to Tcp6StateSynSent.
|
||||
@retval EFI_NOT_STARTED This EFI TCPv6 Protocol instance has not been configured.
|
||||
@retval EFI_ACCESS_DENIED One or more of the following conditions are TRUE:
|
||||
|
@ -600,25 +598,25 @@ EFI_STATUS
|
|||
);
|
||||
|
||||
/**
|
||||
Listen on the passive instance to accept an incoming connection request. This is a
|
||||
Listen on the passive instance to accept an incoming connection request. This is a
|
||||
nonblocking operation.
|
||||
|
||||
The Accept() function initiates an asynchronous accept request to wait for an incoming
|
||||
connection on the passive TCP instance. If a remote peer successfully establishes a
|
||||
|
||||
The Accept() function initiates an asynchronous accept request to wait for an incoming
|
||||
connection on the passive TCP instance. If a remote peer successfully establishes a
|
||||
connection with this instance, a new TCP instance will be created and its handle will
|
||||
be returned in ListenToken->NewChildHandle. The newly created instance is configured
|
||||
by inheriting the passive instance's configuration and is ready for use upon return.
|
||||
The new instance is in the Tcp6StateEstablished state.
|
||||
|
||||
The ListenToken->CompletionToken.Event will be signaled when a new connection is
|
||||
accepted, user aborts the listen or connection is reset.
|
||||
The ListenToken->CompletionToken.Event will be signaled when a new connection is
|
||||
accepted, user aborts the listen or connection is reset.
|
||||
|
||||
This function only can be called when current TCP instance is in Tcp6StateListen state.
|
||||
This function only can be called when current TCP instance is in Tcp6StateListen state.
|
||||
|
||||
@param[in] This Pointer to the EFI_TCP6_PROTOCOL instance.
|
||||
@param[in] ListenToken Pointer to the listen token to return when operation finishes.
|
||||
|
||||
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The listen token has been queued successfully.
|
||||
@retval EFI_NOT_STARTED This EFI TCPv6 Protocol instance has not been configured.
|
||||
@retval EFI_ACCESS_DENIED One or more of the following are TRUE:
|
||||
|
@ -645,7 +643,7 @@ EFI_STATUS
|
|||
Queues outgoing data into the transmit queue.
|
||||
|
||||
The Transmit() function queues a sending request to this TCP instance along with the
|
||||
user data. The status of the token is updated and the event in the token will be
|
||||
user data. The status of the token is updated and the event in the token will be
|
||||
signaled once the data is sent out or some error occurs.
|
||||
|
||||
@param[in] This Pointer to the EFI_TCP6_PROTOCOL instance.
|
||||
|
@ -653,8 +651,8 @@ EFI_STATUS
|
|||
|
||||
@retval EFI_SUCCESS The data has been queued for transmission.
|
||||
@retval EFI_NOT_STARTED This EFI TCPv6 Protocol instance has not been configured.
|
||||
@retval EFI_NO_MAPPING The underlying IPv6 driver was responsible for choosing a
|
||||
source address for this instance, but no source address was
|
||||
@retval EFI_NO_MAPPING The underlying IPv6 driver was responsible for choosing a
|
||||
source address for this instance, but no source address was
|
||||
available for use.
|
||||
@retval EFI_INVALID_PARAMETER One or more of the following are TRUE:
|
||||
- This is NULL.
|
||||
|
@ -664,11 +662,11 @@ EFI_STATUS
|
|||
- Token->Packet.FragmentCount is zero.
|
||||
- Token->Packet.DataLength is not equal to the sum of fragment lengths.
|
||||
@retval EFI_ACCESS_DENIED One or more of the following conditions are TRUE:
|
||||
- A transmit completion token with the same Token->
|
||||
CompletionToken.Event was already in the
|
||||
- A transmit completion token with the same Token->
|
||||
CompletionToken.Event was already in the
|
||||
transmission queue.
|
||||
- The current instance is in Tcp6StateClosed state.
|
||||
- The current instance is a passive one and it is in
|
||||
- The current instance is a passive one and it is in
|
||||
Tcp6StateListen state.
|
||||
- User has called Close() to disconnect this connection.
|
||||
@retval EFI_NOT_READY The completion token could not be queued because the
|
||||
|
@ -688,15 +686,15 @@ EFI_STATUS
|
|||
/**
|
||||
Places an asynchronous receive request into the receiving queue.
|
||||
|
||||
The Receive() function places a completion token into the receive packet queue. This
|
||||
The Receive() function places a completion token into the receive packet queue. This
|
||||
function is always asynchronous. The caller must allocate the Token->CompletionToken.Event
|
||||
and the FragmentBuffer used to receive data. The caller also must fill the DataLength which
|
||||
represents the whole length of all FragmentBuffer. When the receive operation completes, the
|
||||
and the FragmentBuffer used to receive data. The caller also must fill the DataLength which
|
||||
represents the whole length of all FragmentBuffer. When the receive operation completes, the
|
||||
EFI TCPv6 Protocol driver updates the Token->CompletionToken.Status and Token->Packet.RxData
|
||||
fields and the Token->CompletionToken.Event is signaled. If got data the data and its length
|
||||
will be copied into the FragmentTable, at the same time the full length of received data will
|
||||
be recorded in the DataLength fields. Providing a proper notification function and context
|
||||
for the event will enable the user to receive the notification and receiving status. That
|
||||
for the event will enable the user to receive the notification and receiving status. That
|
||||
notification function is guaranteed to not be re-entered.
|
||||
|
||||
@param[in] This Pointer to the EFI_TCP6_PROTOCOL instance.
|
||||
|
@ -705,7 +703,7 @@ EFI_STATUS
|
|||
|
||||
@retval EFI_SUCCESS The receive completion token was cached.
|
||||
@retval EFI_NOT_STARTED This EFI TCPv6 Protocol instance has not been configured.
|
||||
@retval EFI_NO_MAPPING The underlying IPv6 driver was responsible for choosing a source
|
||||
@retval EFI_NO_MAPPING The underlying IPv6 driver was responsible for choosing a source
|
||||
address for this instance, but no source address was available for use.
|
||||
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
|
||||
- This is NULL.
|
||||
|
@ -713,20 +711,20 @@ EFI_STATUS
|
|||
- Token->CompletionToken.Event is NULL.
|
||||
- Token->Packet.RxData is NULL.
|
||||
- Token->Packet.RxData->DataLength is 0.
|
||||
- The Token->Packet.RxData->DataLength is not the
|
||||
- The Token->Packet.RxData->DataLength is not the
|
||||
sum of all FragmentBuffer length in FragmentTable.
|
||||
@retval EFI_OUT_OF_RESOURCES The receive completion token could not be queued due to a lack of
|
||||
system resources (usually memory).
|
||||
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
|
||||
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
|
||||
The EFI TCPv6 Protocol instance has been reset to startup defaults.
|
||||
@retval EFI_ACCESS_DENIED One or more of the following conditions is TRUE:
|
||||
- A receive completion token with the same Token->CompletionToken.Event
|
||||
was already in the receive queue.
|
||||
- The current instance is in Tcp6StateClosed state.
|
||||
- The current instance is a passive one and it is in
|
||||
- The current instance is a passive one and it is in
|
||||
Tcp6StateListen state.
|
||||
- User has called Close() to disconnect this connection.
|
||||
@retval EFI_CONNECTION_FIN The communication peer has closed the connection and there is no
|
||||
@retval EFI_CONNECTION_FIN The communication peer has closed the connection and there is no
|
||||
any buffered data in the receive buffer of this instance
|
||||
@retval EFI_NOT_READY The receive request could not be queued because the receive queue is full.
|
||||
|
||||
|
@ -742,16 +740,16 @@ EFI_STATUS
|
|||
Disconnecting a TCP connection gracefully or reset a TCP connection. This function is a
|
||||
nonblocking operation.
|
||||
|
||||
Initiate an asynchronous close token to TCP driver. After Close() is called, any buffered
|
||||
transmission data will be sent by TCP driver and the current instance will have a graceful close
|
||||
working flow described as RFC 793 if AbortOnClose is set to FALSE, otherwise, a rest packet
|
||||
will be sent by TCP driver to fast disconnect this connection. When the close operation completes
|
||||
successfully the TCP instance is in Tcp6StateClosed state, all pending asynchronous
|
||||
Initiate an asynchronous close token to TCP driver. After Close() is called, any buffered
|
||||
transmission data will be sent by TCP driver and the current instance will have a graceful close
|
||||
working flow described as RFC 793 if AbortOnClose is set to FALSE, otherwise, a rest packet
|
||||
will be sent by TCP driver to fast disconnect this connection. When the close operation completes
|
||||
successfully the TCP instance is in Tcp6StateClosed state, all pending asynchronous
|
||||
operations are signaled and any buffers used for TCP network traffic are flushed.
|
||||
|
||||
@param[in] This Pointer to the EFI_TCP6_PROTOCOL instance.
|
||||
@param[in] CloseToken Pointer to the close token to return when operation finishes.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The Close() is called successfully.
|
||||
@retval EFI_NOT_STARTED This EFI TCPv6 Protocol instance has not been configured.
|
||||
@retval EFI_ACCESS_DENIED One or more of the following are TRUE:
|
||||
|
@ -775,14 +773,14 @@ EFI_STATUS
|
|||
/**
|
||||
Abort an asynchronous connection, listen, transmission or receive request.
|
||||
|
||||
The Cancel() function aborts a pending connection, listen, transmit or
|
||||
The Cancel() function aborts a pending connection, listen, transmit or
|
||||
receive request.
|
||||
|
||||
If Token is not NULL and the token is in the connection, listen, transmission
|
||||
or receive queue when it is being cancelled, its Token->Status will be set
|
||||
or receive queue when it is being cancelled, its Token->Status will be set
|
||||
to EFI_ABORTED and then Token->Event will be signaled.
|
||||
|
||||
If the token is not in one of the queues, which usually means that the
|
||||
If the token is not in one of the queues, which usually means that the
|
||||
asynchronous operation has completed, EFI_NOT_FOUND is returned.
|
||||
|
||||
If Token is NULL all asynchronous token issued by Connect(), Accept(),
|
||||
|
@ -798,12 +796,12 @@ EFI_STATUS
|
|||
EFI_TCP6_COMPLETION_TOKEN is defined in
|
||||
EFI_TCP_PROTOCOL.Connect().
|
||||
|
||||
@retval EFI_SUCCESS The asynchronous I/O request is aborted and Token->Event
|
||||
is signaled.
|
||||
@retval EFI_SUCCESS The asynchronous I/O request is aborted and Token->Event
|
||||
is signaled.
|
||||
@retval EFI_INVALID_PARAMETER This is NULL.
|
||||
@retval EFI_NOT_STARTED This instance hasn't been configured.
|
||||
@retval EFI_NOT_FOUND The asynchronous I/O request isn't found in the transmission or
|
||||
receive queue. It has either completed or wasn't issued by
|
||||
@retval EFI_NOT_FOUND The asynchronous I/O request isn't found in the transmission or
|
||||
receive queue. It has either completed or wasn't issued by
|
||||
Transmit() and Receive().
|
||||
@retval EFI_UNSUPPORTED The implementation does not support this function.
|
||||
|
||||
|
@ -839,11 +837,11 @@ EFI_STATUS
|
|||
);
|
||||
|
||||
///
|
||||
/// EFI_TCP6_PROTOCOL
|
||||
/// EFI_TCP6_PROTOCOL
|
||||
/// defines the EFI TCPv6 Protocol child to be used by any network drivers or
|
||||
/// applications to send or receive data stream. It can either listen on a
|
||||
/// applications to send or receive data stream. It can either listen on a
|
||||
/// specified port as a service or actively connect to remote peer as a client.
|
||||
/// Each instance has its own independent settings.
|
||||
/// Each instance has its own independent settings.
|
||||
///
|
||||
struct _EFI_TCP6_PROTOCOL {
|
||||
EFI_TCP6_GET_MODE_DATA GetModeData;
|
||||
|
|
Loading…
Reference in New Issue