MdePkg: Clean up source files
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
This file provides a definition of the EFI IPv4 Configuration II
|
||||
Protocol.
|
||||
|
||||
Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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<BR>
|
||||
@@ -33,48 +33,48 @@ typedef struct _EFI_IP4_CONFIG2_PROTOCOL EFI_IP4_CONFIG2_PROTOCOL;
|
||||
///
|
||||
typedef enum {
|
||||
///
|
||||
/// The interface information of the communication device this EFI
|
||||
/// IPv4 Configuration II Protocol instance manages. This type of
|
||||
/// data is read only. The corresponding Data is of type
|
||||
/// The interface information of the communication device this EFI
|
||||
/// IPv4 Configuration II Protocol instance manages. This type of
|
||||
/// data is read only. The corresponding Data is of type
|
||||
/// EFI_IP4_CONFIG2_INTERFACE_INFO.
|
||||
///
|
||||
Ip4Config2DataTypeInterfaceInfo,
|
||||
///
|
||||
/// The general configuration policy for the EFI IPv4 network stack
|
||||
/// running on the communication device this EFI IPv4
|
||||
/// Configuration II Protocol instance manages. The policy will
|
||||
/// affect other configuration settings. The corresponding Data is of
|
||||
/// The general configuration policy for the EFI IPv4 network stack
|
||||
/// running on the communication device this EFI IPv4
|
||||
/// Configuration II Protocol instance manages. The policy will
|
||||
/// affect other configuration settings. The corresponding Data is of
|
||||
/// type EFI_IP4_CONFIG2_POLICY.
|
||||
///
|
||||
Ip4Config2DataTypePolicy,
|
||||
///
|
||||
/// The station addresses set manually for the EFI IPv4 network
|
||||
/// stack. It is only configurable when the policy is
|
||||
/// Ip4Config2PolicyStatic. The corresponding Data is of
|
||||
/// type EFI_IP4_CONFIG2_MANUAL_ADDRESS. When DataSize
|
||||
/// is 0 and Data is NULL, the existing configuration is cleared
|
||||
/// The station addresses set manually for the EFI IPv4 network
|
||||
/// stack. It is only configurable when the policy is
|
||||
/// Ip4Config2PolicyStatic. The corresponding Data is of
|
||||
/// type EFI_IP4_CONFIG2_MANUAL_ADDRESS. When DataSize
|
||||
/// is 0 and Data is NULL, the existing configuration is cleared
|
||||
/// from the EFI IPv4 Configuration II Protocol instance.
|
||||
///
|
||||
Ip4Config2DataTypeManualAddress,
|
||||
///
|
||||
/// The gateway addresses set manually for the EFI IPv4 network
|
||||
/// stack running on the communication device this EFI IPv4
|
||||
/// Configuration II Protocol manages. It is not configurable when
|
||||
/// the policy is Ip4Config2PolicyDhcp. The gateway
|
||||
/// addresses must be unicast IPv4 addresses. The corresponding
|
||||
/// The gateway addresses set manually for the EFI IPv4 network
|
||||
/// stack running on the communication device this EFI IPv4
|
||||
/// Configuration II Protocol manages. It is not configurable when
|
||||
/// the policy is Ip4Config2PolicyDhcp. The gateway
|
||||
/// addresses must be unicast IPv4 addresses. The corresponding
|
||||
/// Data is a pointer to an array of EFI_IPv4_ADDRESS instances.
|
||||
/// When DataSize is 0 and Data is NULL, the existing configuration
|
||||
/// When DataSize is 0 and Data is NULL, the existing configuration
|
||||
/// is cleared from the EFI IPv4 Configuration II Protocol instance.
|
||||
///
|
||||
Ip4Config2DataTypeGateway,
|
||||
///
|
||||
/// The DNS server list for the EFI IPv4 network stack running on
|
||||
/// the communication device this EFI IPv4 Configuration II
|
||||
/// Protocol manages. It is not configurable when the policy is
|
||||
/// Ip4Config2PolicyDhcp. The DNS server addresses must be
|
||||
/// unicast IPv4 addresses. The corresponding Data is a pointer to
|
||||
/// an array of EFI_IPv4_ADDRESS instances. When DataSize
|
||||
/// is 0 and Data is NULL, the existing configuration is cleared
|
||||
/// The DNS server list for the EFI IPv4 network stack running on
|
||||
/// the communication device this EFI IPv4 Configuration II
|
||||
/// Protocol manages. It is not configurable when the policy is
|
||||
/// Ip4Config2PolicyDhcp. The DNS server addresses must be
|
||||
/// unicast IPv4 addresses. The corresponding Data is a pointer to
|
||||
/// an array of EFI_IPv4_ADDRESS instances. When DataSize
|
||||
/// is 0 and Data is NULL, the existing configuration is cleared
|
||||
/// from the EFI IPv4 Configuration II Protocol instance.
|
||||
///
|
||||
Ip4Config2DataTypeDnsServer,
|
||||
@@ -95,7 +95,7 @@ typedef struct {
|
||||
///
|
||||
CHAR16 Name[EFI_IP4_CONFIG2_INTERFACE_INFO_NAME_SIZE];
|
||||
///
|
||||
/// The interface type of the network interface. See RFC 1700,
|
||||
/// The interface type of the network interface. See RFC 1700,
|
||||
/// section "Number Hardware Type".
|
||||
///
|
||||
UINT8 IfType;
|
||||
@@ -120,8 +120,8 @@ typedef struct {
|
||||
///
|
||||
UINT32 RouteTableSize;
|
||||
///
|
||||
/// The route table of the IPv4 network stack runs on this interface.
|
||||
/// Set to NULL if RouteTableSize is zero. Type EFI_IP4_ROUTE_TABLE is defined in
|
||||
/// The route table of the IPv4 network stack runs on this interface.
|
||||
/// Set to NULL if RouteTableSize is zero. Type EFI_IP4_ROUTE_TABLE is defined in
|
||||
/// EFI_IP4_PROTOCOL.GetModeData().
|
||||
///
|
||||
EFI_IP4_ROUTE_TABLE *RouteTable OPTIONAL;
|
||||
@@ -132,17 +132,17 @@ typedef struct {
|
||||
///
|
||||
typedef enum {
|
||||
///
|
||||
/// Under this policy, the Ip4Config2DataTypeManualAddress,
|
||||
/// Ip4Config2DataTypeGateway and Ip4Config2DataTypeDnsServer configuration
|
||||
/// data are required to be set manually. The EFI IPv4 Protocol will get all
|
||||
/// required configuration such as IPv4 address, subnet mask and
|
||||
/// Under this policy, the Ip4Config2DataTypeManualAddress,
|
||||
/// Ip4Config2DataTypeGateway and Ip4Config2DataTypeDnsServer configuration
|
||||
/// data are required to be set manually. The EFI IPv4 Protocol will get all
|
||||
/// required configuration such as IPv4 address, subnet mask and
|
||||
/// gateway settings from the EFI IPv4 Configuration II protocol.
|
||||
///
|
||||
Ip4Config2PolicyStatic,
|
||||
///
|
||||
/// Under this policy, the Ip4Config2DataTypeManualAddress,
|
||||
/// Ip4Config2DataTypeGateway and Ip4Config2DataTypeDnsServer configuration data are
|
||||
/// not allowed to set via SetData(). All of these configurations are retrieved from DHCP
|
||||
/// Under this policy, the Ip4Config2DataTypeManualAddress,
|
||||
/// Ip4Config2DataTypeGateway and Ip4Config2DataTypeDnsServer configuration data are
|
||||
/// not allowed to set via SetData(). All of these configurations are retrieved from DHCP
|
||||
/// server or other auto-configuration mechanism.
|
||||
///
|
||||
Ip4Config2PolicyDhcp,
|
||||
@@ -153,58 +153,58 @@ typedef enum {
|
||||
/// EFI_IP4_CONFIG2_MANUAL_ADDRESS
|
||||
///
|
||||
typedef struct {
|
||||
///
|
||||
///
|
||||
/// The IPv4 unicast address.
|
||||
///
|
||||
EFI_IPv4_ADDRESS Address;
|
||||
///
|
||||
/// The subnet mask.
|
||||
/// The subnet mask.
|
||||
///
|
||||
EFI_IPv4_ADDRESS SubnetMask;
|
||||
} EFI_IP4_CONFIG2_MANUAL_ADDRESS;
|
||||
|
||||
/**
|
||||
Set the configuration for the EFI IPv4 network stack running on the communication device this EFI
|
||||
Set the configuration for the EFI IPv4 network stack running on the communication device this EFI
|
||||
IPv4 Configuration II Protocol instance manages.
|
||||
|
||||
This function is used to set the configuration data of type DataType for the EFI IPv4 network stack
|
||||
This function is used to set the configuration data of type DataType for the EFI IPv4 network stack
|
||||
running on the communication device this EFI IPv4 Configuration II Protocol instance manages.
|
||||
The successfully configured data is valid after system reset or power-off.
|
||||
The DataSize is used to calculate the count of structure instances in the Data for some
|
||||
The DataSize is used to calculate the count of structure instances in the Data for some
|
||||
DataType that multiple structure instances are allowed.
|
||||
This function is always non-blocking. When setting some typeof configuration data, an
|
||||
asynchronous process is invoked to check the correctness of the data, such as doing address conflict
|
||||
detection on the manually set local IPv4 address. EFI_NOT_READY is returned immediately to
|
||||
indicate that such an asynchronous process is invoked and the process is not finished yet. The caller
|
||||
This function is always non-blocking. When setting some typeof configuration data, an
|
||||
asynchronous process is invoked to check the correctness of the data, such as doing address conflict
|
||||
detection on the manually set local IPv4 address. EFI_NOT_READY is returned immediately to
|
||||
indicate that such an asynchronous process is invoked and the process is not finished yet. The caller
|
||||
willing to get the result of the asynchronous process is required to call RegisterDataNotify()
|
||||
to register an event on the specified configuration data. Once the event is signaled, the caller can call
|
||||
GetData()to get back the configuration data in order to know the result. For other types of
|
||||
configuration data that do not require an asynchronous configuration process, the result of the
|
||||
operation is immediately returned.
|
||||
to register an event on the specified configuration data. Once the event is signaled, the caller can call
|
||||
GetData()to get back the configuration data in order to know the result. For other types of
|
||||
configuration data that do not require an asynchronous configuration process, the result of the
|
||||
operation is immediately returned.
|
||||
|
||||
@param[in] This Pointer to the EFI_IP4_CONFIG2_PROTOCOL instance.
|
||||
@param[in] This Pointer to the EFI_IP4_CONFIG2_PROTOCOL instance.
|
||||
@param[in] DataType The type of data to set.
|
||||
@param[in] DataSize Size of the buffer pointed to by Data in bytes.
|
||||
@param[in] Data The data buffer to set. The type ofthe data buffer is associated
|
||||
with the DataType.
|
||||
@param[in] Data The data buffer to set. The type ofthe data buffer is associated
|
||||
with the DataType.
|
||||
|
||||
@retval EFI_SUCCESS The specified configuration data for the EFI IPv4 network stack is set
|
||||
@retval EFI_SUCCESS The specified configuration data for the EFI IPv4 network stack is set
|
||||
successfully.
|
||||
@retval EFI_INVALID_PARAMETER One or more of the following are TRUE:
|
||||
This is NULL.
|
||||
One or more fields in Data and DataSize do not match the
|
||||
One or more fields in Data and DataSize do not match the
|
||||
requirement of the data type indicated by DataType.
|
||||
@retval EFI_WRITE_PROTECTED The specified configuration data is read-only or the specified configuration
|
||||
@retval EFI_WRITE_PROTECTED The specified configuration data is read-only or the specified configuration
|
||||
data can not be set under the current policy.
|
||||
@retval EFI_ACCESS_DENIED Another set operation on the specified configuration data is already in process.
|
||||
@retval EFI_NOT_READY An asynchronous process is invoked to set the specified configuration data and
|
||||
@retval EFI_NOT_READY An asynchronous process is invoked to set the specified configuration data and
|
||||
the process is not finished yet.
|
||||
@retval EFI_BAD_BUFFER_SIZE The DataSize does not match the size of the type indicated by DataType.
|
||||
@retval EFI_BAD_BUFFER_SIZE The DataSize does not match the size of the type indicated by DataType.
|
||||
@retval EFI_UNSUPPORTED This DataType is not supported.
|
||||
@retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
|
||||
@retval EFI_DEVICE_ERROR An unexpected system error or network error occurred.
|
||||
**/
|
||||
typedef
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_IP4_CONFIG2_SET_DATA) (
|
||||
IN EFI_IP4_CONFIG2_PROTOCOL *This,
|
||||
@@ -214,35 +214,35 @@ EFI_STATUS
|
||||
);
|
||||
|
||||
/**
|
||||
Get the configuration data for the EFI IPv4 network stack running on the communication device this
|
||||
Get the configuration data for the EFI IPv4 network stack running on the communication device this
|
||||
EFI IPv4 Configuration II Protocol instance manages.
|
||||
|
||||
This function returns the configuration data of type DataType for the EFI IPv4 network stack
|
||||
This function returns the configuration data of type DataType for the EFI IPv4 network stack
|
||||
running on the communication device this EFI IPv4 Configuration II Protocol instance manages.
|
||||
The caller is responsible for allocating the buffer usedto return the specified configuration data and
|
||||
The caller is responsible for allocating the buffer usedto return the specified configuration data and
|
||||
the required size will be returned to the caller if the size of the buffer is too small.
|
||||
EFI_NOT_READY is returned if the specified configuration data is not ready due to an already in
|
||||
progress asynchronous configuration process. The caller can call RegisterDataNotify() to
|
||||
register an event on the specified configuration data. Once the asynchronous configuration process is
|
||||
finished, the event will be signaled and a subsequent GetData() call will return the specified
|
||||
EFI_NOT_READY is returned if the specified configuration data is not ready due to an already in
|
||||
progress asynchronous configuration process. The caller can call RegisterDataNotify() to
|
||||
register an event on the specified configuration data. Once the asynchronous configuration process is
|
||||
finished, the event will be signaled and a subsequent GetData() call will return the specified
|
||||
configuration data.
|
||||
|
||||
@param[in] This Pointer to the EFI_IP4_CONFIG2_PROTOCOL instance.
|
||||
@param[in] This Pointer to the EFI_IP4_CONFIG2_PROTOCOL instance.
|
||||
@param[in] DataType The type of data to get.
|
||||
@param[out] DataSize On input, in bytes, the size of Data. On output, in bytes, the size
|
||||
of buffer required to store the specified configuration data.
|
||||
@param[in] Data The data buffer in which the configuration data is returned. The
|
||||
type of the data buffer is associated with the DataType. Ignored
|
||||
if DataSize is 0.
|
||||
@param[out] DataSize On input, in bytes, the size of Data. On output, in bytes, the size
|
||||
of buffer required to store the specified configuration data.
|
||||
@param[in] Data The data buffer in which the configuration data is returned. The
|
||||
type of the data buffer is associated with the DataType. Ignored
|
||||
if DataSize is 0.
|
||||
|
||||
@retval EFI_SUCCESS The specified configuration data is got successfully.
|
||||
@retval EFI_INVALID_PARAMETER One or more of the followings are TRUE:
|
||||
This is NULL.
|
||||
DataSize is NULL.
|
||||
Data is NULL if *DataSizeis not zero.
|
||||
@retval EFI_BUFFER_TOO_SMALL The size of Data is too small for the specified configuration data
|
||||
@retval EFI_BUFFER_TOO_SMALL The size of Data is too small for the specified configuration data
|
||||
and the required size is returned in DataSize.
|
||||
@retval EFI_NOT_READY The specified configuration data is not ready due to an already in
|
||||
@retval EFI_NOT_READY The specified configuration data is not ready due to an already in
|
||||
progress asynchronous configuration process.
|
||||
@retval EFI_NOT_FOUND The specified configuration data is not found.
|
||||
**/
|
||||
@@ -256,19 +256,19 @@ EFI_STATUS
|
||||
);
|
||||
|
||||
/**
|
||||
Register an event that is to be signaled whenever a configuration process on the specified
|
||||
Register an event that is to be signaled whenever a configuration process on the specified
|
||||
configuration data is done.
|
||||
|
||||
This function registers an event that is to be signaled whenever a configuration process on the
|
||||
This function registers an event that is to be signaled whenever a configuration process on the
|
||||
specified configuration data is done. An event can be registered for different DataType
|
||||
simultaneously and the caller is responsible for determining which type of configuration data causes
|
||||
simultaneously and the caller is responsible for determining which type of configuration data causes
|
||||
the signaling of the event in such case.
|
||||
|
||||
@param[in] This Pointer to the EFI_IP4_CONFIG2_PROTOCOL instance.
|
||||
@param[in] This Pointer to the EFI_IP4_CONFIG2_PROTOCOL instance.
|
||||
@param[in] DataType The type of data to unregister the event for.
|
||||
@param[in] Event The event to register.
|
||||
|
||||
@retval EFI_SUCCESS The notification event for the specified configuration data is
|
||||
@retval EFI_SUCCESS The notification event for the specified configuration data is
|
||||
registered.
|
||||
@retval EFI_INVALID_PARAMETER This is NULL or Event is NULL.
|
||||
@retval EFI_UNSUPPORTED The configuration data type specified by DataType is not supported.
|
||||
@@ -288,7 +288,7 @@ EFI_STATUS
|
||||
|
||||
This function removes a previously registeredevent for the specified configuration data.
|
||||
|
||||
@param[in] This Pointer to the EFI_IP4_CONFIG2_PROTOCOL instance.
|
||||
@param[in] This Pointer to the EFI_IP4_CONFIG2_PROTOCOL instance.
|
||||
@param[in] DataType The type of data to remove the previously registered event for.
|
||||
@param[in] Event The event to unregister.
|
||||
|
||||
@@ -305,9 +305,9 @@ EFI_STATUS
|
||||
);
|
||||
|
||||
///
|
||||
/// The EFI_IP4_CONFIG2_PROTOCOL is designed to be the central repository for the common
|
||||
/// The EFI_IP4_CONFIG2_PROTOCOL is designed to be the central repository for the common
|
||||
/// configurations and the administrator configurable settings for the EFI IPv4 network stack.
|
||||
/// An EFI IPv4 Configuration II Protocol instance will be installed on each communication device that
|
||||
/// An EFI IPv4 Configuration II Protocol instance will be installed on each communication device that
|
||||
/// the EFI IPv4 network stack runs on.
|
||||
///
|
||||
struct _EFI_IP4_CONFIG2_PROTOCOL {
|
||||
|
Reference in New Issue
Block a user