iPXE
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
Ip4Config2.h File Reference

This file provides a definition of the EFI IPv4 Configuration II Protocol. More...

#include <ipxe/efi/Protocol/Ip4.h>

Go to the source code of this file.

Data Structures

struct  EFI_IP4_CONFIG2_INTERFACE_INFO
 EFI_IP4_CONFIG2_INTERFACE_INFO. More...
 
struct  EFI_IP4_CONFIG2_MANUAL_ADDRESS
 EFI_IP4_CONFIG2_MANUAL_ADDRESS. More...
 
struct  _EFI_IP4_CONFIG2_PROTOCOL
 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. More...
 

Macros

#define EFI_IP4_CONFIG2_PROTOCOL_GUID
 
#define EFI_IP4_CONFIG2_INTERFACE_INFO_NAME_SIZE   32
 EFI_IP4_CONFIG2_INTERFACE_INFO related definitions. More...
 

Typedefs

typedef struct _EFI_IP4_CONFIG2_PROTOCOL EFI_IP4_CONFIG2_PROTOCOL
 
typedef EFI_STATUS(EFIAPIEFI_IP4_CONFIG2_SET_DATA) (IN EFI_IP4_CONFIG2_PROTOCOL *This, IN EFI_IP4_CONFIG2_DATA_TYPE DataType, IN UINTN DataSize, IN VOID *Data)
 Set the configuration for the EFI IPv4 network stack running on the communication device this EFI IPv4 Configuration II Protocol instance manages. More...
 
typedef EFI_STATUS(EFIAPIEFI_IP4_CONFIG2_GET_DATA) (IN EFI_IP4_CONFIG2_PROTOCOL *This, IN EFI_IP4_CONFIG2_DATA_TYPE DataType, IN OUT UINTN *DataSize, IN VOID *Data OPTIONAL)
 Get the configuration data for the EFI IPv4 network stack running on the communication device this EFI IPv4 Configuration II Protocol instance manages. More...
 
typedef EFI_STATUS(EFIAPIEFI_IP4_CONFIG2_REGISTER_NOTIFY) (IN EFI_IP4_CONFIG2_PROTOCOL *This, IN EFI_IP4_CONFIG2_DATA_TYPE DataType, IN EFI_EVENT Event)
 Register an event that is to be signaled whenever a configuration process on the specified configuration data is done. More...
 
typedef EFI_STATUS(EFIAPIEFI_IP4_CONFIG2_UNREGISTER_NOTIFY) (IN EFI_IP4_CONFIG2_PROTOCOL *This, IN EFI_IP4_CONFIG2_DATA_TYPE DataType, IN EFI_EVENT Event)
 Remove a previously registered event for the specified configuration data. More...
 

Enumerations

enum  EFI_IP4_CONFIG2_DATA_TYPE {
  Ip4Config2DataTypeInterfaceInfo, Ip4Config2DataTypePolicy, Ip4Config2DataTypeManualAddress, Ip4Config2DataTypeGateway,
  Ip4Config2DataTypeDnsServer, Ip4Config2DataTypeMaximum
}
 EFI_IP4_CONFIG2_DATA_TYPE. More...
 
enum  EFI_IP4_CONFIG2_POLICY { Ip4Config2PolicyStatic, Ip4Config2PolicyDhcp, Ip4Config2PolicyMax }
 EFI_IP4_CONFIG2_POLICY. More...
 

Functions

 FILE_LICENCE (BSD2_PATENT)
 

Variables

EFI_GUID gEfiIp4Config2ProtocolGuid
 

Detailed Description

This file provides a definition of the EFI IPv4 Configuration II Protocol.

Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Revision Reference:
This Protocol is introduced in UEFI Specification 2.5

Definition in file Ip4Config2.h.

Macro Definition Documentation

◆ EFI_IP4_CONFIG2_PROTOCOL_GUID

#define EFI_IP4_CONFIG2_PROTOCOL_GUID
Value:
{ \
0x5b446ed1, 0xe30b, 0x4faa, {0x87, 0x1a, 0x36, 0x54, 0xec, 0xa3, 0x60, 0x80 } \
}

Definition at line 20 of file Ip4Config2.h.

◆ EFI_IP4_CONFIG2_INTERFACE_INFO_NAME_SIZE

#define EFI_IP4_CONFIG2_INTERFACE_INFO_NAME_SIZE   32

EFI_IP4_CONFIG2_INTERFACE_INFO related definitions.

Definition at line 83 of file Ip4Config2.h.

Typedef Documentation

◆ EFI_IP4_CONFIG2_PROTOCOL

Definition at line 25 of file Ip4Config2.h.

◆ EFI_IP4_CONFIG2_SET_DATA

typedef EFI_STATUS(EFIAPI * EFI_IP4_CONFIG2_SET_DATA) (IN EFI_IP4_CONFIG2_PROTOCOL *This, IN EFI_IP4_CONFIG2_DATA_TYPE DataType, IN UINTN DataSize, IN VOID *Data)

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 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 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 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.

Parameters
[in]ThisPointer to the EFI_IP4_CONFIG2_PROTOCOL instance.
[in]DataTypeThe type of data to set.
[in]DataSizeSize of the buffer pointed to by Data in bytes.
[in]DataThe data buffer to set. The type ofthe data buffer is associated with the DataType.
Return values
EFI_SUCCESSThe specified configuration data for the EFI IPv4 network stack is set successfully.
EFI_INVALID_PARAMETEROne or more of the following are TRUE: This is NULL. One or more fields in Data and DataSize do not match the requirement of the data type indicated by DataType.
EFI_WRITE_PROTECTEDThe specified configuration data is read-only or the specified configuration data can not be set under the current policy.
EFI_ACCESS_DENIEDAnother set operation on the specified configuration data is already in process.
EFI_NOT_READYAn asynchronous process is invoked to set the specified configuration data and the process is not finished yet.
EFI_BAD_BUFFER_SIZEThe DataSize does not match the size of the type indicated by DataType.
EFI_UNSUPPORTEDThis DataType is not supported.
EFI_OUT_OF_RESOURCESRequired system resources could not be allocated.
EFI_DEVICE_ERRORAn unexpected system error or network error occurred.

Definition at line 205 of file Ip4Config2.h.

◆ EFI_IP4_CONFIG2_GET_DATA

typedef EFI_STATUS(EFIAPI * EFI_IP4_CONFIG2_GET_DATA) (IN EFI_IP4_CONFIG2_PROTOCOL *This, IN EFI_IP4_CONFIG2_DATA_TYPE DataType, IN OUT UINTN *DataSize, IN VOID *Data OPTIONAL)

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 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 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 configuration data.

Parameters
[in]ThisPointer to the EFI_IP4_CONFIG2_PROTOCOL instance.
[in]DataTypeThe type of data to get.
[out]DataSizeOn input, in bytes, the size of Data. On output, in bytes, the size of buffer required to store the specified configuration data.
[in]DataThe 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.
Return values
EFI_SUCCESSThe specified configuration data is got successfully.
EFI_INVALID_PARAMETEROne or more of the followings are TRUE: This is NULL. DataSize is NULL. Data is NULL if *DataSizeis not zero.
EFI_BUFFER_TOO_SMALLThe size of Data is too small for the specified configuration data and the required size is returned in DataSize.
EFI_NOT_READYThe specified configuration data is not ready due to an already in progress asynchronous configuration process.
EFI_NOT_FOUNDThe specified configuration data is not found.

Definition at line 247 of file Ip4Config2.h.

◆ EFI_IP4_CONFIG2_REGISTER_NOTIFY

typedef EFI_STATUS(EFIAPI * EFI_IP4_CONFIG2_REGISTER_NOTIFY) (IN EFI_IP4_CONFIG2_PROTOCOL *This, IN EFI_IP4_CONFIG2_DATA_TYPE DataType, IN EFI_EVENT Event)

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 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 the signaling of the event in such case.

Parameters
[in]ThisPointer to the EFI_IP4_CONFIG2_PROTOCOL instance.
[in]DataTypeThe type of data to unregister the event for.
[in]EventThe event to register.
Return values
EFI_SUCCESSThe notification event for the specified configuration data is registered.
EFI_INVALID_PARAMETERThis is NULL or Event is NULL.
EFI_UNSUPPORTEDThe configuration data type specified by DataType is not supported.
EFI_OUT_OF_RESOURCESRequired system resources could not be allocated.
EFI_ACCESS_DENIEDThe Event is already registered for the DataType.

Definition at line 276 of file Ip4Config2.h.

◆ EFI_IP4_CONFIG2_UNREGISTER_NOTIFY

typedef EFI_STATUS(EFIAPI * EFI_IP4_CONFIG2_UNREGISTER_NOTIFY) (IN EFI_IP4_CONFIG2_PROTOCOL *This, IN EFI_IP4_CONFIG2_DATA_TYPE DataType, IN EFI_EVENT Event)

Remove a previously registered event for the specified configuration data.

This function removes a previously registeredevent for the specified configuration data.

Parameters
[in]ThisPointer to the EFI_IP4_CONFIG2_PROTOCOL instance.
[in]DataTypeThe type of data to remove the previously registered event for.
[in]EventThe event to unregister.
Return values
EFI_SUCCESSThe event registered for the specified configuration data is removed.
EFI_INVALID_PARAMETERThis is NULL or Event is NULL.
EFI_NOT_FOUNDThe Eventhas not been registered for the specified DataType.

Definition at line 297 of file Ip4Config2.h.

Enumeration Type Documentation

◆ EFI_IP4_CONFIG2_DATA_TYPE

EFI_IP4_CONFIG2_DATA_TYPE.

Enumerator
Ip4Config2DataTypeInterfaceInfo 

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.

Ip4Config2DataTypePolicy 

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.

Ip4Config2DataTypeManualAddress 

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.

Ip4Config2DataTypeGateway 

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 is cleared from the EFI IPv4 Configuration II Protocol instance.

Ip4Config2DataTypeDnsServer 

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.

Ip4Config2DataTypeMaximum 

Definition at line 30 of file Ip4Config2.h.

30  {
31  ///
32  /// The interface information of the communication device this EFI
33  /// IPv4 Configuration II Protocol instance manages. This type of
34  /// data is read only. The corresponding Data is of type
35  /// EFI_IP4_CONFIG2_INTERFACE_INFO.
36  ///
38  ///
39  /// The general configuration policy for the EFI IPv4 network stack
40  /// running on the communication device this EFI IPv4
41  /// Configuration II Protocol instance manages. The policy will
42  /// affect other configuration settings. The corresponding Data is of
43  /// type EFI_IP4_CONFIG2_POLICY.
44  ///
46  ///
47  /// The station addresses set manually for the EFI IPv4 network
48  /// stack. It is only configurable when the policy is
49  /// Ip4Config2PolicyStatic. The corresponding Data is of
50  /// type EFI_IP4_CONFIG2_MANUAL_ADDRESS. When DataSize
51  /// is 0 and Data is NULL, the existing configuration is cleared
52  /// from the EFI IPv4 Configuration II Protocol instance.
53  ///
55  ///
56  /// The gateway addresses set manually for the EFI IPv4 network
57  /// stack running on the communication device this EFI IPv4
58  /// Configuration II Protocol manages. It is not configurable when
59  /// the policy is Ip4Config2PolicyDhcp. The gateway
60  /// addresses must be unicast IPv4 addresses. The corresponding
61  /// Data is a pointer to an array of EFI_IPv4_ADDRESS instances.
62  /// When DataSize is 0 and Data is NULL, the existing configuration
63  /// is cleared from the EFI IPv4 Configuration II Protocol instance.
64  ///
66  ///
67  /// The DNS server list for the EFI IPv4 network stack running on
68  /// the communication device this EFI IPv4 Configuration II
69  /// Protocol manages. It is not configurable when the policy is
70  /// Ip4Config2PolicyDhcp. The DNS server addresses must be
71  /// unicast IPv4 addresses. The corresponding Data is a pointer to
72  /// an array of EFI_IPv4_ADDRESS instances. When DataSize
73  /// is 0 and Data is NULL, the existing configuration is cleared
74  /// from the EFI IPv4 Configuration II Protocol instance.
75  ///
The DNS server list for the EFI IPv4 network stack running on the communication device this EFI IPv4 ...
Definition: Ip4Config2.h:76
The interface information of the communication device this EFI IPv4 Configuration II Protocol instanc...
Definition: Ip4Config2.h:37
The general configuration policy for the EFI IPv4 network stack running on the communication device t...
Definition: Ip4Config2.h:45
The station addresses set manually for the EFI IPv4 network stack.
Definition: Ip4Config2.h:54
EFI_IP4_CONFIG2_DATA_TYPE
EFI_IP4_CONFIG2_DATA_TYPE.
Definition: Ip4Config2.h:30
The gateway addresses set manually for the EFI IPv4 network stack running on the communication device...
Definition: Ip4Config2.h:65

◆ EFI_IP4_CONFIG2_POLICY

EFI_IP4_CONFIG2_POLICY.

Enumerator
Ip4Config2PolicyStatic 

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.

Ip4Config2PolicyDhcp 

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.

Ip4Config2PolicyMax 

Definition at line 129 of file Ip4Config2.h.

129  {
130  ///
131  /// Under this policy, the Ip4Config2DataTypeManualAddress,
132  /// Ip4Config2DataTypeGateway and Ip4Config2DataTypeDnsServer configuration
133  /// data are required to be set manually. The EFI IPv4 Protocol will get all
134  /// required configuration such as IPv4 address, subnet mask and
135  /// gateway settings from the EFI IPv4 Configuration II protocol.
136  ///
138  ///
139  /// Under this policy, the Ip4Config2DataTypeManualAddress,
140  /// Ip4Config2DataTypeGateway and Ip4Config2DataTypeDnsServer configuration data are
141  /// not allowed to set via SetData(). All of these configurations are retrieved from DHCP
142  /// server or other auto-configuration mechanism.
143  ///
Under this policy, the Ip4Config2DataTypeManualAddress, Ip4Config2DataTypeGateway and Ip4Config2DataT...
Definition: Ip4Config2.h:144
EFI_IP4_CONFIG2_POLICY
EFI_IP4_CONFIG2_POLICY.
Definition: Ip4Config2.h:129
Under this policy, the Ip4Config2DataTypeManualAddress, Ip4Config2DataTypeGateway and Ip4Config2DataT...
Definition: Ip4Config2.h:137

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( BSD2_PATENT  )

Variable Documentation

◆ gEfiIp4Config2ProtocolGuid

EFI_GUID gEfiIp4Config2ProtocolGuid