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