TianoCore EDK2 master
Loading...
Searching...
No Matches
Ip6ConfigImpl.h
Go to the documentation of this file.
1
10#ifndef __IP6_CONFIG_IMPL_H__
11#define __IP6_CONFIG_IMPL_H__
12
13#define IP6_CONFIG_INSTANCE_SIGNATURE SIGNATURE_32 ('I', 'P', '6', 'C')
14#define IP6_FORM_CALLBACK_INFO_SIGNATURE SIGNATURE_32 ('I', 'F', 'C', 'I')
15#define IP6_CONFIG_VARIABLE_ATTRIBUTE (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS)
16
17#define IP6_CONFIG_DEFAULT_DAD_XMITS 1
18
19#define DATA_ATTRIB_SIZE_FIXED 0x1
20#define DATA_ATTRIB_VOLATILE 0x2
21
22#define DATA_ATTRIB_SET(Attrib, Bits) (BOOLEAN)((Attrib) & (Bits))
23#define SET_DATA_ATTRIB(Attrib, Bits) ((Attrib) |= (Bits))
24
26
27#define IP6_CONFIG_INSTANCE_FROM_PROTOCOL(Proto) \
28 CR ((Proto), \
29 IP6_CONFIG_INSTANCE, \
30 Ip6Config, \
31 IP6_CONFIG_INSTANCE_SIGNATURE \
32 )
33
34#define IP6_CONFIG_INSTANCE_FROM_FORM_CALLBACK(Callback) \
35 CR ((Callback), \
36 IP6_CONFIG_INSTANCE, \
37 CallbackInfo, \
38 IP6_CONFIG_INSTANCE_SIGNATURE \
39 )
40
41#define IP6_SERVICE_FROM_IP6_CONFIG_INSTANCE(Instance) \
42 CR ((Instance), \
43 IP6_SERVICE, \
44 Ip6ConfigInstance, \
45 IP6_SERVICE_SIGNATURE \
46 )
47
48#define IP6_FORM_CALLBACK_INFO_FROM_CONFIG_ACCESS(ConfigAccess) \
49 CR ((ConfigAccess), \
50 IP6_FORM_CALLBACK_INFO, \
51 HiiConfigAccess, \
52 IP6_FORM_CALLBACK_INFO_SIGNATURE \
53 )
54
68typedef
71 IN IP6_CONFIG_INSTANCE *Instance,
72 IN UINTN DataSize,
73 IN VOID *Data
74 );
75
92typedef
95 IN IP6_CONFIG_INSTANCE *Instance,
96 IN OUT UINTN *DataSize,
97 IN VOID *Data OPTIONAL
98 );
99
100typedef union {
101 VOID *Ptr;
104 EFI_IP6_CONFIG_POLICY *Policy;
106 EFI_IP6_CONFIG_MANUAL_ADDRESS *ManualAddress;
107 EFI_IPv6_ADDRESS *Gateway;
108 EFI_IPv6_ADDRESS *DnsServers;
110
111typedef struct {
112 IP6_CONFIG_SET_DATA SetData;
113 IP6_CONFIG_GET_DATA GetData;
114 EFI_STATUS Status;
115 UINT8 Attribute;
116 NET_MAP EventMap;
117 IP6_CONFIG_DATA Data;
118 UINTN DataSize;
120
121typedef struct {
122 UINT16 Offset;
123 UINT32 DataSize;
126
127#pragma pack(1)
128
129//
130// heap data that contains the data for each data record.
131//
132// BOOLEAN IsAltIfIdSet;
133// EFI_IP6_CONFIG_POLICY Policy;
134// EFI_IP6_CONFIG_DUP_ADDR_DETECT_TRANSMITS DadXmits;
135// UINT32 ManualaddressCount;
136// UINT32 GatewayCount;
137// UINT32 DnsServersCount;
138// EFI_IP6_CONFIG_INTERFACE_ID AltIfId;
139// EFI_IP6_CONFIG_MANUAL_ADDRESS ManualAddress[];
140// EFI_IPv6_ADDRESS Gateway[];
141// EFI_IPv6_ADDRESS DnsServers[];
142//
143typedef struct {
144 UINT32 IaId;
145 UINT16 Checksum;
146 UINT16 DataRecordCount;
147 IP6_CONFIG_DATA_RECORD DataRecord[1];
149
150#pragma pack()
151
152typedef struct {
153 LIST_ENTRY Link;
154 EFI_IP6_ADDRESS_INFO AddrInfo;
156
157typedef struct {
168
170 UINT32 Signature;
171 EFI_HANDLE ChildHandle;
172 EFI_HII_CONFIG_ACCESS_PROTOCOL HiiConfigAccess;
173 EFI_DEVICE_PATH_PROTOCOL *HiiVendorDevicePath;
174 EFI_HII_HANDLE RegisteredHandle;
176
178 UINT32 Signature;
179 BOOLEAN Configured;
180 LIST_ENTRY Link;
181 UINT16 IfIndex;
182
183 EFI_IP6_CONFIG_INTERFACE_INFO InterfaceInfo;
187
189 NET_MAP DadFailedMap;
190 NET_MAP DadPassedMap;
191
192 EFI_IP6_CONFIG_PROTOCOL Ip6Config;
193
194 EFI_EVENT Dhcp6SbNotifyEvent;
195 VOID *Registration;
196 EFI_HANDLE Dhcp6Handle;
197 EFI_DHCP6_PROTOCOL *Dhcp6;
198 BOOLEAN OtherInfoOnly;
199 UINT32 IaId;
200 EFI_EVENT Dhcp6Event;
201 UINT32 FailedIaAddressCount;
202 EFI_IPv6_ADDRESS *DeclineAddress;
203 UINT32 DeclineAddressCount;
204
205 IP6_FORM_CALLBACK_INFO CallbackInfo;
206 IP6_CONFIG_NVDATA Ip6NvData;
207};
208
225 IN CHAR16 *VarName,
226 IN OUT IP6_CONFIG_INSTANCE *Instance
227 );
228
243EFIAPI
246 IN VOID *Context,
247 IN EFI_DHCP6_PACKET *Packet
248 );
249
263 IN IP6_CONFIG_INSTANCE *Instance,
264 IN BOOLEAN OtherInfoOnly
265 );
266
278 OUT IP6_CONFIG_INSTANCE *Instance
279 );
280
287VOID
289 IN OUT IP6_CONFIG_INSTANCE *Instance
290 );
291
303 IN OUT IP6_CONFIG_INSTANCE *Instance
304 );
305
306#endif
UINT64 UINTN
EFI_IP6_CONFIG_DATA_TYPE
Definition: Ip6Config.h:25
@ Ip6ConfigDataTypeMaximum
Definition: Ip6Config.h:94
EFI_IP6_CONFIG_POLICY
Definition: Ip6Config.h:154
EFI_STATUS(* IP6_CONFIG_SET_DATA)(IN IP6_CONFIG_INSTANCE *Instance, IN UINTN DataSize, IN VOID *Data)
Definition: Ip6ConfigImpl.h:70
EFI_STATUS EFIAPI Ip6ConfigOnDhcp6Reply(IN EFI_DHCP6_PROTOCOL *This, IN VOID *Context, IN EFI_DHCP6_PACKET *Packet)
EFI_STATUS(* IP6_CONFIG_GET_DATA)(IN IP6_CONFIG_INSTANCE *Instance, IN OUT UINTN *DataSize, IN VOID *Data OPTIONAL)
Definition: Ip6ConfigImpl.h:94
VOID Ip6ConfigCleanInstance(IN OUT IP6_CONFIG_INSTANCE *Instance)
EFI_STATUS Ip6ConfigStartStatefulAutoConfig(IN IP6_CONFIG_INSTANCE *Instance, IN BOOLEAN OtherInfoOnly)
EFI_STATUS Ip6ConfigInitInstance(OUT IP6_CONFIG_INSTANCE *Instance)
EFI_STATUS Ip6ConfigDestroyDhcp6(IN OUT IP6_CONFIG_INSTANCE *Instance)
EFI_STATUS Ip6ConfigReadConfigData(IN CHAR16 *VarName, IN OUT IP6_CONFIG_INSTANCE *Instance)
#define OPTIONAL
Definition: Base.h:290
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_EVENT
Definition: UefiBaseType.h:37
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
VOID * EFI_HII_HANDLE
EFI_IP6_CONFIG_DUP_ADDR_DETECT_TRANSMITS DadTransmitCount
dad transmits count
UINT32 ManualAddressCount
IP addresses count.
LIST_ENTRY DnsAddress
DNS server address.
UINT32 GatewayAddressCount
Gateway address count.
LIST_ENTRY GatewayAddress
Gateway address.
EFI_IP6_CONFIG_INTERFACE_ID InterfaceId
alternative interface id
LIST_ENTRY ManualAddress
IP addresses.
EFI_IP6_CONFIG_POLICY Policy
manual or automatic
UINT32 DnsAddressCount
DNS server address count.