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