Ip6ConfigImpl.h revision 4fd606d1f5abe38e1f42c38de1d2e895166bd0f4
/** @file
Definitions for EFI IPv6 Configuartion Protocol implementation.
Copyright (c) 2009 - 2010, 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
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef __IP6_CONFIG_IMPL_H__
#define __IP6_CONFIG_IMPL_H__
#define IP6_CONFIG_DEFAULT_DAD_XMITS 1
#define IP6_CONFIG_DHCP6_OPTION_ORO 6
#define IP6_CONFIG_DHCP6_OPTION_DNS_SERVERS 23
#define DATA_ATTRIB_SIZE_FIXED 0x1
#define DATA_ATTRIB_VOLATILE 0x2
typedef struct _IP6_CONFIG_INSTANCE IP6_CONFIG_INSTANCE;
#define IP6_CONFIG_INSTANCE_FROM_PROTOCOL(Proto) \
Ip6Config, \
)
#define IP6_CONFIG_INSTANCE_FROM_FORM_CALLBACK(Callback) \
CallbackInfo, \
)
#define IP6_SERVICE_FROM_IP6_CONFIG_INSTANCE(Instance) \
IP6_SERVICE, \
)
CR ((ConfigAccess), \
)
/**
The prototype of work function for EfiIp6ConfigSetData().
@param[in] Instance The pointer to the IP6 config instance data.
@param[in] DataSize In bytes, the size of the buffer pointed to by Data.
@param[in] Data The data buffer to set.
@retval EFI_BAD_BUFFER_SIZE The DataSize does not match the size of the type,
8 bytes.
@retval EFI_SUCCESS The specified configuration data for the EFI IPv6
network stack was set successfully.
**/
typedef
(*IP6_CONFIG_SET_DATA) (
);
/**
The prototype of work function for EfiIp6ConfigGetData().
@param[in] Instance The pointer to the IP6 config instance data.
@param[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.
@param[in] Data The data buffer in which the configuration data is returned.
Ignored if DataSize is ZERO.
@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_SUCCESS The specified configuration data was obtained successfully.
**/
typedef
(*IP6_CONFIG_GET_DATA) (
);
typedef union {
typedef struct {
typedef struct {
#pragma pack(1)
//
// heap data that contains the data for each data record.
//
// BOOLEAN IsAltIfIdSet;
// EFI_IP6_CONFIG_POLICY Policy;
// EFI_IP6_CONFIG_DUP_ADDR_DETECT_TRANSMITS DadXmits;
// UINT32 ManualaddressCount;
// UINT32 GatewayCount;
// UINT32 DnsServersCount;
// EFI_IP6_CONFIG_INTERFACE_ID AltIfId;
// EFI_IP6_CONFIG_MANUAL_ADDRESS ManualAddress[];
// EFI_IPv6_ADDRESS Gateway[];
// EFI_IPv6_ADDRESS DnsServers[];
//
typedef struct {
#pragma pack()
typedef struct {
typedef struct {
typedef struct _IP6_FORM_CALLBACK_INFO {
struct _IP6_CONFIG_INSTANCE {
};
/**
The event process routine when the DHCPv6 server is answered with a reply packet
for an information request.
@param[in] This Points to the EFI_DHCP6_PROTOCOL.
@param[in] Context The pointer to the IP6 configuration instance data.
@param[in] Packet The DHCPv6 reply packet.
@retval EFI_SUCCESS The DNS server address was retrieved from the reply packet.
@retval EFI_NOT_READY The reply packet does not contain the DNS server option, or
the DNS server address is not valid.
**/
);
/**
The work function to trigger the DHCPv6 process to perform a stateful autoconfiguration.
@param[in] Instance Pointer to the IP6 config instance data.
@param[in] OtherInfoOnly If FALSE, get stateful address and other information
via DHCPv6. Otherwise, only get the other information.
@retval EFI_SUCCESS The operation finished successfully.
@retval EFI_UNSUPPORTED The DHCP6 driver is not available.
**/
);
/**
Initialize an IP6_CONFIG_INSTANCE.
@param[out] Instance The buffer of IP6_CONFIG_INSTANCE to be initialized.
@retval EFI_OUT_OF_RESOURCES Failed to allocate resources to complete the operation.
@retval EFI_SUCCESS The IP6_CONFIG_INSTANCE initialized successfully.
**/
);
/**
Release an IP6_CONFIG_INSTANCE.
@param[in, out] Instance The buffer of IP6_CONFIG_INSTANCE to be freed.
**/
);
/**
Destory the Dhcp6 child in IP6_CONFIG_INSTANCE and release the resources.
@param[in, out] Instance The buffer of IP6_CONFIG_INSTANCE to be freed.
@retval EFI_SUCCESS The child was successfully destroyed.
@retval Others Failed to destory the child.
**/
);
#endif