Updated network related definitions.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9279 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
vanjeff 2009-09-17 02:37:58 +00:00
parent cf15d83bf5
commit abbfadd791
6 changed files with 202 additions and 59 deletions

View File

@ -144,21 +144,31 @@ typedef enum {
#define EFI_DHCP6_IA_TYPE_TA 4 #define EFI_DHCP6_IA_TYPE_TA 4
#pragma pack(1) #pragma pack(1)
///
/// EFI_DHCP6_PACKET_OPTION
/// defines the format of the DHCPv6 option, See RFC 3315 for more information.
/// This data structure is used to reference option data that is packed in the DHCPv6 packet.
///
typedef struct { typedef struct {
/// ///
/// The DHCPv6 option code. /// The DHCPv6 option code, stored in network order.
/// ///
UINT16 OpCode; UINT16 OpCode;
/// ///
/// Length of the DHCPv6 option data. From the first byte to the last byte of the Data field. /// Length of the DHCPv6 option data, stored in network order.
/// From the first byte to the last byte of the Data field.
/// ///
UINT16 OpLen; UINT16 OpLen;
/// ///
/// The data for the DHCPv6 option. /// The data for the DHCPv6 option, stored in network order.
/// ///
UINT8 Data[1]; UINT8 Data[1];
} EFI_DHCP6_PACKET_OPTION; } EFI_DHCP6_PACKET_OPTION;
///
/// EFI_DHCP6_HEADER
/// defines the format of the DHCPv6 header. See RFC 3315 for more information.
///
typedef struct{ typedef struct{
/// ///
/// The DHCPv6 transaction ID. /// The DHCPv6 transaction ID.
@ -170,6 +180,10 @@ typedef struct{
UINT32 TransactionId:24; UINT32 TransactionId:24;
} EFI_DHCP6_HEADER; } EFI_DHCP6_HEADER;
///
/// EFI_DHCP6_PACKET
/// defines the format of the DHCPv6 packet. See RFC 3315 for more information.
///
typedef struct { typedef struct {
/// ///
/// Size of the EFI_DHCP6_PACKET buffer. /// Size of the EFI_DHCP6_PACKET buffer.

View File

@ -42,6 +42,42 @@
typedef struct _EFI_IP6_PROTOCOL EFI_IP6_PROTOCOL; typedef struct _EFI_IP6_PROTOCOL EFI_IP6_PROTOCOL;
///
/// EFI_IP6_ADDRESS_PAIR
///
typedef struct{
///
/// The EFI IPv6 Protocol instance handle that is using this address/prefix pair.
///
EFI_HANDLE InstanceHandle;
///
/// IPv6 address in network byte order.
///
EFI_IPv6_ADDRESS Ip6Address;
///
/// The length of the prefix associated with the Ip6Address.
///
UINT8 PrefixLength;
} EFI_IP6_ADDRESS_PAIR;
///
/// EFI_IP6_VARIABLE_DATA
///
typedef struct {
///
/// The handle of the driver that creates this entry.
///
EFI_HANDLE DriverHandle;
///
/// The number of IPv6 address pairs that follow this data structure.
///
UINT32 AddressCount;
///
/// List of IPv6 address pairs that are currently in use.
///
EFI_IP6_ADDRESS_PAIR AddressPairs[1];
} EFI_IP6_VARIABLE_DATA;
/// ///
/// ICMPv6 type definitions for error messages /// ICMPv6 type definitions for error messages
/// ///

View File

@ -322,8 +322,15 @@ EFI_STATUS
@param Packet The pointer to the received packet. This buffer must be freed by @param Packet The pointer to the received packet. This buffer must be freed by
the caller. the caller.
@retval EFI_SUCCESS An MTFTPv4 OACK packet was received and is in the Buffer. @retval EFI_SUCCESS An MTFTPv4 OACK packet was received and is in the Packet.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid. @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
- This is NULL.
- Filename is NULL.
- OptionCount is not zero and OptionList is NULL.
- One or more options in OptionList have wrong format.
- PacketLength is NULL.
- One or more IPv4 addresses in OverrideData are not valid
unicast IPv4 addresses if OverrideData is not NULL.
@retval EFI_UNSUPPORTED One or more options in the OptionList are in the @retval EFI_UNSUPPORTED One or more options in the OptionList are in the
unsupported list of structure EFI_MTFTP4_MODE_DATA. unsupported list of structure EFI_MTFTP4_MODE_DATA.
@retval EFI_NOT_STARTED The EFI MTFTPv4 Protocol driver has not been started. @retval EFI_NOT_STARTED The EFI MTFTPv4 Protocol driver has not been started.
@ -331,9 +338,13 @@ EFI_STATUS
RARP, etc.) has not finished yet. RARP, etc.) has not finished yet.
@retval EFI_ACCESS_DENIED The previous operation has not completed yet. @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_OUT_OF_RESOURCES Required system resources could not be allocated.
@retval EFI_TFTP_ERROR An MTFTPv4 ERROR packet was received and is in the buffer. @retval EFI_TFTP_ERROR An MTFTPv4 ERROR packet was received and is in the Packet.
@retval EFI_ICMP_ERROR An ICMP ERROR packet was received and is in the Buffer. @retval EFI_NETWORK_UNREACHABLE An ICMP network unreachable error packet was received and the Packet is set to NULL.
@retval EFI_PROTOCOL_ERROR An unexpected MTFTPv4 packet was received and is in the buffer. @retval EFI_HOST_UNREACHABLE An ICMP host unreachable error packet was received and the Packet is set to NULL.
@retval EFI_PROTOCOL_UNREACHABLE An ICMP protocol unreachable error packet was received and the Packet is set to NULL.
@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 is in the Buffer.
@retval EFI_PROTOCOL_ERROR An unexpected MTFTPv4 packet was received and is in the Packet.
@retval EFI_TIMEOUT No responses were received from the MTFTPv4 server. @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_DEVICE_ERROR An unexpected network error or system error occurred.
@ -393,10 +404,14 @@ EFI_STATUS
@retval EFI_SUCCESS The data file has been transferred successfully. @retval EFI_SUCCESS The data file has been transferred successfully.
@retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated. @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
@retval EFI_BUFFER_TOO_SMALL BufferSize is not large enough to hold the downloaded data @retval EFI_BUFFER_TOO_SMALL BufferSize is not zero but not large enough to hold the
in downloading process. downloaded data in downloading process.
@retval EFI_ABORTED Current operation is aborted by user. @retval EFI_ABORTED Current operation is aborted by user.
@retval EFI_ICMP_ERROR An ICMP ERROR packet was received. @retval EFI_NETWORK_UNREACHABLE An ICMP network unreachable error packet was received.
@retval EFI_HOST_UNREACHABLE An ICMP host unreachable error packet was received.
@retval EFI_PROTOCOL_UNREACHABLE An ICMP protocol unreachable error packet was received.
@retval EFI_PORT_UNREACHABLE An ICMP port unreachable error packet was received.
@retval EFI_ICMP_ERROR Some other ICMP ERROR packet was received.
@retval EFI_TIMEOUT No responses were received from the MTFTPv4 server. @retval EFI_TIMEOUT No responses were received from the MTFTPv4 server.
@retval EFI_TFTP_ERROR An MTFTPv4 ERROR packet was received. @retval EFI_TFTP_ERROR An MTFTPv4 ERROR packet was received.
@retval EFI_DEVICE_ERROR An unexpected network error or system error occurred. @retval EFI_DEVICE_ERROR An unexpected network error or system error occurred.

View File

@ -503,11 +503,16 @@ EFI_STATUS
- MtftpConfigData.StationIp is neither zero nor one - MtftpConfigData.StationIp is neither zero nor one
of the configured IP addresses in the underlying IPv6 driver. of the configured IP addresses in the underlying IPv6 driver.
- MtftpCofigData.ServerIp is not a valid IPv6 unicast address. - MtftpCofigData.ServerIp is not a valid IPv6 unicast address.
- The StationIP and LocalPort is already in use @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. is some MTFTP background operation in progress.
- MtftpCofigData.LocalPort is already in use.
@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 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
allocated.
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred. The EFI
MTFTPv6 Protocol driver instance is not configured.
**/ **/
typedef typedef
@ -538,7 +543,7 @@ EFI_STATUS
@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. the caller.
@retval EFI_SUCCESS An MTFTPv6 OACK packet was received and is in the Buffer. @retval EFI_SUCCESS An MTFTPv6 OACK packet was received and is in the Packet.
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE: @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
- This is NULL. - This is NULL.
- Filename is NULL - Filename is NULL
@ -554,7 +559,11 @@ EFI_STATUS
@retval EFI_ACCESS_DENIED The previous operation has not completed yet. @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_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_TFTP_ERROR An MTFTPv6 ERROR packet was received and is in the Packet.
@retval EFI_ICMP_ERROR An ICMP ERROR packet was received and the Packet is set to NULL. @retval EFI_NETWORK_UNREACHABLE An ICMP network unreachable error packet was received and the Packet is set to NULL.
@retval EFI_HOST_UNREACHABLE An ICMP host unreachable error packet was received and the Packet is set to NULL.
@retval EFI_PROTOCOL_UNREACHABLE An ICMP protocol unreachable error packet was received and the Packet is set to NULL.
@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.
@retval EFI_PROTOCOL_ERROR An unexpected MTFTPv6 packet was received and is in the Packet. @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_TIMEOUT No responses were received from the MTFTPv6 server.
@retval EFI_DEVICE_ERROR An unexpected network error or system error occurred. @retval EFI_DEVICE_ERROR An unexpected network error or system error occurred.
@ -634,9 +643,13 @@ EFI_STATUS
@retval EFI_SUCCESS The data file has been transferred successfully. @retval EFI_SUCCESS The data file has been transferred successfully.
@retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated. @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
@retval EFI_BUFFER_TOO_SMALL BufferSize is not large enough to hold the downloaded data @retval EFI_BUFFER_TOO_SMALL BufferSize is not zero but not large enough to hold the
in downloading process. downloaded data in downloading process.
@retval EFI_ABORTED Current operation is aborted by user. @retval EFI_ABORTED Current operation is aborted by user.
@retval EFI_NETWORK_UNREACHABLE An ICMP network unreachable error packet was received.
@retval EFI_HOST_UNREACHABLE An ICMP host unreachable error packet was received.
@retval EFI_PROTOCOL_UNREACHABLE An ICMP protocol unreachable error packet was received.
@retval EFI_PORT_UNREACHABLE An ICMP port unreachable error packet was received.
@retval EFI_ICMP_ERROR An ICMP ERROR packet was received. @retval EFI_ICMP_ERROR An ICMP ERROR packet was received.
@retval EFI_TIMEOUT No responses were received from the MTFTPv6 server. @retval EFI_TIMEOUT No responses were received from the MTFTPv6 server.
@retval EFI_TFTP_ERROR An MTFTPv6 ERROR packet was received. @retval EFI_TFTP_ERROR An MTFTPv6 ERROR packet was received.

View File

@ -118,6 +118,31 @@ typedef struct {
} EFI_TCP4_COMPLETION_TOKEN; } EFI_TCP4_COMPLETION_TOKEN;
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
/// error happens:
/// 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.
/// EFI_ABORTED: The active open is aborted.
/// 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
/// because an ICMP protocol unreachable error is received.
/// 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_TCP4_COMPLETION_TOKEN CompletionToken; EFI_TCP4_COMPLETION_TOKEN CompletionToken;
} EFI_TCP4_CONNECTION_TOKEN; } EFI_TCP4_CONNECTION_TOKEN;
@ -147,9 +172,42 @@ typedef struct {
} EFI_TCP4_TRANSMIT_DATA; } EFI_TCP4_TRANSMIT_DATA;
typedef struct { typedef struct {
///
/// 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
/// 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
/// receive buffer of the instance.
/// EFI_CONNECTION_RESET: The receiving or transmission operation fails
/// 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
/// 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_DEVICE_ERROR: An unexpected system or network error occurs.
/// EFI_NO_MEDIA: There was a media error.
///
EFI_TCP4_COMPLETION_TOKEN CompletionToken; EFI_TCP4_COMPLETION_TOKEN CompletionToken;
union { union {
///
/// When this token is used for receiving, RxData is a pointer to EFI_TCP4_RECEIVE_DATA.
///
EFI_TCP4_RECEIVE_DATA *RxData; EFI_TCP4_RECEIVE_DATA *RxData;
///
/// When this token is used for transmitting, TxData is a pointer to EFI_TCP4_TRANSMIT_DATA.
///
EFI_TCP4_TRANSMIT_DATA *TxData; EFI_TCP4_TRANSMIT_DATA *TxData;
} Packet; } Packet;
} EFI_TCP4_IO_TOKEN; } EFI_TCP4_IO_TOKEN;
@ -454,6 +512,7 @@ EFI_STATUS
@retval EFI_NOT_FOUND The asynchronous I/O request isn't found in the @retval EFI_NOT_FOUND The asynchronous I/O request isn't found in the
transmission or receive queue. It has either transmission or receive queue. It has either
completed or wasn't issued by Transmit() and Receive(). completed or wasn't issued by Transmit() and Receive().
@retval EFI_UNSUPPORTED The implementation does not support this function.
**/ **/
typedef typedef

View File

@ -289,6 +289,8 @@ typedef struct {
/// state is Tcp6StateEstablished. /// state is Tcp6StateEstablished.
/// EFI_CONNECTION_RESET: The connect fails because the connection is reset /// EFI_CONNECTION_RESET: The connect fails because the connection is reset
/// either by instance itself or the communication peer. /// either by instance itself or the communication peer.
/// EFI_CONNECTION_REFUSED: The receiving or transmission operation fails because this
/// connection is refused.
/// EFI_ABORTED: The active open is aborted. /// 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. /// no more specific information is available.
@ -409,6 +411,9 @@ typedef struct {
/// be set to one of the following values: /// be set to one of the following values:
/// EFI_SUCCESS: The receiving or transmission operation /// EFI_SUCCESS: The receiving or transmission operation
/// completes successfully. /// 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
/// receive buffer of the instance.
/// EFI_CONNECTION_RESET: The receiving or transmission operation fails /// 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. /// itself or the communication peer.
@ -796,6 +801,7 @@ EFI_STATUS
@retval EFI_NOT_FOUND The asynchronous I/O request isn't found in the transmission or @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 receive queue. It has either completed or wasn't issued by
Transmit() and Receive(). Transmit() and Receive().
@retval EFI_UNSUPPORTED The implementation does not support this function.
**/ **/
typedef typedef