TianoCore EDK2 master
Loading...
Searching...
No Matches
Ip6ConfigImpl.h File Reference

Go to the source code of this file.

Data Structures

union  IP6_CONFIG_DATA
 
struct  IP6_CONFIG_DATA_ITEM
 
struct  IP6_CONFIG_DATA_RECORD
 
struct  IP6_CONFIG_VARIABLE
 
struct  IP6_ADDRESS_INFO_ENTRY
 
struct  IP6_CONFIG_NVDATA
 
struct  _IP6_FORM_CALLBACK_INFO
 
struct  _IP6_CONFIG_INSTANCE
 

Macros

#define IP6_CONFIG_INSTANCE_SIGNATURE   SIGNATURE_32 ('I', 'P', '6', 'C')
 
#define IP6_FORM_CALLBACK_INFO_SIGNATURE   SIGNATURE_32 ('I', 'F', 'C', 'I')
 
#define IP6_CONFIG_VARIABLE_ATTRIBUTE   (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS)
 
#define IP6_CONFIG_DEFAULT_DAD_XMITS   1
 
#define DATA_ATTRIB_SIZE_FIXED   0x1
 
#define DATA_ATTRIB_VOLATILE   0x2
 
#define DATA_ATTRIB_SET(Attrib, Bits)   (BOOLEAN)((Attrib) & (Bits))
 
#define SET_DATA_ATTRIB(Attrib, Bits)   ((Attrib) |= (Bits))
 
#define IP6_CONFIG_INSTANCE_FROM_PROTOCOL(Proto)
 
#define IP6_CONFIG_INSTANCE_FROM_FORM_CALLBACK(Callback)
 
#define IP6_SERVICE_FROM_IP6_CONFIG_INSTANCE(Instance)
 
#define IP6_FORM_CALLBACK_INFO_FROM_CONFIG_ACCESS(ConfigAccess)
 

Typedefs

typedef struct _IP6_CONFIG_INSTANCE IP6_CONFIG_INSTANCE
 
typedef EFI_STATUS(* IP6_CONFIG_SET_DATA) (IN IP6_CONFIG_INSTANCE *Instance, IN UINTN DataSize, IN VOID *Data)
 
typedef EFI_STATUS(* IP6_CONFIG_GET_DATA) (IN IP6_CONFIG_INSTANCE *Instance, IN OUT UINTN *DataSize, IN VOID *Data OPTIONAL)
 
typedef struct _IP6_FORM_CALLBACK_INFO IP6_FORM_CALLBACK_INFO
 

Functions

EFI_STATUS Ip6ConfigReadConfigData (IN CHAR16 *VarName, IN OUT IP6_CONFIG_INSTANCE *Instance)
 
EFI_STATUS EFIAPI Ip6ConfigOnDhcp6Reply (IN EFI_DHCP6_PROTOCOL *This, IN VOID *Context, IN EFI_DHCP6_PACKET *Packet)
 
EFI_STATUS Ip6ConfigStartStatefulAutoConfig (IN IP6_CONFIG_INSTANCE *Instance, IN BOOLEAN OtherInfoOnly)
 
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)
 

Detailed Description

Definitions for EFI IPv6 Configuration Protocol implementation.

Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.

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

Definition in file Ip6ConfigImpl.h.

Macro Definition Documentation

◆ DATA_ATTRIB_SET

#define DATA_ATTRIB_SET (   Attrib,
  Bits 
)    (BOOLEAN)((Attrib) & (Bits))

Definition at line 22 of file Ip6ConfigImpl.h.

◆ DATA_ATTRIB_SIZE_FIXED

#define DATA_ATTRIB_SIZE_FIXED   0x1

Definition at line 19 of file Ip6ConfigImpl.h.

◆ DATA_ATTRIB_VOLATILE

#define DATA_ATTRIB_VOLATILE   0x2

Definition at line 20 of file Ip6ConfigImpl.h.

◆ IP6_CONFIG_DEFAULT_DAD_XMITS

#define IP6_CONFIG_DEFAULT_DAD_XMITS   1

Definition at line 17 of file Ip6ConfigImpl.h.

◆ IP6_CONFIG_INSTANCE_FROM_FORM_CALLBACK

#define IP6_CONFIG_INSTANCE_FROM_FORM_CALLBACK (   Callback)
Value:
CR ((Callback), \
CallbackInfo, \
IP6_CONFIG_INSTANCE_SIGNATURE \
)
#define CR(Record, TYPE, Field, TestSignature)
Definition: DebugLib.h:659

Definition at line 34 of file Ip6ConfigImpl.h.

◆ IP6_CONFIG_INSTANCE_FROM_PROTOCOL

#define IP6_CONFIG_INSTANCE_FROM_PROTOCOL (   Proto)
Value:
CR ((Proto), \
Ip6Config, \
IP6_CONFIG_INSTANCE_SIGNATURE \
)

Definition at line 27 of file Ip6ConfigImpl.h.

◆ IP6_CONFIG_INSTANCE_SIGNATURE

#define IP6_CONFIG_INSTANCE_SIGNATURE   SIGNATURE_32 ('I', 'P', '6', 'C')

Definition at line 13 of file Ip6ConfigImpl.h.

◆ IP6_CONFIG_VARIABLE_ATTRIBUTE

#define IP6_CONFIG_VARIABLE_ATTRIBUTE   (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS)

Definition at line 15 of file Ip6ConfigImpl.h.

◆ IP6_FORM_CALLBACK_INFO_FROM_CONFIG_ACCESS

#define IP6_FORM_CALLBACK_INFO_FROM_CONFIG_ACCESS (   ConfigAccess)
Value:
CR ((ConfigAccess), \
HiiConfigAccess, \
IP6_FORM_CALLBACK_INFO_SIGNATURE \
)

Definition at line 48 of file Ip6ConfigImpl.h.

◆ IP6_FORM_CALLBACK_INFO_SIGNATURE

#define IP6_FORM_CALLBACK_INFO_SIGNATURE   SIGNATURE_32 ('I', 'F', 'C', 'I')

Definition at line 14 of file Ip6ConfigImpl.h.

◆ IP6_SERVICE_FROM_IP6_CONFIG_INSTANCE

#define IP6_SERVICE_FROM_IP6_CONFIG_INSTANCE (   Instance)
Value:
CR ((Instance), \
Ip6ConfigInstance, \
IP6_SERVICE_SIGNATURE \
)

Definition at line 41 of file Ip6ConfigImpl.h.

◆ SET_DATA_ATTRIB

#define SET_DATA_ATTRIB (   Attrib,
  Bits 
)    ((Attrib) |= (Bits))

Definition at line 23 of file Ip6ConfigImpl.h.

Typedef Documentation

◆ IP6_CONFIG_GET_DATA

typedef EFI_STATUS(* IP6_CONFIG_GET_DATA) (IN IP6_CONFIG_INSTANCE *Instance, IN OUT UINTN *DataSize, IN VOID *Data OPTIONAL)

The prototype of work function for EfiIp6ConfigGetData().

Parameters
[in]InstanceThe pointer to the IP6 config 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 successfully.

Definition at line 93 of file Ip6ConfigImpl.h.

◆ IP6_CONFIG_INSTANCE

Definition at line 25 of file Ip6ConfigImpl.h.

◆ IP6_CONFIG_SET_DATA

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

The prototype of work function for EfiIp6ConfigSetData().

Parameters
[in]InstanceThe pointer to the IP6 config instance data.
[in]DataSizeIn bytes, the size of the buffer pointed to by Data.
[in]DataThe data buffer to set.
Return values
EFI_BAD_BUFFER_SIZEThe DataSize does not match the size of the type, 8 bytes.
EFI_SUCCESSThe specified configuration data for the EFI IPv6 network stack was set successfully.

Definition at line 69 of file Ip6ConfigImpl.h.

Function Documentation

◆ Ip6ConfigCleanInstance()

VOID Ip6ConfigCleanInstance ( IN OUT IP6_CONFIG_INSTANCE Instance)

Release an IP6_CONFIG_INSTANCE.

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

Definition at line 2420 of file Ip6ConfigImpl.c.

◆ Ip6ConfigDestroyDhcp6()

EFI_STATUS Ip6ConfigDestroyDhcp6 ( IN OUT IP6_CONFIG_INSTANCE Instance)

Destroy the Dhcp6 child in IP6_CONFIG_INSTANCE and release the resources.

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

Definition at line 2479 of file Ip6ConfigImpl.c.

◆ Ip6ConfigInitInstance()

EFI_STATUS Ip6ConfigInitInstance ( OUT IP6_CONFIG_INSTANCE Instance)

Initialize an IP6_CONFIG_INSTANCE.

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

Definition at line 2268 of file Ip6ConfigImpl.c.

◆ Ip6ConfigOnDhcp6Reply()

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]ThisPoints to the EFI_DHCP6_PROTOCOL.
[in]ContextThe pointer to the IP6 configuration instance data.
[in]PacketThe DHCPv6 reply packet.
Return values
EFI_SUCCESSThe DNS server address was retrieved from the reply packet.
EFI_NOT_READYThe reply packet does not contain the DNS server option, or the DNS server address is not valid.

Definition at line 1898 of file Ip6ConfigImpl.c.

◆ Ip6ConfigReadConfigData()

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. Otherwise, it outputs the configuration data to IP6_CONFIG_INSTANCE.

Parameters
[in]VarNameThe pointer to the variable name
[in,out]InstanceThe pointer to the IP6 config 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 347 of file Ip6ConfigImpl.c.

◆ Ip6ConfigStartStatefulAutoConfig()

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]InstancePointer to the IP6 config instance data.
[in]OtherInfoOnlyIf FALSE, get stateful address and other information via DHCPv6. Otherwise, only get the other information.
Return values
EFI_SUCCESSThe operation finished successfully.
EFI_UNSUPPORTEDThe DHCP6 driver is not available.

Definition at line 176 of file Ip6ConfigImpl.c.