TianoCore EDK2 master
Loading...
Searching...
No Matches
Ip4Config2Impl.c File Reference
#include "Ip4Impl.h"

Go to the source code of this file.

Functions

VOID EFIAPI Ip4Config2OnDhcp4SbInstalled (IN EFI_EVENT Event, IN VOID *Context)
 
EFI_STATUS Ip4Config2DestroyDhcp4 (IN OUT IP4_CONFIG2_INSTANCE *Instance)
 
VOID Ip4Config2OnPolicyChanged (IN IP4_SERVICE *IpSb, IN EFI_IP4_CONFIG2_POLICY NewPolicy)
 
EFI_STATUS EFIAPI Ip4Config2SignalEvent (IN NET_MAP *Map, IN NET_MAP_ITEM *Item, IN VOID *Arg)
 
EFI_STATUS Ip4Config2ReadConfigData (IN CHAR16 *VarName, IN OUT IP4_CONFIG2_INSTANCE *Instance)
 
EFI_STATUS Ip4Config2WriteConfigData (IN CHAR16 *VarName, IN IP4_CONFIG2_INSTANCE *Instance)
 
EFI_STATUS Ip4Config2BuildDefaultRouteTable (IN IP4_SERVICE *IpSb, OUT EFI_IP4_ROUTE_TABLE *Table)
 
EFI_STATUS Ip4Config2SetDefaultAddr (IN IP4_SERVICE *IpSb, IN IP4_ADDR StationAddress, IN IP4_ADDR SubnetMask)
 
EFI_STATUS Ip4Config2SetDefaultIf (IN IP4_CONFIG2_INSTANCE *Instance, IN IP4_ADDR StationAddress, IN IP4_ADDR SubnetMask, IN IP4_ADDR GatewayAddress)
 
VOID Ip4Config2CleanDhcp4 (IN IP4_CONFIG2_INSTANCE *Instance)
 
EFI_STATUS Ip4Config2SetDnsServerWorker (IN IP4_CONFIG2_INSTANCE *Instance, IN UINTN DataSize, IN VOID *Data)
 
VOID EFIAPI Ip4Config2OnDhcp4Complete (IN EFI_EVENT Event, IN VOID *Context)
 
EFI_STATUS Ip4StartAutoConfig (IN IP4_CONFIG2_INSTANCE *Instance)
 
EFI_STATUS Ip4Config2GetIfInfo (IN IP4_CONFIG2_INSTANCE *Instance, IN OUT UINTN *DataSize, IN VOID *Data OPTIONAL)
 
EFI_STATUS Ip4Config2SetPolicy (IN IP4_CONFIG2_INSTANCE *Instance, IN UINTN DataSize, IN VOID *Data)
 
EFI_STATUS Ip4Config2SetManualAddress (IN IP4_CONFIG2_INSTANCE *Instance, IN UINTN DataSize, IN VOID *Data)
 
EFI_STATUS Ip4Config2SetGateway (IN IP4_CONFIG2_INSTANCE *Instance, IN UINTN DataSize, IN VOID *Data)
 
EFI_STATUS Ip4Config2SetDnsServer (IN IP4_CONFIG2_INSTANCE *Instance, IN UINTN DataSize, IN VOID *Data)
 
VOID Ip4Config2InitIfInfo (IN IP4_SERVICE *IpSb, OUT EFI_IP4_CONFIG2_INTERFACE_INFO *IfInfo)
 
EFI_STATUS EFIAPI EfiIp4Config2SetData (IN EFI_IP4_CONFIG2_PROTOCOL *This, IN EFI_IP4_CONFIG2_DATA_TYPE DataType, IN UINTN DataSize, IN VOID *Data)
 
EFI_STATUS EFIAPI EfiIp4Config2GetData (IN EFI_IP4_CONFIG2_PROTOCOL *This, IN EFI_IP4_CONFIG2_DATA_TYPE DataType, IN OUT UINTN *DataSize, IN VOID *Data OPTIONAL)
 
EFI_STATUS EFIAPI EfiIp4Config2RegisterDataNotify (IN EFI_IP4_CONFIG2_PROTOCOL *This, IN EFI_IP4_CONFIG2_DATA_TYPE DataType, IN EFI_EVENT Event)
 
EFI_STATUS EFIAPI EfiIp4Config2UnregisterDataNotify (IN EFI_IP4_CONFIG2_PROTOCOL *This, IN EFI_IP4_CONFIG2_DATA_TYPE DataType, IN EFI_EVENT Event)
 
EFI_STATUS Ip4Config2InitInstance (OUT IP4_CONFIG2_INSTANCE *Instance)
 
VOID Ip4Config2CleanInstance (IN OUT IP4_CONFIG2_INSTANCE *Instance)
 
VOID EFIAPI Ip4AutoReconfigCallBackDpc (IN VOID *Context)
 
VOID EFIAPI Ip4AutoReconfigCallBack (IN EFI_EVENT Event, IN VOID *Context)
 

Variables

LIST_ENTRY mIp4Config2InstanceList = { &mIp4Config2InstanceList, &mIp4Config2InstanceList }
 

Detailed Description

The implementation of EFI IPv4 Configuration II Protocol.

Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file Ip4Config2Impl.c.

Function Documentation

◆ EfiIp4Config2GetData()

EFI_STATUS EFIAPI EfiIp4Config2GetData ( 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 that this EFI_IP4_CONFIG2_PROTOCOL instance manages.

This function returns the configuration data of type DataType for the EFI IPv4 network stack running on the communication device that this EFI IPv4 Configuration Protocol instance manages.

The caller is responsible for allocating the buffer used to return the specified configuration data. 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 asynchronous configuration process already in progress. 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.
[in,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. This is an optional parameter that may be NULL.
Return values
EFI_SUCCESSThe specified configuration data was obtained successfully.
EFI_INVALID_PARAMETEROne or more of the followings are TRUE:
  • This is NULL.
  • DataSize is NULL.
  • Data is NULL if *DataSize is 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 asynchronous configuration process already in progress.
EFI_NOT_FOUNDThe specified configuration data is not found.

Definition at line 1765 of file Ip4Config2Impl.c.

◆ EfiIp4Config2RegisterDataNotify()

EFI_STATUS EFIAPI EfiIp4Config2RegisterDataNotify ( IN EFI_IP4_CONFIG2_PROTOCOL This,
IN EFI_IP4_CONFIG2_DATA_TYPE  DataType,
IN EFI_EVENT  Event 
)

Register an event that is 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 performed. An event can be registered for a different DataType simultaneously. The caller is responsible for determining which type of configuration data causes the signaling of the event in such an event.

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 1835 of file Ip4Config2Impl.c.

◆ EfiIp4Config2SetData()

EFI_STATUS EFIAPI EfiIp4Config2SetData ( 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_IP4_CONFIG2_PROTOCOL instance manages.

This function is used to set the configuration data of type DataType for the EFI IPv4 network stack that is running on the communication device that this EFI IPv4 Configuration Protocol instance manages.

DataSize is used to calculate the count of structure instances in the Data for a DataType in which multiple structure instances are allowed.

This function is always non-blocking. When setting some type of configuration data, an asynchronous process is invoked to check the correctness of the data, such as performing Duplicate Address Detection on the manually set local IPv4 addresses. EFI_NOT_READY is returned immediately to indicate that such an asynchronous process is invoked, and the process is not finished yet. The caller wanting 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 obtain the configuration data and 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]ThisThe pointer 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 of the data buffer is associated with the DataType.
Return values
EFI_SUCCESSThe specified configuration data for the EFI IPv6 network stack was 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 cannot 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 was 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 1663 of file Ip4Config2Impl.c.

◆ EfiIp4Config2UnregisterDataNotify()

EFI_STATUS EFIAPI EfiIp4Config2UnregisterDataNotify ( 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.

Parameters
ThisThe pointer to the EFI_IP4_CONFIG2_PROTOCOL instance.
DataTypeThe type of data to remove from the previously registered event.
EventThe event to be unregistered.
Return values
EFI_SUCCESSThe event registered for the specified configuration data was removed.
EFI_INVALID_PARAMETERThis is NULL or Event is NULL.
EFI_NOT_FOUNDThe Event has not been registered for the specified DataType.

Definition at line 1896 of file Ip4Config2Impl.c.

◆ Ip4AutoReconfigCallBack()

VOID EFIAPI Ip4AutoReconfigCallBack ( IN EFI_EVENT  Event,
IN VOID *  Context 
)

Request Ip4AutoReconfigCallBackDpc as a DPC at TPL_CALLBACK.

Parameters
EventThe event that is signalled.
ContextThe IP4 service binding instance.

Definition at line 2134 of file Ip4Config2Impl.c.

◆ Ip4AutoReconfigCallBackDpc()

VOID EFIAPI Ip4AutoReconfigCallBackDpc ( IN VOID *  Context)

The event handle for IP4 auto reconfiguration. The original default interface and route table will be removed as the default.

Parameters
[in]ContextThe IP4 service binding instance.

Definition at line 2105 of file Ip4Config2Impl.c.

◆ Ip4Config2BuildDefaultRouteTable()

EFI_STATUS Ip4Config2BuildDefaultRouteTable ( IN IP4_SERVICE IpSb,
OUT EFI_IP4_ROUTE_TABLE Table 
)

Build a EFI_IP4_ROUTE_TABLE to be returned to the caller of GetModeData. The EFI_IP4_ROUTE_TABLE is clumsy to use in the internal operation of the IP4 driver.

Parameters
[in]IpSbThe IP4 service binding instance.
[out]TableThe built IP4 route table.
Return values
EFI_SUCCESSThe route table is successfully build
EFI_NOT_FOUNDFailed to allocate the memory for the route table.

Definition at line 377 of file Ip4Config2Impl.c.

◆ Ip4Config2CleanDhcp4()

VOID Ip4Config2CleanDhcp4 ( IN IP4_CONFIG2_INSTANCE Instance)

Release all the DHCP related resources.

Parameters
InstanceThe IP4 config2 instance.
Returns
None

Definition at line 626 of file Ip4Config2Impl.c.

◆ Ip4Config2CleanInstance()

VOID Ip4Config2CleanInstance ( IN OUT IP4_CONFIG2_INSTANCE Instance)

Release an IP4_CONFIG2_INSTANCE.

Parameters
[in,out]InstanceThe buffer of IP4_CONFIG2_INSTANCE to be freed.

Definition at line 2049 of file Ip4Config2Impl.c.

◆ Ip4Config2DestroyDhcp4()

EFI_STATUS Ip4Config2DestroyDhcp4 ( IN OUT IP4_CONFIG2_INSTANCE Instance)

Destroy the Dhcp4 child in IP4_CONFIG2_INSTANCE and release the resources.

Parameters
[in,out]InstanceThe buffer of IP4 config2 instance to be freed.
Return values
EFI_SUCCESSThe child was successfully destroyed.
OthersFailed to destroy the child.

Definition at line 40 of file Ip4Config2Impl.c.

◆ Ip4Config2GetIfInfo()

EFI_STATUS Ip4Config2GetIfInfo ( IN IP4_CONFIG2_INSTANCE Instance,
IN OUT UINTN DataSize,
IN VOID *Data  OPTIONAL 
)

The work function is to get the interface information of the communication device this IP4_CONFIG2_INSTANCE manages.

Parameters
[in]InstancePointer to the IP4 config2 instance data.
[in,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. Ignored if DataSize is ZERO.
Return values
EFI_BUFFER_TOO_SMALLThe size of Data is too small for the specified configuration data, and the required size is returned in DataSize.
EFI_SUCCESSThe specified configuration data was obtained.

Definition at line 1058 of file Ip4Config2Impl.c.

◆ Ip4Config2InitIfInfo()

VOID Ip4Config2InitIfInfo ( IN IP4_SERVICE IpSb,
OUT EFI_IP4_CONFIG2_INTERFACE_INFO IfInfo 
)

Generate the operational state of the interface this IP4 config2 instance manages and output in EFI_IP4_CONFIG2_INTERFACE_INFO.

Parameters
[in]IpSbThe pointer to the IP4 service binding instance.
[out]IfInfoThe pointer to the IP4 config2 interface information structure.

Definition at line 1597 of file Ip4Config2Impl.c.

◆ Ip4Config2InitInstance()

EFI_STATUS Ip4Config2InitInstance ( OUT IP4_CONFIG2_INSTANCE Instance)

Initialize an IP4_CONFIG2_INSTANCE.

Parameters
[out]InstanceThe buffer of IP4_CONFIG2_INSTANCE to be initialized.
Return values
EFI_OUT_OF_RESOURCESFailed to allocate resources to complete the operation.
EFI_SUCCESSThe IP4_CONFIG2_INSTANCE initialized successfully.

Definition at line 1942 of file Ip4Config2Impl.c.

◆ Ip4Config2OnDhcp4Complete()

VOID EFIAPI Ip4Config2OnDhcp4Complete ( IN EFI_EVENT  Event,
IN VOID *  Context 
)

Callback function when DHCP process finished. It will save the retrieved IP configure parameter from DHCP to the NVRam.

Parameters
EventThe callback event
ContextOpaque context to the callback
Returns
None

Definition at line 790 of file Ip4Config2Impl.c.

◆ Ip4Config2OnDhcp4SbInstalled()

VOID EFIAPI Ip4Config2OnDhcp4SbInstalled ( IN EFI_EVENT  Event,
IN VOID *  Context 
)

The event process routine when the DHCPv4 service binding protocol is installed in the system.

Parameters
[in]EventNot used.
[in]ContextPointer to the IP4 config2 instance data.

The event process routine when the DHCPv4 service binding protocol is installed in the system.

Parameters
[in]EventNot used.
[in]ContextThe pointer to the IP4 config2 instance data.

Definition at line 430 of file Ip4Config2Impl.c.

◆ Ip4Config2OnPolicyChanged()

VOID Ip4Config2OnPolicyChanged ( IN IP4_SERVICE IpSb,
IN EFI_IP4_CONFIG2_POLICY  NewPolicy 
)

Update the current policy to NewPolicy. During the transition period, the default router list and address list in all interfaces will be released.

Parameters
[in]IpSbThe IP4 service binding instance.
[in]NewPolicyThe new policy to be updated to.

Definition at line 92 of file Ip4Config2Impl.c.

◆ Ip4Config2ReadConfigData()

EFI_STATUS Ip4Config2ReadConfigData ( IN CHAR16 *  VarName,
IN OUT IP4_CONFIG2_INSTANCE Instance 
)

Read the configuration data from variable storage according to the VarName and gEfiIp4Config2ProtocolGuid. It checks the integrity of variable data. If the data is corrupted, it clears the variable data to ZERO. Otherwise, it outputs the configuration data to IP4_CONFIG2_INSTANCE.

Parameters
[in]VarNameThe pointer to the variable name
[in,out]InstanceThe pointer to the IP4 config2 instance data.
Return values
EFI_NOT_FOUNDThe variable can not be found or already corrupted.
EFI_OUT_OF_RESOURCESFail to allocate resource to complete the operation.
EFI_SUCCESSThe configuration data was retrieved successfully.

Definition at line 188 of file Ip4Config2Impl.c.

◆ Ip4Config2SetDefaultAddr()

EFI_STATUS Ip4Config2SetDefaultAddr ( IN IP4_SERVICE IpSb,
IN IP4_ADDR  StationAddress,
IN IP4_ADDR  SubnetMask 
)

Set the station address and subnetmask for the default interface.

Parameters
[in]IpSbThe pointer to the IP4 service binding instance.
[in]StationAddressIp address to be set.
[in]SubnetMaskSubnet to be set.
Return values
EFI_SUCCESSSet default address successful.
OthersSome errors occur in setting.

Definition at line 461 of file Ip4Config2Impl.c.

◆ Ip4Config2SetDefaultIf()

EFI_STATUS Ip4Config2SetDefaultIf ( IN IP4_CONFIG2_INSTANCE Instance,
IN IP4_ADDR  StationAddress,
IN IP4_ADDR  SubnetMask,
IN IP4_ADDR  GatewayAddress 
)

Set the station address, subnetmask and gateway address for the default interface.

Parameters
[in]InstanceThe pointer to the IP4 config2 instance data.
[in]StationAddressIp address to be set.
[in]SubnetMaskSubnet to be set.
[in]GatewayAddressGateway to be set.
Return values
EFI_SUCCESSSet default If successful.
OthersErrors occur as indicated.

Definition at line 578 of file Ip4Config2Impl.c.

◆ Ip4Config2SetDnsServer()

EFI_STATUS Ip4Config2SetDnsServer ( IN IP4_CONFIG2_INSTANCE Instance,
IN UINTN  DataSize,
IN VOID *  Data 
)

The work function is to set the DNS server list for the EFI IPv4 network stack running on the communication device that this EFI_IP4_CONFIG2_PROTOCOL manages. It is not configurable when the policy is Ip4Config2PolicyDhcp. The DNS server addresses must be unicast IPv4 addresses.

Parameters
[in]InstanceThe pointer to the IP4 config2 instance data.
[in]DataSizeThe size of the buffer pointed to by Data in bytes.
[in]DataThe data buffer to set, points to an array of EFI_IPv4_ADDRESS instances.
Return values
EFI_BAD_BUFFER_SIZEThe DataSize does not match the size of the type.
EFI_WRITE_PROTECTEDThe specified configuration data cannot be set under the current policy.
EFI_INVALID_PARAMETEROne or more fields in Data is invalid.
EFI_OUT_OF_RESOURCESFailed to allocate resources to complete the operation.
EFI_ABORTEDThe DNS server addresses to be set equal the current configuration.
EFI_SUCCESSThe specified configuration data for the EFI IPv4 network stack was set.

Definition at line 1548 of file Ip4Config2Impl.c.

◆ Ip4Config2SetDnsServerWorker()

EFI_STATUS Ip4Config2SetDnsServerWorker ( IN IP4_CONFIG2_INSTANCE Instance,
IN UINTN  DataSize,
IN VOID *  Data 
)

This worker function sets the DNS server list for the EFI IPv4 network stack running on the communication device that this EFI_IP4_CONFIG2_PROTOCOL manages. The DNS server addresses must be unicast IPv4 addresses.

Parameters
[in]InstanceThe pointer to the IP4 config2 instance data.
[in]DataSizeThe size of the buffer pointed to by Data in bytes.
[in]DataThe data buffer to set, points to an array of EFI_IPv4_ADDRESS instances.
Return values
EFI_BAD_BUFFER_SIZEThe DataSize does not match the size of the type.
EFI_INVALID_PARAMETEROne or more fields in Data is invalid.
EFI_OUT_OF_RESOURCESFailed to allocate resources to complete the operation.
EFI_ABORTEDThe DNS server addresses to be set equal the current configuration.
EFI_SUCCESSThe specified configuration data for the EFI IPv4 network stack was set.

Definition at line 684 of file Ip4Config2Impl.c.

◆ Ip4Config2SetGateway()

EFI_STATUS Ip4Config2SetGateway ( IN IP4_CONFIG2_INSTANCE Instance,
IN UINTN  DataSize,
IN VOID *  Data 
)

The work function is to set the gateway addresses manually for the EFI IPv4 network stack that is running on the communication device that this EFI IPv4 Configuration Protocol manages. It is not configurable when the policy is Ip4Config2PolicyDhcp. The gateway addresses must be unicast IPv4 addresses.

Parameters
[in]InstanceThe pointer to the IP4 config2 instance data.
[in]DataSizeThe size of the buffer pointed to by Data in bytes.
[in]DataThe data buffer to set. This points to an array of EFI_IPv6_ADDRESS instances.
Return values
EFI_BAD_BUFFER_SIZEThe DataSize does not match the size of the type.
EFI_WRITE_PROTECTEDThe specified configuration data cannot be set under the current policy.
EFI_INVALID_PARAMETEROne or more fields in Data is invalid.
EFI_OUT_OF_RESOURCESFailed to allocate resource to complete the operation.
EFI_ABORTEDThe manual gateway addresses to be set equal the current configuration.
EFI_SUCCESSThe specified configuration data for the EFI IPv6 network stack was set.

Definition at line 1396 of file Ip4Config2Impl.c.

◆ Ip4Config2SetManualAddress()

EFI_STATUS Ip4Config2SetManualAddress ( IN IP4_CONFIG2_INSTANCE Instance,
IN UINTN  DataSize,
IN VOID *  Data 
)

The work function is to set the station addresses manually for the EFI IPv4 network stack. It is only configurable when the policy is Ip4Config2PolicyStatic.

Parameters
[in]InstancePointer to the IP4 config2 instance data.
[in]DataSizeSize of the buffer pointed to by Data in bytes.
[in]DataThe data buffer to set.
Return values
EFI_BAD_BUFFER_SIZEThe DataSize does not match the size of the type.
EFI_WRITE_PROTECTEDThe specified configuration data cannot be set under the current policy.
EFI_INVALID_PARAMETEROne or more fields in Data is invalid.
EFI_OUT_OF_RESOURCESFail to allocate resource to complete the operation.
EFI_NOT_READYAn asynchronous process is invoked to set the specified configuration data, and the process is not finished.
EFI_ABORTEDThe manual addresses to be set equal current configuration.
EFI_SUCCESSThe specified configuration data for the EFI IPv6 network stack was set.

Definition at line 1236 of file Ip4Config2Impl.c.

◆ Ip4Config2SetPolicy()

EFI_STATUS Ip4Config2SetPolicy ( IN IP4_CONFIG2_INSTANCE Instance,
IN UINTN  DataSize,
IN VOID *  Data 
)

The work function is to set the general configuration policy for the EFI IPv4 network stack that is running on the communication device managed by this IP4_CONFIG2_INSTANCE. The policy will affect other configuration settings.

Parameters
[in]InstancePointer to the IP4 config2 instance data.
[in]DataSizeSize of the buffer pointed to by Data in bytes.
[in]DataThe data buffer to set.
Return values
EFI_INVALID_PARAMETERThe to be set policy is invalid.
EFI_BAD_BUFFER_SIZEThe DataSize does not match the size of the type.
EFI_ABORTEDThe new policy equals the current policy.
EFI_SUCCESSThe specified configuration data for the EFI IPv6 network stack was set.

Definition at line 1126 of file Ip4Config2Impl.c.

◆ Ip4Config2SignalEvent()

EFI_STATUS EFIAPI Ip4Config2SignalEvent ( IN NET_MAP Map,
IN NET_MAP_ITEM Item,
IN VOID *  Arg 
)

Signal the registered event. It is the callback routine for NetMapIterate.

Parameters
[in]MapPoints to the list of registered event.
[in]ItemThe registered event.
[in]ArgNot used.
Return values
EFI_SUCCESSThe event was signaled successfully.

Definition at line 162 of file Ip4Config2Impl.c.

◆ Ip4Config2WriteConfigData()

EFI_STATUS Ip4Config2WriteConfigData ( IN CHAR16 *  VarName,
IN IP4_CONFIG2_INSTANCE Instance 
)

Write the configuration data from IP4_CONFIG2_INSTANCE to variable storage.

Parameters
[in]VarNameThe pointer to the variable name.
[in]InstanceThe pointer to the IP4 config2 instance data.
Return values
EFI_OUT_OF_RESOURCESFail to allocate resource to complete the operation.
EFI_SUCCESSThe configuration data is written successfully.

Definition at line 303 of file Ip4Config2Impl.c.

◆ Ip4StartAutoConfig()

EFI_STATUS Ip4StartAutoConfig ( IN IP4_CONFIG2_INSTANCE Instance)

Start the DHCP configuration for this IP service instance. It will locates the EFI_IP4_CONFIG2_PROTOCOL, then start the DHCP configuration.

Parameters
[in]InstanceThe IP4 config2 instance to configure
Return values
EFI_SUCCESSThe auto configuration is successfully started
OthersFailed to start auto configuration.

Definition at line 885 of file Ip4Config2Impl.c.

Variable Documentation

◆ mIp4Config2InstanceList

LIST_ENTRY mIp4Config2InstanceList = { &mIp4Config2InstanceList, &mIp4Config2InstanceList }

Definition at line 13 of file Ip4Config2Impl.c.