]> git.proxmox.com Git - mirror_edk2.git/blame - NetworkPkg/Dhcp6Dxe/Dhcp6Impl.h
1. Add EFI_COMPONENT_NAME2_PROTOCOL.GetControllerName() support.
[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
HT
251 BOOLEAN MediaPresent;\r
252 UINT64 StartTime;\r
253};\r
254\r
255//\r
256// Control block for Dhcp6 service, it's per Nic handle.\r
257//\r
258struct _DHCP6_SERVICE {\r
259 UINT32 Signature;\r
260 EFI_HANDLE Controller;\r
261 EFI_HANDLE Image;\r
262 EFI_SERVICE_BINDING_PROTOCOL ServiceBinding;\r
263 EFI_SIMPLE_NETWORK_PROTOCOL *Snp;\r
cc658224 264 EFI_IP6_CONFIG_PROTOCOL *Ip6Cfg;\r
a3bcde70
HT
265 EFI_DHCP6_DUID *ClientId;\r
266 UDP_IO *UdpIo;\r
267 UINT32 Xid;\r
268 LIST_ENTRY Child;\r
269 UINTN NumOfChild;\r
a3bcde70
HT
270};\r
271\r
272/**\r
273 Starts the DHCPv6 standard S.A.R.R. process.\r
274\r
275 The Start() function starts the DHCPv6 standard process. This function can\r
276 be called only when the state of Dhcp6 instance is in the Dhcp6Init state.\r
277 If the DHCP process completes successfully, the state of the Dhcp6 instance\r
278 will be transferred through Dhcp6Selecting and Dhcp6Requesting to the\r
279 Dhcp6Bound state.\r
280 Refer to rfc-3315 for precise state transitions during this process. At the\r
281 time when each event occurs in this process, the callback function that was set\r
282 by EFI_DHCP6_PROTOCOL.Configure() will be called and the user can take this\r
283 opportunity to control the process.\r
284\r
285 @param[in] This The pointer to Dhcp6 protocol.\r
286\r
287 @retval EFI_SUCCESS The DHCPv6 standard process has started, or it\r
288 completed when CompletionEvent was NULL.\r
289 @retval EFI_ACCESS_DENIED The EFI DHCPv6 Child instance hasn't been configured.\r
290 @retval EFI_INVALID_PARAMETER This is NULL.\r
291 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.\r
292 @retval EFI_TIMEOUT The DHCPv6 configuration process failed because no\r
293 response was received from the server within the\r
294 specified timeout value.\r
295 @retval EFI_ABORTED The user aborted the DHCPv6 process.\r
296 @retval EFI_ALREADY_STARTED Some other Dhcp6 instance already started the DHCPv6\r
297 standard process.\r
298 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.\r
299\r
300**/\r
301EFI_STATUS\r
302EFIAPI\r
303EfiDhcp6Start (\r
304 IN EFI_DHCP6_PROTOCOL *This\r
305 );\r
306\r
307/**\r
308 Stops the DHCPv6 standard S.A.R.R. process.\r
309\r
310 The Stop() function is used to stop the DHCPv6 standard process. After this\r
311 function is called successfully, the state of Dhcp6 instance is transferred\r
312 into the Dhcp6Init. EFI_DHCP6_PROTOCOL.Configure() needs to be called\r
313 before DHCPv6 standard process can be started again. This function can be\r
314 called when the Dhcp6 instance is in any state.\r
315\r
316 @param[in] This The pointer to the Dhcp6 protocol.\r
317\r
318 @retval EFI_SUCCESS The Dhcp6 instance is now in the Dhcp6Init state.\r
319 @retval EFI_INVALID_PARAMETER This is NULL.\r
320\r
321**/\r
322EFI_STATUS\r
323EFIAPI\r
324EfiDhcp6Stop (\r
325 IN EFI_DHCP6_PROTOCOL *This\r
326 );\r
327\r
328/**\r
329 Returns the current operating mode data for the Dhcp6 instance.\r
330\r
331 The GetModeData() function returns the current operating mode and\r
332 cached data packet for the Dhcp6 instance.\r
333\r
334 @param[in] This The pointer to the Dhcp6 protocol.\r
335 @param[out] Dhcp6ModeData The pointer to the Dhcp6 mode data.\r
336 @param[out] Dhcp6ConfigData The pointer to the Dhcp6 configure data.\r
337\r
338 @retval EFI_SUCCESS The mode data was returned.\r
339 @retval EFI_INVALID_PARAMETER This is NULL.\r
340 @retval EFI_ACCESS_DENIED The EFI DHCPv6 Protocol instance has not\r
341 been configured when Dhcp6ConfigData is\r
342 not NULL.\r
343**/\r
344EFI_STATUS\r
345EFIAPI\r
346EfiDhcp6GetModeData (\r
347 IN EFI_DHCP6_PROTOCOL *This,\r
348 OUT EFI_DHCP6_MODE_DATA *Dhcp6ModeData OPTIONAL,\r
349 OUT EFI_DHCP6_CONFIG_DATA *Dhcp6ConfigData OPTIONAL\r
350 );\r
351\r
352/**\r
353 Initializes, changes, or resets the operational settings for the Dhcp6 instance.\r
354\r
355 The Configure() function is used to initialize or clean up the configuration\r
356 data of the Dhcp6 instance:\r
357 - When Dhcp6CfgData is not NULL and Configure() is called successfully, the\r
358 configuration data will be initialized in the Dhcp6 instance and the state\r
359 of the configured IA will be transferred into Dhcp6Init.\r
360 - When Dhcp6CfgData is NULL and Configure() is called successfully, the\r
361 configuration data will be cleaned up and no IA will be associated with\r
362 the Dhcp6 instance.\r
363 To update the configuration data for an Dhcp6 instance, the original data\r
364 must be cleaned up before setting the new configuration data.\r
365\r
366 @param[in] This The pointer to the Dhcp6 protocol\r
367 @param[in] Dhcp6CfgData The pointer to the EFI_DHCP6_CONFIG_DATA.\r
368\r
369 @retval EFI_SUCCESS The Dhcp6 is configured successfully with the\r
370 Dhcp6Init state, or cleaned up the original\r
371 configuration setting.\r
372 @retval EFI_ACCESS_DENIED The Dhcp6 instance has been already configured\r
373 when Dhcp6CfgData is not NULL.\r
374 The Dhcp6 instance has already started the\r
375 DHCPv6 S.A.R.R when Dhcp6CfgData is NULL.\r
376 @retval EFI_INVALID_PARAMETER Some of the parameter is invalid.\r
377 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.\r
378 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.\r
379\r
380**/\r
381EFI_STATUS\r
382EFIAPI\r
383EfiDhcp6Configure (\r
384 IN EFI_DHCP6_PROTOCOL *This,\r
385 IN EFI_DHCP6_CONFIG_DATA *Dhcp6CfgData OPTIONAL\r
386 );\r
387\r
388/**\r
389 Request configuration information without the assignment of any\r
390 Ia addresses of the client.\r
391\r
392 The InfoRequest() function is used to request configuration information\r
393 without the assignment of any IPv6 address of the client. Client sends\r
394 out Information Request packet to obtain the required configuration\r
395 information, and DHCPv6 server responds with Reply packet containing\r
396 the information for the client. The received Reply packet will be passed\r
397 to the user by ReplyCallback function. If user returns EFI_NOT_READY from\r
398 ReplyCallback, the Dhcp6 instance will continue to receive other Reply\r
399 packets unless timeout according to the Retransmission parameter.\r
400 Otherwise, the Information Request exchange process will be finished\r
401 successfully if user returns EFI_SUCCESS from ReplyCallback.\r
402\r
403 @param[in] This The pointer to the Dhcp6 protocol.\r
404 @param[in] SendClientId If TRUE, the DHCPv6 protocol instance will build Client\r
405 Identifier option and include it into Information Request\r
406 packet. Otherwise, Client Identifier option will not be included.\r
407 @param[in] OptionRequest The pointer to the buffer of option request options.\r
408 @param[in] OptionCount The option number in the OptionList.\r
409 @param[in] OptionList The list of appended options.\r
410 @param[in] Retransmission The pointer to the retransmission of the message.\r
411 @param[in] TimeoutEvent The event of timeout.\r
412 @param[in] ReplyCallback The callback function when a reply was received.\r
413 @param[in] CallbackContext The pointer to the parameter passed to the callback.\r
414\r
415 @retval EFI_SUCCESS The DHCPv6 information request exchange process\r
416 completed when TimeoutEvent is NULL. Information\r
417 Request packet has been sent to DHCPv6 server when\r
418 TimeoutEvent is not NULL.\r
419 @retval EFI_NO_RESPONSE The DHCPv6 information request exchange process failed\r
420 because of no response, or not all requested-options\r
421 are responded to by DHCPv6 servers when Timeout happened.\r
422 @retval EFI_ABORTED The DHCPv6 information request exchange process was aborted\r
423 by the user.\r
424 @retval EFI_INVALID_PARAMETER Some parameter is NULL.\r
425 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.\r
426 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.\r
427\r
428**/\r
429EFI_STATUS\r
430EFIAPI\r
431EfiDhcp6InfoRequest (\r
432 IN EFI_DHCP6_PROTOCOL *This,\r
433 IN BOOLEAN SendClientId,\r
434 IN EFI_DHCP6_PACKET_OPTION *OptionRequest,\r
435 IN UINT32 OptionCount,\r
436 IN EFI_DHCP6_PACKET_OPTION *OptionList[] OPTIONAL,\r
437 IN EFI_DHCP6_RETRANSMISSION *Retransmission,\r
438 IN EFI_EVENT TimeoutEvent OPTIONAL,\r
439 IN EFI_DHCP6_INFO_CALLBACK ReplyCallback,\r
440 IN VOID *CallbackContext OPTIONAL\r
441 );\r
442\r
443/**\r
444 Manually extend the valid and preferred lifetimes for the IPv6 addresses\r
445 of the configured IA and update other configuration parameters by sending\r
446 Renew or Rebind packet.\r
447\r
448 The RenewRebind() function is used to manually extend the valid and preferred\r
449 lifetimes for the IPv6 addresses of the configured IA and update other\r
450 configuration parameters by sending a Renew or Rebind packet.\r
451 - When RebindRequest is FALSE and the state of the configured IA is Dhcp6Bound,\r
452 it will send Renew packet to the previously DHCPv6 server and transfer the\r
453 state of the configured IA to Dhcp6Renewing. If valid Reply packet received,\r
454 the state transfers to Dhcp6Bound and the valid and preferred timer restarts.\r
455 If fails, the state transfers to Dhcp6Bound but the timer continues.\r
456 - When RebindRequest is TRUE and the state of the configured IA is Dhcp6Bound,\r
457 it will send a Rebind packet. If a valid Reply packet is received, the state transfers\r
458 to Dhcp6Bound, and the valid and preferred timer restarts. If it fails, the state\r
459 transfers to Dhcp6Init, and the IA can't be used.\r
460\r
461 @param[in] This The pointer to the Dhcp6 protocol.\r
462 @param[in] RebindRequest If TRUE, Rebind packet will be sent and enter Dhcp6Rebinding state.\r
463 Otherwise, Renew packet will be sent and enter Dhcp6Renewing state.\r
464\r
465 @retval EFI_SUCCESS The DHCPv6 renew/rebind exchange process\r
466 completed and at least one IPv6 address of the\r
467 configured IA was bound again when\r
468 EFI_DHCP6_CONFIG_DATA.IaInfoEvent was NULL.\r
469 The EFI DHCPv6 Protocol instance has sent Renew\r
470 or Rebind packet when\r
471 EFI_DHCP6_CONFIG_DATA.IaInfoEvent is not NULL.\r
472 @retval EFI_ACCESS_DENIED The Dhcp6 instance hasn't been configured, or the\r
473 state of the configured IA is not in Dhcp6Bound.\r
474 @retval EFI_ALREADY_STARTED The state of the configured IA has already entered\r
475 Dhcp6Renewing when RebindRequest is FALSE.\r
476 The state of the configured IA has already entered\r
477 Dhcp6Rebinding when RebindRequest is TRUE.\r
478 @retval EFI_ABORTED The DHCPv6 renew/rebind exchange process aborted\r
479 by user.\r
480 @retval EFI_NO_RESPONSE The DHCPv6 renew/rebind exchange process failed\r
481 because of no response.\r
482 @retval EFI_NO_MAPPING No IPv6 address has been bound to the configured\r
483 IA after the DHCPv6 renew/rebind exchange process.\r
484 @retval EFI_INVALID_PARAMETER Some parameter is NULL.\r
485 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.\r
486\r
487**/\r
488EFI_STATUS\r
489EFIAPI\r
490EfiDhcp6RenewRebind (\r
491 IN EFI_DHCP6_PROTOCOL *This,\r
492 IN BOOLEAN RebindRequest\r
493 );\r
494\r
495/**\r
496 Inform that one or more addresses assigned by a server are already\r
497 in use by another node.\r
498\r
499 The Decline() function is used to manually decline the assignment of\r
500 IPv6 addresses, which have been already used by another node. If all\r
501 IPv6 addresses of the configured IA are declined through this function,\r
502 the state of the IA will switch through Dhcp6Declining to Dhcp6Init.\r
503 Otherwise, the state of the IA will restore to Dhcp6Bound after the\r
504 declining process. The Decline() can only be called when the IA is in\r
505 Dhcp6Bound state. If the EFI_DHCP6_CONFIG_DATA.IaInfoEvent is NULL,\r
506 this function is a blocking operation. It will return after the\r
507 declining process finishes, or aborted by user.\r
508\r
509 @param[in] This The pointer to the Dhcp6 protocol.\r
510 @param[in] AddressCount The number of declining addresses.\r
511 @param[in] Addresses The pointer to the buffer stored the declining\r
512 addresses.\r
513\r
514 @retval EFI_SUCCESS The DHCPv6 decline exchange process completed\r
515 when EFI_DHCP6_CONFIG_DATA.IaInfoEvent was NULL.\r
516 The Dhcp6 instance has sent Decline packet when\r
517 EFI_DHCP6_CONFIG_DATA.IaInfoEvent is not NULL.\r
518 @retval EFI_ACCESS_DENIED The Dhcp6 instance hasn't been configured, or the\r
519 state of the configured IA is not in Dhcp6Bound.\r
520 @retval EFI_ABORTED The DHCPv6 decline exchange process was aborted by the user.\r
521 @retval EFI_NOT_FOUND Any specified IPv6 address is not correlated with\r
522 the configured IA for this instance.\r
523 @retval EFI_INVALID_PARAMETER Some parameter is NULL.\r
524 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.\r
525\r
526**/\r
527EFI_STATUS\r
528EFIAPI\r
529EfiDhcp6Decline (\r
530 IN EFI_DHCP6_PROTOCOL *This,\r
531 IN UINT32 AddressCount,\r
532 IN EFI_IPv6_ADDRESS *Addresses\r
533 );\r
534\r
535/**\r
536 Release one or more addresses associated with the configured Ia\r
537 for the current instance.\r
538\r
539 The Release() function is used to manually release the one or more\r
540 IPv6 address. If AddressCount is zero, it will release all IPv6\r
541 addresses of the configured IA. If all IPv6 addresses of the IA are\r
542 released through this function, the state of the IA will switch\r
543 through Dhcp6Releasing to Dhcp6Init, otherwise, the state of the\r
544 IA will restore to Dhcp6Bound after the releasing process.\r
545 The Release() can only be called when the IA is in a Dhcp6Bound state.\r
546 If the EFI_DHCP6_CONFIG_DATA.IaInfoEvent is NULL, the function is\r
547 a blocking operation. It will return after the releasing process\r
548 finishes, or aborted by user.\r
549\r
550 @param[in] This The pointer to the Dhcp6 protocol.\r
551 @param[in] AddressCount The number of releasing addresses.\r
552 @param[in] Addresses The pointer to the buffer stored the releasing\r
553 addresses.\r
554 @retval EFI_SUCCESS The DHCPv6 release exchange process has\r
555 completed when EFI_DHCP6_CONFIG_DATA.IaInfoEvent\r
556 is NULL. The Dhcp6 instance has sent Release\r
557 packet when EFI_DHCP6_CONFIG_DATA.IaInfoEvent\r
558 is not NULL.\r
559 @retval EFI_ACCESS_DENIED The Dhcp6 instance hasn't been configured, or the\r
560 state of the configured IA is not in Dhcp6Bound.\r
561 @retval EFI_ABORTED The DHCPv6 release exchange process was aborted by the user.\r
562 @retval EFI_NOT_FOUND Any specified IPv6 address is not correlated with\r
563 the configured IA for this instance.\r
564 @retval EFI_INVALID_PARAMETER Some parameter is NULL.\r
565 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.\r
566\r
567**/\r
568EFI_STATUS\r
569EFIAPI\r
570EfiDhcp6Release (\r
571 IN EFI_DHCP6_PROTOCOL *This,\r
572 IN UINT32 AddressCount,\r
573 IN EFI_IPv6_ADDRESS *Addresses\r
574 );\r
575\r
576/**\r
577 Parse the option data in the Dhcp6 packet.\r
578\r
579 The Parse() function is used to retrieve the option list in the DHCPv6 packet.\r
580\r
581 @param[in] This The pointer to the Dhcp6 protocol.\r
582 @param[in] Packet The pointer to the Dhcp6 packet.\r
583 @param[in, out] OptionCount The number of option in the packet.\r
584 @param[out] PacketOptionList The array of pointers to the each option in the packet.\r
585\r
586 @retval EFI_SUCCESS The packet was successfully parsed.\r
587 @retval EFI_INVALID_PARAMETER Some parameter is NULL.\r
588 @retval EFI_BUFFER_TOO_SMALL *OptionCount is smaller than the number of options\r
589 that were found in the Packet.\r
590\r
591**/\r
592EFI_STATUS\r
593EFIAPI\r
594EfiDhcp6Parse (\r
595 IN EFI_DHCP6_PROTOCOL *This,\r
596 IN EFI_DHCP6_PACKET *Packet,\r
597 IN OUT UINT32 *OptionCount,\r
598 OUT EFI_DHCP6_PACKET_OPTION *PacketOptionList[] OPTIONAL\r
599 );\r
600\r
601#endif\r