]> git.proxmox.com Git - mirror_edk2.git/blame - NetworkPkg/Dhcp6Dxe/Dhcp6Impl.h
FatBinPkg: Update EBC/IA32/X64/IPF binaries
[mirror_edk2.git] / NetworkPkg / Dhcp6Dxe / Dhcp6Impl.h
CommitLineData
a3bcde70
HT
1/** @file\r
2 Dhcp6 internal data structure and definition declaration.\r
3\r
cc658224 4 Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
a3bcde70
HT
5\r
6 This program and the accompanying materials\r
7 are licensed and made available under the terms and conditions of the BSD License\r
8 which accompanies this distribution. The full text of the license may be found at\r
9 http://opensource.org/licenses/bsd-license.php.\r
10\r
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13\r
14**/\r
15\r
16#ifndef __EFI_DHCP6_IMPL_H__\r
17#define __EFI_DHCP6_IMPL_H__\r
18\r
19\r
20#include <Uefi.h>\r
21\r
22#include <Protocol/Dhcp6.h>\r
23#include <Protocol/Udp6.h>\r
cc658224 24#include <Protocol/Ip6Config.h>\r
a3bcde70
HT
25#include <Protocol/ServiceBinding.h>\r
26#include <Protocol/DriverBinding.h>\r
27\r
28#include <Library/UdpIoLib.h>\r
29#include <Library/DebugLib.h>\r
30#include <Library/BaseMemoryLib.h>\r
31#include <Library/MemoryAllocationLib.h>\r
32#include <Library/UefiBootServicesTableLib.h>\r
33#include <Library/UefiRuntimeServicesTableLib.h>\r
34#include <Library/UefiLib.h>\r
35#include <Library/BaseLib.h>\r
36#include <Library/NetLib.h>\r
216f7970 37#include <Library/PrintLib.h>\r
a3bcde70
HT
38\r
39\r
40typedef struct _DHCP6_IA_CB DHCP6_IA_CB;\r
41typedef struct _DHCP6_INF_CB DHCP6_INF_CB;\r
42typedef struct _DHCP6_TX_CB DHCP6_TX_CB;\r
43typedef struct _DHCP6_SERVICE DHCP6_SERVICE;\r
44typedef struct _DHCP6_INSTANCE DHCP6_INSTANCE;\r
45\r
46#include "Dhcp6Utility.h"\r
47#include "Dhcp6Io.h"\r
48#include "Dhcp6Driver.h"\r
49\r
50#define DHCP6_SERVICE_SIGNATURE SIGNATURE_32 ('D', 'H', '6', 'S')\r
51#define DHCP6_INSTANCE_SIGNATURE SIGNATURE_32 ('D', 'H', '6', 'I')\r
52\r
53//\r
54// Transmit parameters of solicit message, refers to section-5.5 of rfc-3315.\r
55//\r
56#define DHCP6_SOL_MAX_DELAY 1\r
57#define DHCP6_SOL_IRT 1\r
58#define DHCP6_SOL_MRC 0\r
59#define DHCP6_SOL_MRT 120\r
60#define DHCP6_SOL_MRD 0\r
61//\r
62// Transmit parameters of request message, refers to section-5.5 of rfc-3315.\r
63//\r
64#define DHCP6_REQ_IRT 1\r
65#define DHCP6_REQ_MRC 10\r
66#define DHCP6_REQ_MRT 30\r
67#define DHCP6_REQ_MRD 0\r
68//\r
69// Transmit parameters of confirm message, refers to section-5.5 of rfc-3315.\r
70//\r
71#define DHCP6_CNF_MAX_DELAY 1\r
72#define DHCP6_CNF_IRT 1\r
73#define DHCP6_CNF_MRC 0\r
74#define DHCP6_CNF_MRT 4\r
75#define DHCP6_CNF_MRD 10\r
76//\r
77// Transmit parameters of renew message, refers to section-5.5 of rfc-3315.\r
78//\r
79#define DHCP6_REN_IRT 10\r
80#define DHCP6_REN_MRC 0\r
81#define DHCP6_REN_MRT 600\r
82#define DHCP6_REN_MRD 0\r
83//\r
84// Transmit parameters of rebind message, refers to section-5.5 of rfc-3315.\r
85//\r
86#define DHCP6_REB_IRT 10\r
87#define DHCP6_REB_MRC 0\r
88#define DHCP6_REB_MRT 600\r
89#define DHCP6_REB_MRD 0\r
90//\r
91// Transmit parameters of information request message, refers to section-5.5 of rfc-3315.\r
92//\r
93#define DHCP6_INF_MAX_DELAY 1\r
94#define DHCP6_INF_IRT 1\r
95#define DHCP6_INF_MRC 0\r
96#define DHCP6_INF_MRT 120\r
97#define DHCP6_INF_MRD 0\r
98//\r
99// Transmit parameters of release message, refers to section-5.5 of rfc-3315.\r
100//\r
101#define DHCP6_REL_IRT 1\r
102#define DHCP6_REL_MRC 5\r
103#define DHCP6_REL_MRT 0\r
104#define DHCP6_REL_MRD 0\r
105//\r
106// Transmit parameters of decline message, refers to section-5.5 of rfc-3315.\r
107//\r
108#define DHCP6_DEC_IRT 1\r
109#define DHCP6_DEC_MRC 5\r
110#define DHCP6_DEC_MRT 0\r
111#define DHCP6_DEC_MRD 0\r
112\r
113#define DHCP6_PACKET_ALL 0\r
114#define DHCP6_PACKET_STATEFUL 1\r
115#define DHCP6_PACKET_STATELESS 2\r
116\r
117#define DHCP6_BASE_PACKET_SIZE 1024\r
118\r
119#define DHCP6_PORT_CLIENT 546\r
120#define DHCP6_PORT_SERVER 547\r
121\r
122#define DHCP6_INSTANCE_FROM_THIS(Instance) CR ((Instance), DHCP6_INSTANCE, Dhcp6, DHCP6_INSTANCE_SIGNATURE)\r
123#define DHCP6_SERVICE_FROM_THIS(Service) CR ((Service), DHCP6_SERVICE, ServiceBinding, DHCP6_SERVICE_SIGNATURE)\r
124\r
125extern EFI_IPv6_ADDRESS mAllDhcpRelayAndServersAddress;\r
126extern EFI_IPv6_ADDRESS mAllDhcpServersAddress;\r
127extern EFI_DHCP6_PROTOCOL gDhcp6ProtocolTemplate;\r
128\r
129//\r
130// Enumeration of Dhcp6 message type, refers to section-5.3 of rfc-3315.\r
131//\r
132typedef enum {\r
133 Dhcp6MsgSolicit = 1,\r
134 Dhcp6MsgAdvertise = 2,\r
135 Dhcp6MsgRequest = 3,\r
136 Dhcp6MsgConfirm = 4,\r
137 Dhcp6MsgRenew = 5,\r
138 Dhcp6MsgRebind = 6,\r
139 Dhcp6MsgReply = 7,\r
140 Dhcp6MsgRelease = 8,\r
141 Dhcp6MsgDecline = 9,\r
142 Dhcp6MsgReconfigure = 10,\r
143 Dhcp6MsgInfoRequest = 11\r
144} DHCP6_MSG_TYPE;\r
145\r
146//\r
147// Enumeration of option code in Dhcp6 packet, refers to section-24.3 of rfc-3315.\r
148//\r
149typedef enum {\r
150 Dhcp6OptClientId = 1,\r
151 Dhcp6OptServerId = 2,\r
152 Dhcp6OptIana = 3,\r
153 Dhcp6OptIata = 4,\r
154 Dhcp6OptIaAddr = 5,\r
155 Dhcp6OptRequestOption = 6,\r
156 Dhcp6OptPreference = 7,\r
157 Dhcp6OptElapsedTime = 8,\r
158 Dhcp6OptReplayMessage = 9,\r
159 Dhcp6OptAuthentication = 11,\r
160 Dhcp6OptServerUnicast = 12,\r
161 Dhcp6OptStatusCode = 13,\r
162 Dhcp6OptRapidCommit = 14,\r
163 Dhcp6OptUserClass = 15,\r
164 Dhcp6OptVendorClass = 16,\r
165 Dhcp6OptVendorInfo = 17,\r
166 Dhcp6OptInterfaceId = 18,\r
167 Dhcp6OptReconfigMessage = 19,\r
168 Dhcp6OptReconfigureAccept = 20\r
169} DHCP6_OPT_CODE;\r
170\r
171//\r
172// Enumeration of status code recorded by IANA, refers to section-24.4 of rfc-3315.\r
173//\r
174typedef enum {\r
175 Dhcp6StsSuccess = 0,\r
176 Dhcp6StsUnspecFail = 1,\r
177 Dhcp6StsNoAddrsAvail = 2,\r
178 Dhcp6StsNoBinding = 3,\r
179 Dhcp6StsNotOnLink = 4,\r
180 Dhcp6StsUseMulticast = 5\r
181} DHCP6_STS_CODE;\r
182\r
183//\r
184// Enumeration of Duid type recorded by IANA, refers to section-24.5 of rfc-3315.\r
185//\r
186typedef enum {\r
187 Dhcp6DuidTypeLlt = 1,\r
188 Dhcp6DuidTypeEn = 2,\r
33c09637 189 Dhcp6DuidTypeLl = 3,\r
190 Dhcp6DuidTypeUuid = 4\r
a3bcde70
HT
191} DHCP6_DUID_TYPE;\r
192\r
193//\r
194// Control block for each IA.\r
195//\r
196struct _DHCP6_IA_CB {\r
197 EFI_DHCP6_IA *Ia;\r
198 UINT32 T1;\r
199 UINT32 T2;\r
200 UINT32 AllExpireTime;\r
201 UINT32 LeaseTime;\r
202};\r
203\r
204//\r
205// Control block for each transmitted message.\r
206//\r
207struct _DHCP6_TX_CB {\r
208 LIST_ENTRY Link;\r
209 UINT32 Xid;\r
210 EFI_DHCP6_PACKET *TxPacket;\r
211 EFI_DHCP6_RETRANSMISSION RetryCtl;\r
212 UINT32 RetryCnt;\r
213 UINT32 RetryExp;\r
214 UINT32 RetryLos;\r
215 UINT32 TickTime;\r
216 UINT16 *Elapsed;\r
129b8b09 217 BOOLEAN SolicitRetry;\r
a3bcde70
HT
218};\r
219\r
220//\r
221// Control block for each info-request message.\r
222//\r
223struct _DHCP6_INF_CB {\r
224 LIST_ENTRY Link;\r
225 UINT32 Xid;\r
226 EFI_DHCP6_INFO_CALLBACK ReplyCallback;\r
227 VOID *CallbackContext;\r
228 EFI_EVENT TimeoutEvent;\r
229};\r
230\r
231//\r
232// Control block for Dhcp6 instance, it's per configuration data.\r
233//\r
234struct _DHCP6_INSTANCE {\r
235 UINT32 Signature;\r
236 EFI_HANDLE Handle;\r
237 DHCP6_SERVICE *Service;\r
238 LIST_ENTRY Link;\r
239 EFI_DHCP6_PROTOCOL Dhcp6;\r
240 EFI_EVENT Timer;\r
241 EFI_DHCP6_CONFIG_DATA *Config;\r
242 EFI_DHCP6_IA *CacheIa;\r
243 DHCP6_IA_CB IaCb;\r
244 LIST_ENTRY TxList;\r
245 LIST_ENTRY InfList;\r
246 EFI_DHCP6_PACKET *AdSelect;\r
247 UINT8 AdPref;\r
248 EFI_IPv6_ADDRESS *Unicast;\r
216f7970 249 volatile EFI_STATUS UdpSts;\r
75dce340 250 BOOLEAN InDestroy;\r
a3bcde70 251 BOOLEAN MediaPresent;\r
685e44a5 252 //\r
253 // StartTime is used to calculate the 'elapsed-time' option. Refer to RFC3315,\r
254 // the elapsed-time is amount of time since the client began its current DHCP transaction. \r
255 //\r
a3bcde70
HT
256 UINT64 StartTime;\r
257};\r
258\r
259//\r
260// Control block for Dhcp6 service, it's per Nic handle.\r
261//\r
262struct _DHCP6_SERVICE {\r
263 UINT32 Signature;\r
264 EFI_HANDLE Controller;\r
265 EFI_HANDLE Image;\r
266 EFI_SERVICE_BINDING_PROTOCOL ServiceBinding;\r
267 EFI_SIMPLE_NETWORK_PROTOCOL *Snp;\r
cc658224 268 EFI_IP6_CONFIG_PROTOCOL *Ip6Cfg;\r
a3bcde70
HT
269 EFI_DHCP6_DUID *ClientId;\r
270 UDP_IO *UdpIo;\r
271 UINT32 Xid;\r
272 LIST_ENTRY Child;\r
273 UINTN NumOfChild;\r
a3bcde70
HT
274};\r
275\r
276/**\r
277 Starts the DHCPv6 standard S.A.R.R. process.\r
278\r
279 The Start() function starts the DHCPv6 standard process. This function can\r
280 be called only when the state of Dhcp6 instance is in the Dhcp6Init state.\r
281 If the DHCP process completes successfully, the state of the Dhcp6 instance\r
282 will be transferred through Dhcp6Selecting and Dhcp6Requesting to the\r
283 Dhcp6Bound state.\r
284 Refer to rfc-3315 for precise state transitions during this process. At the\r
285 time when each event occurs in this process, the callback function that was set\r
286 by EFI_DHCP6_PROTOCOL.Configure() will be called and the user can take this\r
287 opportunity to control the process.\r
288\r
289 @param[in] This The pointer to Dhcp6 protocol.\r
290\r
291 @retval EFI_SUCCESS The DHCPv6 standard process has started, or it\r
292 completed when CompletionEvent was NULL.\r
293 @retval EFI_ACCESS_DENIED The EFI DHCPv6 Child instance hasn't been configured.\r
294 @retval EFI_INVALID_PARAMETER This is NULL.\r
295 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.\r
296 @retval EFI_TIMEOUT The DHCPv6 configuration process failed because no\r
297 response was received from the server within the\r
298 specified timeout value.\r
299 @retval EFI_ABORTED The user aborted the DHCPv6 process.\r
300 @retval EFI_ALREADY_STARTED Some other Dhcp6 instance already started the DHCPv6\r
301 standard process.\r
302 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.\r
303\r
304**/\r
305EFI_STATUS\r
306EFIAPI\r
307EfiDhcp6Start (\r
308 IN EFI_DHCP6_PROTOCOL *This\r
309 );\r
310\r
311/**\r
312 Stops the DHCPv6 standard S.A.R.R. process.\r
313\r
314 The Stop() function is used to stop the DHCPv6 standard process. After this\r
315 function is called successfully, the state of Dhcp6 instance is transferred\r
316 into the Dhcp6Init. EFI_DHCP6_PROTOCOL.Configure() needs to be called\r
317 before DHCPv6 standard process can be started again. This function can be\r
318 called when the Dhcp6 instance is in any state.\r
319\r
320 @param[in] This The pointer to the Dhcp6 protocol.\r
321\r
322 @retval EFI_SUCCESS The Dhcp6 instance is now in the Dhcp6Init state.\r
323 @retval EFI_INVALID_PARAMETER This is NULL.\r
324\r
325**/\r
326EFI_STATUS\r
327EFIAPI\r
328EfiDhcp6Stop (\r
329 IN EFI_DHCP6_PROTOCOL *This\r
330 );\r
331\r
332/**\r
333 Returns the current operating mode data for the Dhcp6 instance.\r
334\r
335 The GetModeData() function returns the current operating mode and\r
336 cached data packet for the Dhcp6 instance.\r
337\r
338 @param[in] This The pointer to the Dhcp6 protocol.\r
339 @param[out] Dhcp6ModeData The pointer to the Dhcp6 mode data.\r
340 @param[out] Dhcp6ConfigData The pointer to the Dhcp6 configure data.\r
341\r
342 @retval EFI_SUCCESS The mode data was returned.\r
343 @retval EFI_INVALID_PARAMETER This is NULL.\r
344 @retval EFI_ACCESS_DENIED The EFI DHCPv6 Protocol instance has not\r
345 been configured when Dhcp6ConfigData is\r
346 not NULL.\r
347**/\r
348EFI_STATUS\r
349EFIAPI\r
350EfiDhcp6GetModeData (\r
351 IN EFI_DHCP6_PROTOCOL *This,\r
352 OUT EFI_DHCP6_MODE_DATA *Dhcp6ModeData OPTIONAL,\r
353 OUT EFI_DHCP6_CONFIG_DATA *Dhcp6ConfigData OPTIONAL\r
354 );\r
355\r
356/**\r
357 Initializes, changes, or resets the operational settings for the Dhcp6 instance.\r
358\r
359 The Configure() function is used to initialize or clean up the configuration\r
360 data of the Dhcp6 instance:\r
361 - When Dhcp6CfgData is not NULL and Configure() is called successfully, the\r
362 configuration data will be initialized in the Dhcp6 instance and the state\r
363 of the configured IA will be transferred into Dhcp6Init.\r
364 - When Dhcp6CfgData is NULL and Configure() is called successfully, the\r
365 configuration data will be cleaned up and no IA will be associated with\r
366 the Dhcp6 instance.\r
367 To update the configuration data for an Dhcp6 instance, the original data\r
368 must be cleaned up before setting the new configuration data.\r
369\r
370 @param[in] This The pointer to the Dhcp6 protocol\r
371 @param[in] Dhcp6CfgData The pointer to the EFI_DHCP6_CONFIG_DATA.\r
372\r
373 @retval EFI_SUCCESS The Dhcp6 is configured successfully with the\r
374 Dhcp6Init state, or cleaned up the original\r
375 configuration setting.\r
376 @retval EFI_ACCESS_DENIED The Dhcp6 instance has been already configured\r
377 when Dhcp6CfgData is not NULL.\r
378 The Dhcp6 instance has already started the\r
379 DHCPv6 S.A.R.R when Dhcp6CfgData is NULL.\r
380 @retval EFI_INVALID_PARAMETER Some of the parameter is invalid.\r
381 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.\r
382 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.\r
383\r
384**/\r
385EFI_STATUS\r
386EFIAPI\r
387EfiDhcp6Configure (\r
388 IN EFI_DHCP6_PROTOCOL *This,\r
389 IN EFI_DHCP6_CONFIG_DATA *Dhcp6CfgData OPTIONAL\r
390 );\r
391\r
392/**\r
393 Request configuration information without the assignment of any\r
394 Ia addresses of the client.\r
395\r
396 The InfoRequest() function is used to request configuration information\r
397 without the assignment of any IPv6 address of the client. Client sends\r
398 out Information Request packet to obtain the required configuration\r
399 information, and DHCPv6 server responds with Reply packet containing\r
400 the information for the client. The received Reply packet will be passed\r
401 to the user by ReplyCallback function. If user returns EFI_NOT_READY from\r
402 ReplyCallback, the Dhcp6 instance will continue to receive other Reply\r
403 packets unless timeout according to the Retransmission parameter.\r
404 Otherwise, the Information Request exchange process will be finished\r
405 successfully if user returns EFI_SUCCESS from ReplyCallback.\r
406\r
407 @param[in] This The pointer to the Dhcp6 protocol.\r
408 @param[in] SendClientId If TRUE, the DHCPv6 protocol instance will build Client\r
409 Identifier option and include it into Information Request\r
410 packet. Otherwise, Client Identifier option will not be included.\r
411 @param[in] OptionRequest The pointer to the buffer of option request options.\r
412 @param[in] OptionCount The option number in the OptionList.\r
413 @param[in] OptionList The list of appended options.\r
414 @param[in] Retransmission The pointer to the retransmission of the message.\r
415 @param[in] TimeoutEvent The event of timeout.\r
416 @param[in] ReplyCallback The callback function when a reply was received.\r
417 @param[in] CallbackContext The pointer to the parameter passed to the callback.\r
418\r
419 @retval EFI_SUCCESS The DHCPv6 information request exchange process\r
420 completed when TimeoutEvent is NULL. Information\r
421 Request packet has been sent to DHCPv6 server when\r
422 TimeoutEvent is not NULL.\r
423 @retval EFI_NO_RESPONSE The DHCPv6 information request exchange process failed\r
424 because of no response, or not all requested-options\r
425 are responded to by DHCPv6 servers when Timeout happened.\r
426 @retval EFI_ABORTED The DHCPv6 information request exchange process was aborted\r
427 by the user.\r
428 @retval EFI_INVALID_PARAMETER Some parameter is NULL.\r
429 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.\r
430 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.\r
431\r
432**/\r
433EFI_STATUS\r
434EFIAPI\r
435EfiDhcp6InfoRequest (\r
436 IN EFI_DHCP6_PROTOCOL *This,\r
437 IN BOOLEAN SendClientId,\r
438 IN EFI_DHCP6_PACKET_OPTION *OptionRequest,\r
439 IN UINT32 OptionCount,\r
440 IN EFI_DHCP6_PACKET_OPTION *OptionList[] OPTIONAL,\r
441 IN EFI_DHCP6_RETRANSMISSION *Retransmission,\r
442 IN EFI_EVENT TimeoutEvent OPTIONAL,\r
443 IN EFI_DHCP6_INFO_CALLBACK ReplyCallback,\r
444 IN VOID *CallbackContext OPTIONAL\r
445 );\r
446\r
447/**\r
448 Manually extend the valid and preferred lifetimes for the IPv6 addresses\r
449 of the configured IA and update other configuration parameters by sending\r
450 Renew or Rebind packet.\r
451\r
452 The RenewRebind() function is used to manually extend the valid and preferred\r
453 lifetimes for the IPv6 addresses of the configured IA and update other\r
454 configuration parameters by sending a Renew or Rebind packet.\r
455 - When RebindRequest is FALSE and the state of the configured IA is Dhcp6Bound,\r
456 it will send Renew packet to the previously DHCPv6 server and transfer the\r
457 state of the configured IA to Dhcp6Renewing. If valid Reply packet received,\r
458 the state transfers to Dhcp6Bound and the valid and preferred timer restarts.\r
459 If fails, the state transfers to Dhcp6Bound but the timer continues.\r
460 - When RebindRequest is TRUE and the state of the configured IA is Dhcp6Bound,\r
461 it will send a Rebind packet. If a valid Reply packet is received, the state transfers\r
462 to Dhcp6Bound, and the valid and preferred timer restarts. If it fails, the state\r
463 transfers to Dhcp6Init, and the IA can't be used.\r
464\r
465 @param[in] This The pointer to the Dhcp6 protocol.\r
466 @param[in] RebindRequest If TRUE, Rebind packet will be sent and enter Dhcp6Rebinding state.\r
467 Otherwise, Renew packet will be sent and enter Dhcp6Renewing state.\r
468\r
469 @retval EFI_SUCCESS The DHCPv6 renew/rebind exchange process\r
470 completed and at least one IPv6 address of the\r
471 configured IA was bound again when\r
472 EFI_DHCP6_CONFIG_DATA.IaInfoEvent was NULL.\r
473 The EFI DHCPv6 Protocol instance has sent Renew\r
474 or Rebind packet when\r
475 EFI_DHCP6_CONFIG_DATA.IaInfoEvent is not NULL.\r
476 @retval EFI_ACCESS_DENIED The Dhcp6 instance hasn't been configured, or the\r
477 state of the configured IA is not in Dhcp6Bound.\r
478 @retval EFI_ALREADY_STARTED The state of the configured IA has already entered\r
479 Dhcp6Renewing when RebindRequest is FALSE.\r
480 The state of the configured IA has already entered\r
481 Dhcp6Rebinding when RebindRequest is TRUE.\r
482 @retval EFI_ABORTED The DHCPv6 renew/rebind exchange process aborted\r
483 by user.\r
484 @retval EFI_NO_RESPONSE The DHCPv6 renew/rebind exchange process failed\r
485 because of no response.\r
486 @retval EFI_NO_MAPPING No IPv6 address has been bound to the configured\r
487 IA after the DHCPv6 renew/rebind exchange process.\r
488 @retval EFI_INVALID_PARAMETER Some parameter is NULL.\r
489 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.\r
490\r
491**/\r
492EFI_STATUS\r
493EFIAPI\r
494EfiDhcp6RenewRebind (\r
495 IN EFI_DHCP6_PROTOCOL *This,\r
496 IN BOOLEAN RebindRequest\r
497 );\r
498\r
499/**\r
500 Inform that one or more addresses assigned by a server are already\r
501 in use by another node.\r
502\r
503 The Decline() function is used to manually decline the assignment of\r
504 IPv6 addresses, which have been already used by another node. If all\r
505 IPv6 addresses of the configured IA are declined through this function,\r
506 the state of the IA will switch through Dhcp6Declining to Dhcp6Init.\r
507 Otherwise, the state of the IA will restore to Dhcp6Bound after the\r
508 declining process. The Decline() can only be called when the IA is in\r
509 Dhcp6Bound state. If the EFI_DHCP6_CONFIG_DATA.IaInfoEvent is NULL,\r
510 this function is a blocking operation. It will return after the\r
511 declining process finishes, or aborted by user.\r
512\r
513 @param[in] This The pointer to the Dhcp6 protocol.\r
514 @param[in] AddressCount The number of declining addresses.\r
515 @param[in] Addresses The pointer to the buffer stored the declining\r
516 addresses.\r
517\r
518 @retval EFI_SUCCESS The DHCPv6 decline exchange process completed\r
519 when EFI_DHCP6_CONFIG_DATA.IaInfoEvent was NULL.\r
520 The Dhcp6 instance has sent Decline packet when\r
521 EFI_DHCP6_CONFIG_DATA.IaInfoEvent is not NULL.\r
522 @retval EFI_ACCESS_DENIED The Dhcp6 instance hasn't been configured, or the\r
523 state of the configured IA is not in Dhcp6Bound.\r
524 @retval EFI_ABORTED The DHCPv6 decline exchange process was aborted by the user.\r
525 @retval EFI_NOT_FOUND Any specified IPv6 address is not correlated with\r
526 the configured IA for this instance.\r
527 @retval EFI_INVALID_PARAMETER Some parameter is NULL.\r
528 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.\r
529\r
530**/\r
531EFI_STATUS\r
532EFIAPI\r
533EfiDhcp6Decline (\r
534 IN EFI_DHCP6_PROTOCOL *This,\r
535 IN UINT32 AddressCount,\r
536 IN EFI_IPv6_ADDRESS *Addresses\r
537 );\r
538\r
539/**\r
540 Release one or more addresses associated with the configured Ia\r
541 for the current instance.\r
542\r
543 The Release() function is used to manually release the one or more\r
544 IPv6 address. If AddressCount is zero, it will release all IPv6\r
545 addresses of the configured IA. If all IPv6 addresses of the IA are\r
546 released through this function, the state of the IA will switch\r
547 through Dhcp6Releasing to Dhcp6Init, otherwise, the state of the\r
548 IA will restore to Dhcp6Bound after the releasing process.\r
549 The Release() can only be called when the IA is in a Dhcp6Bound state.\r
550 If the EFI_DHCP6_CONFIG_DATA.IaInfoEvent is NULL, the function is\r
551 a blocking operation. It will return after the releasing process\r
552 finishes, or aborted by user.\r
553\r
554 @param[in] This The pointer to the Dhcp6 protocol.\r
555 @param[in] AddressCount The number of releasing addresses.\r
556 @param[in] Addresses The pointer to the buffer stored the releasing\r
557 addresses.\r
558 @retval EFI_SUCCESS The DHCPv6 release exchange process has\r
559 completed when EFI_DHCP6_CONFIG_DATA.IaInfoEvent\r
560 is NULL. The Dhcp6 instance has sent Release\r
561 packet when EFI_DHCP6_CONFIG_DATA.IaInfoEvent\r
562 is not NULL.\r
563 @retval EFI_ACCESS_DENIED The Dhcp6 instance hasn't been configured, or the\r
564 state of the configured IA is not in Dhcp6Bound.\r
565 @retval EFI_ABORTED The DHCPv6 release exchange process was aborted by the user.\r
566 @retval EFI_NOT_FOUND Any specified IPv6 address is not correlated with\r
567 the configured IA for this instance.\r
568 @retval EFI_INVALID_PARAMETER Some parameter is NULL.\r
569 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.\r
570\r
571**/\r
572EFI_STATUS\r
573EFIAPI\r
574EfiDhcp6Release (\r
575 IN EFI_DHCP6_PROTOCOL *This,\r
576 IN UINT32 AddressCount,\r
577 IN EFI_IPv6_ADDRESS *Addresses\r
578 );\r
579\r
580/**\r
581 Parse the option data in the Dhcp6 packet.\r
582\r
583 The Parse() function is used to retrieve the option list in the DHCPv6 packet.\r
584\r
585 @param[in] This The pointer to the Dhcp6 protocol.\r
586 @param[in] Packet The pointer to the Dhcp6 packet.\r
587 @param[in, out] OptionCount The number of option in the packet.\r
588 @param[out] PacketOptionList The array of pointers to the each option in the packet.\r
589\r
590 @retval EFI_SUCCESS The packet was successfully parsed.\r
591 @retval EFI_INVALID_PARAMETER Some parameter is NULL.\r
592 @retval EFI_BUFFER_TOO_SMALL *OptionCount is smaller than the number of options\r
593 that were found in the Packet.\r
594\r
595**/\r
596EFI_STATUS\r
597EFIAPI\r
598EfiDhcp6Parse (\r
599 IN EFI_DHCP6_PROTOCOL *This,\r
600 IN EFI_DHCP6_PACKET *Packet,\r
601 IN OUT UINT32 *OptionCount,\r
602 OUT EFI_DHCP6_PACKET_OPTION *PacketOptionList[] OPTIONAL\r
603 );\r
604\r
605#endif\r