NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c File Reference


Functions

VOID EFIAPI Ip6ConfigOnDhcp6SbInstalled (IN EFI_EVENT Event, IN VOID *Context)
VOID Ip6ConfigOnPolicyChanged (IN IP6_SERVICE *IpSb, IN EFI_IP6_CONFIG_POLICY NewPolicy)
EFI_STATUS Ip6ConfigStartStatefulAutoConfig (IN IP6_CONFIG_INSTANCE *Instance, IN BOOLEAN OtherInfoOnly)
EFI_STATUS EFIAPI Ip6ConfigSignalEvent (IN NET_MAP *Map, IN NET_MAP_ITEM *Item, IN VOID *Arg)
EFI_STATUS Ip6ConfigReadConfigData (IN CHAR16 *VarName, IN OUT IP6_CONFIG_INSTANCE *Instance)
EFI_STATUS Ip6ConfigWriteConfigData (IN CHAR16 *VarName, IN IP6_CONFIG_INSTANCE *Instance)
EFI_STATUS Ip6ConfigGetIfInfo (IN IP6_CONFIG_INSTANCE *Instance, IN OUT UINTN *DataSize, IN VOID *Data)
EFI_STATUS Ip6ConfigSetAltIfId (IN IP6_CONFIG_INSTANCE *Instance, IN UINTN DataSize, IN VOID *Data)
EFI_STATUS Ip6ConfigSetPolicy (IN IP6_CONFIG_INSTANCE *Instance, IN UINTN DataSize, IN VOID *Data)
EFI_STATUS Ip6ConfigSetDadXmits (IN IP6_CONFIG_INSTANCE *Instance, IN UINTN DataSize, IN VOID *Data)
VOID Ip6ManualAddrDadCallback (IN BOOLEAN IsDadPassed, IN EFI_IPv6_ADDRESS *TargetAddress, IN VOID *Context)
EFI_STATUS Ip6ConfigSetMaunualAddress (IN IP6_CONFIG_INSTANCE *Instance, IN UINTN DataSize, IN VOID *Data)
EFI_STATUS Ip6ConfigSetGateway (IN IP6_CONFIG_INSTANCE *Instance, IN UINTN DataSize, IN VOID *Data)
EFI_STATUS Ip6ConfigSetDnsServer (IN IP6_CONFIG_INSTANCE *Instance, IN UINTN DataSize, IN VOID *Data)
VOID Ip6ConfigInitIfInfo (IN IP6_SERVICE *IpSb, OUT EFI_IP6_CONFIG_INTERFACE_INFO *IfInfo)
EFI_STATUS Ip6ConfigParseDhcpReply (IN EFI_DHCP6_PROTOCOL *Dhcp6, IN OUT IP6_CONFIG_INSTANCE *Instance, IN EFI_DHCP6_PACKET *Reply)
VOID Ip6ConfigSetStatefulAddrCallback (IN BOOLEAN IsDadPassed, IN EFI_IPv6_ADDRESS *TargetAddress, IN VOID *Context)
VOID EFIAPI Ip6ConfigOnDhcp6Event (IN EFI_EVENT Event, IN VOID *Context)
EFI_STATUS EFIAPI Ip6ConfigOnDhcp6Reply (IN EFI_DHCP6_PROTOCOL *This, IN VOID *Context, IN EFI_DHCP6_PACKET *Packet)
EFI_STATUS EFIAPI EfiIp6ConfigSetData (IN EFI_IP6_CONFIG_PROTOCOL *This, IN EFI_IP6_CONFIG_DATA_TYPE DataType, IN UINTN DataSize, IN VOID *Data)
EFI_STATUS EFIAPI EfiIp6ConfigGetData (IN EFI_IP6_CONFIG_PROTOCOL *This, IN EFI_IP6_CONFIG_DATA_TYPE DataType, IN OUT UINTN *DataSize, IN VOID *Data)
EFI_STATUS EFIAPI EfiIp6ConfigRegisterDataNotify (IN EFI_IP6_CONFIG_PROTOCOL *This, IN EFI_IP6_CONFIG_DATA_TYPE DataType, IN EFI_EVENT Event)
EFI_STATUS EFIAPI EfiIp6ConfigUnregisterDataNotify (IN EFI_IP6_CONFIG_PROTOCOL *This, IN EFI_IP6_CONFIG_DATA_TYPE DataType, IN EFI_EVENT Event)
EFI_STATUS Ip6ConfigInitInstance (OUT IP6_CONFIG_INSTANCE *Instance)
VOID Ip6ConfigCleanInstance (IN OUT IP6_CONFIG_INSTANCE *Instance)
EFI_STATUS Ip6ConfigDestroyDhcp6 (IN OUT IP6_CONFIG_INSTANCE *Instance)

Variables

LIST_ENTRY mIp6ConfigInstanceList = {&mIp6ConfigInstanceList, &mIp6ConfigInstanceList}

Detailed Description

The implementation of EFI IPv6 Configuration Protocol.

Copyright (c) 2009 - 2014, 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.


Function Documentation

EFI_STATUS EFIAPI EfiIp6ConfigGetData ( IN EFI_IP6_CONFIG_PROTOCOL *  This,
IN EFI_IP6_CONFIG_DATA_TYPE  DataType,
IN OUT UINTN *  DataSize,
IN VOID *  Data 
)

Get the configuration data for the EFI IPv6 network stack running on the communication device that this EFI IPv6 Configuration Protocol instance manages.

This function returns the configuration data of type DataType for the EFI IPv6 network stack running on the communication device that this EFI IPv6 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] This Pointer to the EFI_IP6_CONFIG_PROTOCOL instance.
[in] DataType The type of data to get.
[in,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.
[in] Data The 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_SUCCESS The specified configuration data was obtained successfully.
EFI_INVALID_PARAMETER One or more of the followings are TRUE:
  • This is NULL.
  • DataSize is NULL.
  • Data is NULL if *DataSize is not zero.
EFI_BUFFER_TOO_SMALL The size of Data is too small for the specified configuration data, and the required size is returned in DataSize.
EFI_NOT_READY The specified configuration data is not ready due to an asynchronous configuration process already in progress.
EFI_NOT_FOUND The specified configuration data is not found.

References IP6_CONFIG_DATA_ITEM::Data, _IP6_CONFIG_INSTANCE::DataItem, IP6_CONFIG_DATA_ITEM::DataSize, IP6_CONFIG_DATA_ITEM::GetData, IP6_CONFIG_INSTANCE_FROM_PROTOCOL, IP6_CONFIG_DATA::Ptr, and IP6_CONFIG_DATA_ITEM::Status.

Referenced by Ip6ConfigInitInstance().

EFI_STATUS EFIAPI EfiIp6ConfigRegisterDataNotify ( IN EFI_IP6_CONFIG_PROTOCOL *  This,
IN EFI_IP6_CONFIG_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] This Pointer to the EFI_IP6_CONFIG_PROTOCOL instance.
[in] DataType The type of data to unregister the event for.
[in] Event The event to register.
Return values:
EFI_SUCCESS The notification event for the specified configuration data is registered.
EFI_INVALID_PARAMETER This is NULL or Event is NULL.
EFI_UNSUPPORTED The configuration data type specified by DataType is not supported.
EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
EFI_ACCESS_DENIED The Event is already registered for the DataType.

References _IP6_CONFIG_INSTANCE::DataItem, IP6_CONFIG_DATA_ITEM::EventMap, and IP6_CONFIG_INSTANCE_FROM_PROTOCOL.

Referenced by Ip6ConfigInitInstance().

EFI_STATUS EFIAPI EfiIp6ConfigSetData ( IN EFI_IP6_CONFIG_PROTOCOL *  This,
IN EFI_IP6_CONFIG_DATA_TYPE  DataType,
IN UINTN  DataSize,
IN VOID *  Data 
)

Set the configuration for the EFI IPv6 network stack running on the communication device this EFI IPv6 Configuration Protocol instance manages.

This function is used to set the configuration data of type DataType for the EFI IPv6 network stack that is running on the communication device that this EFI IPv6 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 IPv6 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] This The pointer to the EFI_IP6_CONFIG_PROTOCOL instance.
[in] DataType The type of data to set.
[in] DataSize Size of the buffer pointed to by Data in bytes.
[in] Data The data buffer to set. The type of the data buffer is associated with the DataType.
Return values:
EFI_SUCCESS The specified configuration data for the EFI IPv6 network stack was set successfully.
EFI_INVALID_PARAMETER One or more of the following are TRUE:
  • This is NULL.
  • Data is NULL.
  • One or more fields in Data do not match the requirement of the data type indicated by DataType.
EFI_WRITE_PROTECTED The specified configuration data is read-only or the specified configuration data cannot be set under the current policy.
EFI_ACCESS_DENIED Another set operation on the specified configuration data is already in process.
EFI_NOT_READY An asynchronous process was invoked to set the specified configuration data, and the process is not finished yet.
EFI_BAD_BUFFER_SIZE The DataSize does not match the size of the type indicated by DataType.
EFI_UNSUPPORTED This DataType is not supported.
EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
EFI_DEVICE_ERROR An unexpected system error or network error occurred.

References _IP6_CONFIG_INSTANCE::DataItem, IP6_CONFIG_DATA_ITEM::EventMap, IP6_CONFIG_INSTANCE_FROM_PROTOCOL, IP6_SERVICE_FROM_IP6_CONFIG_INSTANCE, IP6_SERVICE_SIGNATURE, Ip6ConfigSignalEvent(), Ip6ConfigWriteConfigData(), _IP6_SERVICE::LinkLocalDadFail, _IP6_SERVICE::MacString, IP6_CONFIG_DATA_ITEM::SetData, and IP6_CONFIG_DATA_ITEM::Status.

Referenced by Ip6ConfigInitInstance().

EFI_STATUS EFIAPI EfiIp6ConfigUnregisterDataNotify ( IN EFI_IP6_CONFIG_PROTOCOL *  This,
IN EFI_IP6_CONFIG_DATA_TYPE  DataType,
IN EFI_EVENT  Event 
)

Remove a previously registered event for the specified configuration data.

Parameters:
This The pointer to the EFI_IP6_CONFIG_PROTOCOL instance.
DataType The type of data to remove from the previously registered event.
Event The event to be unregistered.
Return values:
EFI_SUCCESS The event registered for the specified configuration data was removed.
EFI_INVALID_PARAMETER This is NULL or Event is NULL.
EFI_NOT_FOUND The Event has not been registered for the specified DataType.

References _IP6_CONFIG_INSTANCE::DataItem, IP6_CONFIG_DATA_ITEM::EventMap, and IP6_CONFIG_INSTANCE_FROM_PROTOCOL.

Referenced by Ip6ConfigInitInstance().

VOID Ip6ConfigCleanInstance ( IN OUT IP6_CONFIG_INSTANCE Instance  ) 

Release an IP6_CONFIG_INSTANCE.

Parameters:
[in,out] Instance The buffer of IP6_CONFIG_INSTANCE to be freed.

References IP6_CONFIG_DATA_ITEM::Attribute, IP6_CONFIG_DATA_ITEM::Data, DATA_ATTRIB_SET, DATA_ATTRIB_SIZE_FIXED, IP6_CONFIG_DATA_ITEM::DataSize, Ip6ConfigDestroyDhcp6(), Ip6ConfigFormUnload(), and IP6_CONFIG_DATA::Ptr.

Referenced by Ip6CleanService().

EFI_STATUS Ip6ConfigDestroyDhcp6 ( IN OUT IP6_CONFIG_INSTANCE Instance  ) 

Destroy the Dhcp6 child in IP6_CONFIG_INSTANCE and release the resources.

Parameters:
[in,out] Instance The buffer of IP6_CONFIG_INSTANCE to be freed.
Return values:
EFI_SUCCESS The child was successfully destroyed.
Others Failed to destroy the child.

References _IP6_SERVICE::Controller, _IP6_SERVICE::Image, and IP6_SERVICE_FROM_IP6_CONFIG_INSTANCE.

Referenced by Ip6ConfigCleanInstance(), Ip6ConfigSetPolicy(), and Ip6DriverBindingStop().

EFI_STATUS Ip6ConfigGetIfInfo ( IN IP6_CONFIG_INSTANCE Instance,
IN OUT UINTN *  DataSize,
IN VOID *  Data 
)

The work function for EfiIp6ConfigGetData() to get the interface information of the communication device this IP6Config instance manages.

Parameters:
[in] Instance Pointer to the IP6 config instance data.
[in,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.
[in] Data The data buffer in which the configuration data is returned. Ignored if DataSize is ZERO.
Return values:
EFI_BUFFER_TOO_SMALL The size of Data is too small for the specified configuration data, and the required size is returned in DataSize.
EFI_SUCCESS The specified configuration data was obtained.

References IP6_CONFIG_DATA_ITEM::Data, IP6_SERVICE_FROM_IP6_CONFIG_INSTANCE, Ip6BuildEfiAddressList(), Ip6BuildEfiRouteTable(), IP6_CONFIG_DATA::Ptr, and _IP6_SERVICE::RouteTable.

Referenced by Ip6ConfigInitInstance().

VOID Ip6ConfigInitIfInfo ( IN IP6_SERVICE IpSb,
OUT EFI_IP6_CONFIG_INTERFACE_INFO *  IfInfo 
)

Generate the operational state of the interface this IP6 config instance manages and output in EFI_IP6_CONFIG_INTERFACE_INFO.

Parameters:
[in] IpSb The pointer to the IP6 service binding instance.
[out] IfInfo The pointer to the IP6 configuration interface information structure.

Referenced by Ip6ConfigInitInstance().

EFI_STATUS Ip6ConfigInitInstance ( OUT IP6_CONFIG_INSTANCE Instance  ) 

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

EFI_STATUS EFIAPI Ip6ConfigOnDhcp6Reply ( IN EFI_DHCP6_PROTOCOL *  This,
IN VOID *  Context,
IN EFI_DHCP6_PACKET *  Packet 
)

The event process routine when the DHCPv6 server is answered with a reply packet for an information request.

Parameters:
[in] This Points to the EFI_DHCP6_PROTOCOL.
[in] Context The pointer to the IP6 configuration instance data.
[in] Packet The DHCPv6 reply packet.
Return values:
EFI_SUCCESS The DNS server address was retrieved from the reply packet.
EFI_NOT_READY The reply packet does not contain the DNS server option, or the DNS server address is not valid.

References Ip6ConfigParseDhcpReply().

Referenced by Ip6ConfigStartStatefulAutoConfig(), and Ip6OnDADFinished().

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

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

Parameters:
[in] Event Not used.
[in] Context Pointer to the IP6 config instance data.
The event process routine when the DHCPv6 service binding protocol is installed in the system.

Parameters:
[in] Event Not used.
[in] Context The pointer to the IP6 config instance data.

References _IP6_CONFIG_INSTANCE::Dhcp6Handle, Ip6ConfigStartStatefulAutoConfig(), _IP6_CONFIG_INSTANCE::OtherInfoOnly, and _IP6_CONFIG_INSTANCE::Policy.

Referenced by Ip6ConfigStartStatefulAutoConfig().

VOID Ip6ConfigOnPolicyChanged ( IN IP6_SERVICE IpSb,
IN EFI_IP6_CONFIG_POLICY  NewPolicy 
)

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

Parameters:
[in] IpSb The IP6 service binding instance.
[in] NewPolicy The new policy to be updated to.

References _IP6_ADDRESS_INFO::Address, _IP6_DAD_ENTRY::AddressInfo, _IP6_DELAY_JOIN_LIST::AddressInfo, _IP6_INTERFACE::DelayJoinList, _IP6_INTERFACE::DupAddrDetectList, IP6_DAD_ENTRY_SIGNATURE, IP6_GET_TICKS, IP6_INFINIT_LIFETIME, IP6_INTERFACE_SIGNATURE, IP6_LINK_LOCAL_PREFIX_LENGTH, IP6_MAX_RTR_SOLICITATIONS, IP6_ONE_SECOND_IN_MS, Ip6CleanDefaultRouterList(), Ip6CleanPrefixListTable(), Ip6CreatePrefixListEntry(), Ip6OnDADFinished(), Ip6RemoveAddr(), _IP6_DELAY_JOIN_LIST::Link, and _IP6_ADDRESS_INFO::Link.

Referenced by Ip6ConfigSetPolicy().

EFI_STATUS Ip6ConfigParseDhcpReply ( IN EFI_DHCP6_PROTOCOL *  Dhcp6,
IN OUT IP6_CONFIG_INSTANCE Instance,
IN EFI_DHCP6_PACKET *  Reply 
)

Parse DHCPv6 reply packet to get the DNS server list. It is the work function for Ip6ConfigOnDhcp6Reply and Ip6ConfigOnDhcp6Event.

Parameters:
[in] Dhcp6 The pointer to the EFI_DHCP6_PROTOCOL instance.
[in,out] Instance The pointer to the IP6 configuration instance data.
[in] Reply The pointer to the DHCPv6 reply packet.
Return values:
EFI_SUCCESS The DNS server address was retrieved from the reply packet.
EFI_NOT_READY The reply packet does not contain the DNS server option, or the DNS server address is not valid.

References IP6_CONFIG_DATA_ITEM::Data, IP6_CONFIG_DATA_ITEM::DataSize, IP6_CONFIG_DATA_ITEM::EventMap, IP6_CONFIG_DHCP6_OPTION_DNS_SERVERS, Ip6ConfigSignalEvent(), IP6_CONFIG_DATA::Ptr, and IP6_CONFIG_DATA_ITEM::Status.

Referenced by Ip6ConfigOnDhcp6Event(), and Ip6ConfigOnDhcp6Reply().

EFI_STATUS Ip6ConfigReadConfigData ( IN CHAR16 *  VarName,
IN OUT IP6_CONFIG_INSTANCE Instance 
)

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

Parameters:
[in] VarName The pointer to the variable name
[in,out] Instance The pointer to the IP6 config instance data.
Return values:
EFI_NOT_FOUND The variable can not be found or already corrupted.
EFI_OUT_OF_RESOURCES Fail to allocate resource to complete the operation.
EFI_SUCCESS The configuration data was retrieved successfully.

References IP6_CONFIG_DATA_ITEM::Attribute, IP6_CONFIG_DATA_ITEM::Data, DATA_ATTRIB_SET, DATA_ATTRIB_SIZE_FIXED, IP6_CONFIG_DATA_RECORD::DataSize, IP6_CONFIG_DATA_ITEM::DataSize, IP6_CONFIG_DATA_RECORD::DataType, IP6_CONFIG_VARIABLE_ATTRIBUTE, IP6_CONFIG_DATA_RECORD::Offset, IP6_CONFIG_DATA::Ptr, and IP6_CONFIG_DATA_ITEM::Status.

Referenced by Ip6ConfigInitInstance().

EFI_STATUS Ip6ConfigSetAltIfId ( IN IP6_CONFIG_INSTANCE Instance,
IN UINTN  DataSize,
IN VOID *  Data 
)

The work function for EfiIp6ConfigSetData() to set the alternative inteface ID for the communication device managed by this IP6Config instance, if the link local IPv6 addresses generated from the interface ID based on the default source the EFI IPv6 Protocol uses is a duplicate address.

Parameters:
[in] Instance Pointer to the IP6 configuration instance data.
[in] DataSize Size of the buffer pointed to by Data in bytes.
[in] Data The data buffer to set.
Return values:
EFI_BAD_BUFFER_SIZE The DataSize does not match the size of the type, 8 bytes.
EFI_SUCCESS The specified configuration data for the EFI IPv6 network stack was set.

References IP6_CONFIG_DATA::AltIfId, IP6_CONFIG_DATA_ITEM::Data, and IP6_CONFIG_DATA_ITEM::Status.

Referenced by Ip6ConfigInitInstance().

EFI_STATUS Ip6ConfigSetDadXmits ( IN IP6_CONFIG_INSTANCE Instance,
IN UINTN  DataSize,
IN VOID *  Data 
)

The work function for EfiIp6ConfigSetData() to set the number of consecutive Neighbor Solicitation messages sent while performing Duplicate Address Detection on a tentative address. A value of ZERO indicates that Duplicate Address Detection will not be performed on a tentative address.

Parameters:
[in] Instance The Instance Pointer to the IP6 config instance data.
[in] DataSize Size of the buffer pointed to by Data in bytes.
[in] Data The data buffer to set.
Return values:
EFI_BAD_BUFFER_SIZE The DataSize does not match the size of the type.
EFI_ABORTED The new transmit count equals the current configuration.
EFI_SUCCESS The specified configuration data for the EFI IPv6 network stack was set.

Referenced by Ip6ConfigInitInstance().

EFI_STATUS Ip6ConfigSetDnsServer ( IN IP6_CONFIG_INSTANCE Instance,
IN UINTN  DataSize,
IN VOID *  Data 
)

The work function for EfiIp6ConfigSetData() to set the DNS server list for the EFI IPv6 network stack running on the communication device that this EFI IPv6 Configuration Protocol manages. It is not configurable when the policy is Ip6ConfigPolicyAutomatic. The DNS server addresses must be unicast IPv6 addresses.

Parameters:
[in] Instance The pointer to the IP6 config instance data.
[in] DataSize The size of the buffer pointed to by Data in bytes.
[in] Data The data buffer to set, points to an array of EFI_IPv6_ADDRESS instances.
Return values:
EFI_BAD_BUFFER_SIZE The DataSize does not match the size of the type.
EFI_WRITE_PROTECTED The specified configuration data cannot be set under the current policy.
EFI_INVALID_PARAMETER One or more fields in Data is invalid.
EFI_OUT_OF_RESOURCES Failed to allocate resources to complete the operation.
EFI_ABORTED The DNS server addresses to be set equal the current configuration.
EFI_SUCCESS The specified configuration data for the EFI IPv6 network stack was set.

References IP6_CONFIG_DATA_ITEM::Data, IP6_CONFIG_DATA_ITEM::DataSize, IP6_CONFIG_DATA::DnsServers, IP6_CONFIG_DATA::Ptr, and IP6_CONFIG_DATA_ITEM::Status.

Referenced by Ip6ConfigInitInstance().

EFI_STATUS Ip6ConfigSetGateway ( IN IP6_CONFIG_INSTANCE Instance,
IN UINTN  DataSize,
IN VOID *  Data 
)

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

Parameters:
[in] Instance The pointer to the IP6 config instance data.
[in] DataSize The size of the buffer pointed to by Data in bytes.
[in] Data The data buffer to set. This points to an array of EFI_IPv6_ADDRESS instances.
Return values:
EFI_BAD_BUFFER_SIZE The DataSize does not match the size of the type.
EFI_WRITE_PROTECTED The specified configuration data cannot be set under the current policy.
EFI_INVALID_PARAMETER One or more fields in Data is invalid.
EFI_OUT_OF_RESOURCES Failed to allocate resource to complete the operation.
EFI_ABORTED The manual gateway addresses to be set equal the current configuration.
EFI_SUCCESS The specified configuration data for the EFI IPv6 network stack was set.

References IP6_CONFIG_DATA_ITEM::Data, IP6_CONFIG_DATA_ITEM::DataSize, IP6_CONFIG_DATA::Gateway, IP6_INF_ROUTER_LIFETIME, IP6_SERVICE_FROM_IP6_CONFIG_INSTANCE, Ip6CreateDefaultRouter(), Ip6DestroyDefaultRouter(), Ip6FindDefaultRouter(), IP6_CONFIG_DATA::Ptr, and IP6_CONFIG_DATA_ITEM::Status.

Referenced by Ip6ConfigInitInstance().

EFI_STATUS Ip6ConfigSetMaunualAddress ( IN IP6_CONFIG_INSTANCE Instance,
IN UINTN  DataSize,
IN VOID *  Data 
)

The work function for EfiIp6ConfigSetData() to set the station addresses manually for the EFI IPv6 network stack. It is only configurable when the policy is Ip6ConfigPolicyManual.

Parameters:
[in] Instance Pointer to the IP6 configuration instance data.
[in] DataSize Size of the buffer pointed to by Data in bytes.
[in] Data The data buffer to set.
Return values:
EFI_BAD_BUFFER_SIZE The DataSize does not match the size of the type.
EFI_WRITE_PROTECTED The specified configuration data cannot be set under the current policy.
EFI_INVALID_PARAMETER One or more fields in Data is invalid.
EFI_OUT_OF_RESOURCES Fail to allocate resource to complete the operation.
EFI_NOT_READY An asynchrous process is invoked to set the specified configuration data, and the process is not finished.
EFI_ABORTED The manual addresses to be set equal current configuration.
EFI_SUCCESS The specified configuration data for the EFI IPv6 network stack was set.

References _IP6_ADDRESS_INFO::Address, _IP6_INTERFACE::AddressCount, _IP6_INTERFACE::AddressList, IP6_CONFIG_DATA_ITEM::Data, IP6_CONFIG_DATA_ITEM::DataSize, _IP6_SERVICE::DefaultInterface, _IP6_SERVICE::Interfaces, IP6_ADDR_INFO_SIGNATURE, IP6_INFINIT_LIFETIME, IP6_INTERFACE_SIGNATURE, IP6_SERVICE_FROM_IP6_CONFIG_INSTANCE, Ip6CreatePrefixListEntry(), Ip6DestroyPrefixListEntry(), Ip6FindPrefixListEntry(), Ip6IsOneOfSetAddress(), Ip6ManualAddrDadCallback(), Ip6RemoveAddr(), Ip6SetAddress(), _IP6_ADDRESS_INFO::IsAnycast, _IP6_ADDRESS_INFO::Link, _IP6_ADDRESS_INFO::PrefixLength, IP6_CONFIG_DATA::Ptr, and IP6_CONFIG_DATA_ITEM::Status.

Referenced by Ip6ConfigInitInstance().

EFI_STATUS Ip6ConfigSetPolicy ( IN IP6_CONFIG_INSTANCE Instance,
IN UINTN  DataSize,
IN VOID *  Data 
)

The work function for EfiIp6ConfigSetData() to set the general configuration policy for the EFI IPv6 network stack that is running on the communication device managed by this IP6Config instance. The policy will affect other configuration settings.

Parameters:
[in] Instance Pointer to the IP6 config instance data.
[in] DataSize Size of the buffer pointed to by Data in bytes.
[in] Data The data buffer to set.
Return values:
EFI_INVALID_PARAMETER The to be set policy is invalid.
EFI_BAD_BUFFER_SIZE The DataSize does not match the size of the type.
EFI_ABORTED The new policy equals the current policy.
EFI_SUCCESS The specified configuration data for the EFI IPv6 network stack was set.

References IP6_CONFIG_DATA_ITEM::Data, IP6_CONFIG_DATA_ITEM::DataSize, IP6_CONFIG_DATA_ITEM::EventMap, IP6_SERVICE_FROM_IP6_CONFIG_INSTANCE, Ip6ConfigDestroyDhcp6(), Ip6ConfigOnPolicyChanged(), Ip6ConfigSignalEvent(), IP6_CONFIG_DATA::Ptr, and IP6_CONFIG_DATA_ITEM::Status.

Referenced by Ip6ConfigInitInstance().

VOID Ip6ConfigSetStatefulAddrCallback ( IN BOOLEAN  IsDadPassed,
IN EFI_IPv6_ADDRESS *  TargetAddress,
IN VOID *  Context 
)

The callback function for Ip6SetAddr. The prototype is defined as IP6_DAD_CALLBACK. It is called after Duplicate Address Detection is performed on the tentative address by DHCPv6 in Ip6ConfigOnDhcp6Event().

Parameters:
[in] IsDadPassed If TRUE, Duplicate Address Detection passes.
[in] TargetAddress The tentative IPv6 address to be checked.
[in] Context Pointer to the IP6 configuration instance data.

References _IP6_CONFIG_INSTANCE::DeclineAddress, _IP6_CONFIG_INSTANCE::DeclineAddressCount, _IP6_CONFIG_INSTANCE::Dhcp6, _IP6_CONFIG_INSTANCE::FailedIaAddressCount, and IP6_CONFIG_INSTANCE_SIGNATURE.

Referenced by Ip6ConfigOnDhcp6Event().

EFI_STATUS EFIAPI Ip6ConfigSignalEvent ( 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] Map Points to the list of registered event.
[in] Item The registered event.
[in] Arg Not used.

Referenced by EfiIp6ConfigSetData(), Ip6ConfigParseDhcpReply(), Ip6ConfigSetPolicy(), and Ip6ManualAddrDadCallback().

EFI_STATUS Ip6ConfigStartStatefulAutoConfig ( IN IP6_CONFIG_INSTANCE Instance,
IN BOOLEAN  OtherInfoOnly 
)

The work function to trigger the DHCPv6 process to perform a stateful autoconfiguration.

Parameters:
[in] Instance Pointer to the IP6 config instance data.
[in] OtherInfoOnly If FALSE, get stateful address and other information via DHCPv6. Otherwise, only get the other information.
Return values:
EFI_SUCCESS The operation finished successfully.
EFI_UNSUPPORTED The DHCP6 driver is not available.

References _IP6_SERVICE::Controller, _IP6_SERVICE::Dhcp6NeedInfoRequest, _IP6_SERVICE::Dhcp6NeedStart, _IP6_SERVICE::Image, IP6_CONFIG_DHCP6_OPTION_DNS_SERVERS, IP6_CONFIG_DHCP6_OPTION_ORO, IP6_SERVICE_FROM_IP6_CONFIG_INSTANCE, Ip6ConfigOnDhcp6Reply(), Ip6ConfigOnDhcp6SbInstalled(), and _IP6_SERVICE::LinkLocalOk.

Referenced by Ip6ConfigOnDhcp6SbInstalled(), and Ip6ProcessRouterAdvertise().

EFI_STATUS Ip6ConfigWriteConfigData ( IN CHAR16 *  VarName,
IN IP6_CONFIG_INSTANCE Instance 
)

Write the configuration data from IP6_CONFIG_INSTANCE to variable storage.

Parameters:
[in] VarName The pointer to the variable name.
[in] Instance The pointer to the IP6 configuration instance data.
Return values:
EFI_OUT_OF_RESOURCES Fail to allocate resource to complete the operation.
EFI_SUCCESS The configuration data is written successfully.

References IP6_CONFIG_DATA_ITEM::Attribute, IP6_CONFIG_VARIABLE::Checksum, IP6_CONFIG_DATA_ITEM::Data, DATA_ATTRIB_SET, DATA_ATTRIB_VOLATILE, IP6_CONFIG_VARIABLE::DataRecord, IP6_CONFIG_VARIABLE::DataRecordCount, IP6_CONFIG_DATA_RECORD::DataSize, IP6_CONFIG_DATA_ITEM::DataSize, IP6_CONFIG_DATA_RECORD::DataType, IP6_CONFIG_VARIABLE::IaId, IP6_CONFIG_VARIABLE_ATTRIBUTE, IP6_CONFIG_DATA_RECORD::Offset, IP6_CONFIG_DATA::Ptr, and IP6_CONFIG_DATA_ITEM::Status.

Referenced by EfiIp6ConfigSetData(), Ip6ConfigInitInstance(), and Ip6ManualAddrDadCallback().

VOID Ip6ManualAddrDadCallback ( IN BOOLEAN  IsDadPassed,
IN EFI_IPv6_ADDRESS *  TargetAddress,
IN VOID *  Context 
)

The callback function for Ip6SetAddr. The prototype is defined as IP6_DAD_CALLBACK. It is called after Duplicate Address Detection is performed for the manual address set by Ip6ConfigSetMaunualAddress.

Parameters:
[in] IsDadPassed If TRUE, Duplicate Address Detection passed.
[in] TargetAddress The tentative IPv6 address to be checked.
[in] Context Pointer to the IP6 configuration instance data.

References _IP6_CONFIG_INSTANCE::DadFailedMap, _IP6_CONFIG_INSTANCE::DadPassedMap, IP6_CONFIG_DATA_ITEM::Data, _IP6_CONFIG_INSTANCE::DataItem, IP6_CONFIG_DATA_ITEM::DataSize, IP6_CONFIG_DATA_ITEM::EventMap, IP6_CONFIG_INSTANCE_SIGNATURE, IP6_SERVICE_FROM_IP6_CONFIG_INSTANCE, Ip6ConfigSignalEvent(), Ip6ConfigWriteConfigData(), _IP6_SERVICE::MacString, IP6_CONFIG_DATA::ManualAddress, IP6_CONFIG_DATA::Ptr, and IP6_CONFIG_DATA_ITEM::Status.

Referenced by Ip6ConfigSetMaunualAddress().


Variable Documentation

Referenced by Ip6ConfigInitInstance().


Generated on Mon Sep 28 08:49:05 2015 for NetworkPkg[ALL] by  doxygen 1.5.7.1