iPXE
Dhcp6.h
Go to the documentation of this file.
1/** @file
2 UEFI Dynamic Host Configuration Protocol 6 Definition, which is used to get IPv6
3 addresses and other configuration parameters from DHCPv6 servers.
4
5 Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8 @par Revision Reference:
9 This Protocol is introduced in UEFI Specification 2.2
10
11**/
12
13#ifndef __EFI_DHCP6_PROTOCOL_H__
14#define __EFI_DHCP6_PROTOCOL_H__
15
16FILE_LICENCE ( BSD2_PATENT );
17FILE_SECBOOT ( PERMITTED );
18
19#define EFI_DHCP6_PROTOCOL_GUID \
20 { \
21 0x87c8bad7, 0x595, 0x4053, {0x82, 0x97, 0xde, 0xde, 0x39, 0x5f, 0x5d, 0x5b } \
22 }
23
24#define EFI_DHCP6_SERVICE_BINDING_PROTOCOL_GUID \
25 { \
26 0x9fb9a8a1, 0x2f4a, 0x43a6, {0x88, 0x9c, 0xd0, 0xf7, 0xb6, 0xc4, 0x7a, 0xd5 } \
27 }
28
30
31typedef enum {
32 ///
33 /// The EFI DHCPv6 Protocol instance is configured, and start() needs
34 /// to be called
35 ///
36 Dhcp6Init = 0x0,
37 ///
38 /// A Solicit packet is sent out to discover DHCPv6 server, and the EFI
39 /// DHCPv6 Protocol instance is collecting Advertise packets.
40 ///
42 ///
43 /// A Request is sent out to the DHCPv6 server, and the EFI DHCPv6
44 /// Protocol instance is waiting for Reply packet.
45 ///
47 ///
48 /// A Decline packet is sent out to indicate one or more addresses of the
49 /// configured IA are in use by another node, and the EFI DHCPv6.
50 /// Protocol instance is waiting for Reply packet.
51 ///
53 ///
54 /// A Confirm packet is sent out to confirm the IPv6 addresses of the
55 /// configured IA, and the EFI DHCPv6 Protocol instance is waiting for Reply packet.
56 ///
58 ///
59 /// A Release packet is sent out to release one or more IPv6 addresses of
60 /// the configured IA, and the EFI DHCPv6 Protocol instance is waiting for Reply packet.
61 ///
63 ///
64 /// The DHCPv6 S.A.R.R process is completed for the configured IA.
65 ///
67 ///
68 /// A Renew packet is sent out to extend lifetime for the IPv6 addresses of
69 /// the configured IA, and the EFI DHCPv6 Protocol instance is waiting for Reply packet.
70 ///
72 ///
73 /// A Rebind packet is sent out to extend lifetime for the IPv6 addresses of
74 /// the configured IA, and the EFI DHCPv6 Protocol instance is waiting for Reply packet.
75 ///
78
79typedef enum {
80 ///
81 /// A Solicit packet is about to be sent. The packet is passed to Dhcp6Callback and
82 /// can be modified or replaced in Dhcp6Callback.
83 ///
85 ///
86 /// An Advertise packet is received and will be passed to Dhcp6Callback.
87 ///
89 ///
90 /// It is time for Dhcp6Callback to determine whether select the default Advertise
91 /// packet by RFC 3315 policy, or overwrite it by specific user policy.
92 ///
94 ///
95 /// A Request packet is about to be sent. The packet is passed to Dhcp6Callback and
96 /// can be modified or replaced in Dhcp6Callback.
97 ///
99 ///
100 /// A Reply packet is received and will be passed to Dhcp6Callback.
101 ///
103 ///
104 /// A Reconfigure packet is received and will be passed to Dhcp6Callback.
105 ///
107 ///
108 /// A Decline packet is about to be sent. The packet is passed to Dhcp6Callback and
109 /// can be modified or replaced in Dhcp6Callback.
110 ///
112 ///
113 /// A Confirm packet is about to be sent. The packet is passed to Dhcp6Callback and
114 /// can be modified or replaced in Dhcp6Callback.
115 ///
117 ///
118 /// A Release packet is about to be sent. The packet is passed to Dhcp6Callback and
119 /// can be modified or replaced in Dhcp6Callback.
120 ///
122 ///
123 /// A Renew packet is about to be sent. The packet is passed to Dhcp6Callback and
124 /// can be modified or replaced in Dhcp6Callback.
125 ///
127 ///
128 /// A Rebind packet is about to be sent. The packet is passed to Dhcp6Callback and
129 /// can be modified or replaced in Dhcp6Callback.
130 ///
133
134///
135/// An IA which carries assigned not temporary address.
136///
137#define EFI_DHCP6_IA_TYPE_NA 3
138///
139/// An IA which carries assigned temporary address.
140///
141#define EFI_DHCP6_IA_TYPE_TA 4
142
143#pragma pack(1)
144///
145/// EFI_DHCP6_PACKET_OPTION
146/// defines the format of the DHCPv6 option, See RFC 3315 for more information.
147/// This data structure is used to reference option data that is packed in the DHCPv6 packet.
148///
149typedef struct {
150 ///
151 /// The DHCPv6 option code, stored in network order.
152 ///
154 ///
155 /// Length of the DHCPv6 option data, stored in network order.
156 /// From the first byte to the last byte of the Data field.
157 ///
159 ///
160 /// The data for the DHCPv6 option, stored in network order.
161 ///
164
165///
166/// EFI_DHCP6_HEADER
167/// defines the format of the DHCPv6 header. See RFC 3315 for more information.
168///
169typedef struct {
170 ///
171 /// The DHCPv6 transaction ID.
172 ///
174 ///
175 /// The DHCPv6 message type.
176 ///
179
180///
181/// EFI_DHCP6_PACKET
182/// defines the format of the DHCPv6 packet. See RFC 3315 for more information.
183///
184typedef struct {
185 ///
186 /// Size of the EFI_DHCP6_PACKET buffer.
187 ///
189 ///
190 /// Length of the EFI_DHCP6_PACKET from the first byte of the Header field to the last
191 /// byte of the Option[] field.
192 ///
194 struct {
195 ///
196 /// The DHCPv6 packet header.
197 ///
199 ///
200 /// Start of the DHCPv6 packed option data.
201 ///
203 } Dhcp6;
205
206#pragma pack()
207
208typedef struct {
209 ///
210 /// Length of DUID in octects.
211 ///
213 ///
214 /// Array of DUID octects.
215 ///
218
219typedef struct {
220 ///
221 /// Initial retransmission timeout.
222 ///
224 ///
225 /// Maximum retransmission count for one packet. If Mrc is zero, there's no upper limit
226 /// for retransmission count.
227 ///
229 ///
230 /// Maximum retransmission timeout for each retry. It's the upper bound of the number of
231 /// retransmission timeout. If Mrt is zero, there is no upper limit for retransmission
232 /// timeout.
233 ///
235 ///
236 /// Maximum retransmission duration for one packet. It's the upper bound of the numbers
237 /// the client may retransmit a message. If Mrd is zero, there's no upper limit for
238 /// retransmission duration.
239 ///
242
243typedef struct {
244 ///
245 /// The IPv6 address.
246 ///
248 ///
249 /// The preferred lifetime in unit of seconds for the IPv6 address.
250 ///
252 ///
253 /// The valid lifetime in unit of seconds for the IPv6 address.
254 ///
257
258typedef struct {
259 UINT16 Type; ///< Type for an IA.
260 UINT32 IaId; ///< The identifier for an IA.
262
263typedef struct {
264 ///
265 /// The descriptor for IA.
266 ///
268 ///
269 /// The state of the configured IA.
270 ///
272 ///
273 /// Pointer to the cached latest Reply packet. May be NULL if no packet is cached.
274 ///
276 ///
277 /// Number of IPv6 addresses of the configured IA.
278 ///
280 ///
281 /// List of the IPv6 addresses of the configured IA. When the state of the configured IA is
282 /// in Dhcp6Bound, Dhcp6Renewing and Dhcp6Rebinding, the IPv6 addresses are usable.
283 ///
286
287typedef struct {
288 ///
289 /// Pointer to the DHCPv6 unique identifier. The caller is responsible for freeing this buffer.
290 ///
292 ///
293 /// Pointer to the configured IA of current instance. The caller can free this buffer after
294 /// using it.
295 ///
298
299/**
300 EFI_DHCP6_CALLBACK is provided by the consumer of the EFI DHCPv6 Protocol instance to
301 intercept events that occurs in the DHCPv6 S.A.R.R process.
302
303 @param[in] This Pointer to the EFI_DHCP6_PROTOCOL instance that is used to configure this
304 callback function.
305 @param[in] Context Pointer to the context that is initialized by EFI_DHCP6_PROTOCOL.Configure().
306 @param[in] CurrentState The current state of the configured IA.
307 @param[in] Dhcp6Event The event that occurs in the current state, which usually means a state transition.
308 @param[in] Packet Pointer to the DHCPv6 packet that is about to be sent or has been received.
309 The EFI DHCPv6 Protocol instance is responsible for freeing the buffer.
310 @param[out] NewPacket Pointer to the new DHCPv6 packet to overwrite the Packet. NewPacket can not
311 share the buffer with Packet. If *NewPacket is not NULL, the EFI DHCPv6
312 Protocol instance is responsible for freeing the buffer.
313
314 @retval EFI_SUCCESS Tell the EFI DHCPv6 Protocol instance to continue the DHCPv6 S.A.R.R process.
315 @retval EFI_ABORTED Tell the EFI DHCPv6 Protocol instance to abort the DHCPv6 S.A.R.R process,
316 and the state of the configured IA will be transferred to Dhcp6Init.
317
318**/
319typedef
323 IN VOID *Context,
324 IN EFI_DHCP6_STATE CurrentState,
325 IN EFI_DHCP6_EVENT Dhcp6Event,
326 IN EFI_DHCP6_PACKET *Packet,
327 OUT EFI_DHCP6_PACKET **NewPacket OPTIONAL
328 );
329
330typedef struct {
331 ///
332 /// The callback function is to intercept various events that occur in the DHCPv6 S.A.R.R
333 /// process. Set to NULL to ignore all those events.
334 ///
336 ///
337 /// Pointer to the context that will be passed to Dhcp6Callback.
338 ///
340 ///
341 /// Number of the DHCPv6 options in the OptionList.
342 ///
344 ///
345 /// List of the DHCPv6 options to be included in Solicit and Request packet. The buffer
346 /// can be freed after EFI_DHCP6_PROTOCOL.Configure() returns. Ignored if
347 /// OptionCount is zero. OptionList should not contain Client Identifier option
348 /// and any IA option, which will be appended by EFI DHCPv6 Protocol instance
349 /// automatically.
350 ///
352 ///
353 /// The descriptor for the IA of the EFI DHCPv6 Protocol instance.
354 ///
356 ///
357 /// If not NULL, the event will be signaled when any IPv6 address information of the
358 /// configured IA is updated, including IPv6 address, preferred lifetime and valid
359 /// lifetime, or the DHCPv6 S.A.R.R process fails. Otherwise, Start(),
360 /// renewrebind(), decline(), release() and stop() will be blocking
361 /// operations, and they will wait for the exchange process completion or failure.
362 ///
364 ///
365 /// If TRUE, the EFI DHCPv6 Protocol instance is willing to accept Reconfigure packet.
366 /// Otherwise, it will ignore it. Reconfigure Accept option can not be specified through
367 /// OptionList parameter.
368 ///
370 ///
371 /// If TRUE, the EFI DHCPv6 Protocol instance will send Solicit packet with Rapid
372 /// Commit option. Otherwise, Rapid Commit option will not be included in Solicit
373 /// packet. Rapid Commit option can not be specified through OptionList parameter.
374 ///
376 ///
377 /// Parameter to control Solicit packet retransmission behavior. The
378 /// buffer can be freed after EFI_DHCP6_PROTOCOL.Configure() returns.
379 ///
382
383/**
384 EFI_DHCP6_INFO_CALLBACK is provided by the consumer of the EFI DHCPv6 Protocol
385 instance to intercept events that occurs in the DHCPv6 Information Request exchange process.
386
387 @param[in] This Pointer to the EFI_DHCP6_PROTOCOL instance that is used to configure this
388 callback function.
389 @param[in] Context Pointer to the context that is initialized in the EFI_DHCP6_PROTOCOL.InfoRequest().
390 @param[in] Packet Pointer to Reply packet that has been received. The EFI DHCPv6 Protocol instance is
391 responsible for freeing the buffer.
392
393 @retval EFI_SUCCESS Tell the EFI DHCPv6 Protocol instance to finish Information Request exchange process.
394 @retval EFI_NOT_READY Tell the EFI DHCPv6 Protocol instance to continue Information Request exchange process.
395 @retval EFI_ABORTED Tell the EFI DHCPv6 Protocol instance to abort the Information Request exchange process.
396
397**/
398typedef
402 IN VOID *Context,
403 IN EFI_DHCP6_PACKET *Packet
404 );
405
406/**
407 Retrieve the current operating mode data and configuration data for the EFI DHCPv6 Protocol instance.
408
409 @param[in] This Pointer to the EFI_DHCP6_PROTOCOL instance.
410 @param[out] Dhcp6ModeData Pointer to the DHCPv6 mode data structure. The caller is responsible for freeing this
411 structure and each reference buffer.
412 @param[out] Dhcp6ConfigData Pointer to the DHCPv6 configuration data structure. The caller is responsible for
413 freeing this structure and each reference buffer.
414
415 @retval EFI_SUCCESS The mode data was returned.
416 @retval EFI_ACCESS_DENIED The EFI DHCPv6 Protocol instance has not been configured when Dhcp6ConfigData is not NULL.
417 @retval EFI_INVALID_PARAMETER One or more following conditions are TRUE:
418 - This is NULL.
419 - Both Dhcp6ConfigData and Dhcp6ModeData are NULL.
420
421**/
422typedef
426 OUT EFI_DHCP6_MODE_DATA *Dhcp6ModeData OPTIONAL,
427 OUT EFI_DHCP6_CONFIG_DATA *Dhcp6ConfigData OPTIONAL
428 );
429
430/**
431 Initialize or clean up the configuration data for the EFI DHCPv6 Protocol instance.
432
433 The Configure() function is used to initialize or clean up the configuration data of the EFI
434 DHCPv6 Protocol instance.
435 - When Dhcp6CfgData is not NULL and Configure() is called successfully, the
436 configuration data will be initialized in the EFI DHCPv6 Protocol instance and the state of the
437 configured IA will be transferred into Dhcp6Init.
438 - When Dhcp6CfgData is NULL and Configure() is called successfully, the configuration
439 data will be cleaned up and no IA will be associated with the EFI DHCPv6 Protocol instance.
440
441 To update the configuration data for an EFI DCHPv6 Protocol instance, the original data must be
442 cleaned up before setting the new configuration data.
443
444 @param[in] This Pointer to the EFI_DHCP6_PROTOCOL instance.
445 @param[in] Dhcp6CfgData Pointer to the DHCPv6 configuration data structure.
446
447 @retval EFI_SUCCESS The mode data was returned.
448 @retval EFI_INVALID_PARAMETER One or more following conditions are TRUE
449 - This is NULL.
450 - OptionCount > 0 and OptionList is NULL.
451 - OptionList is not NULL, and Client Id option, Reconfigure Accept option,
452 Rapid Commit option or any IA option is specified in the OptionList.
453 - IaDescriptor.Type is neither EFI_DHCP6_IA_TYPE_NA nor EFI_DHCP6_IA_TYPE_NA.
454 - IaDescriptor is not unique.
455 - Both IaInfoEvent and SolicitRetransimssion are NULL.
456 - SolicitRetransmission is not NULL, and both SolicitRetransimssion->Mrc and
457 SolicitRetransmission->Mrd are zero.
458 @retval EFI_ACCESS_DENIED The EFI DHCPv6 Protocol instance has been already configured
459 when Dhcp6CfgData is not NULL.
460 The EFI DHCPv6 Protocol instance has already started the
461 DHCPv6 S.A.R.R when Dhcp6CfgData is NULL.
462 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
463 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
464
465**/
466typedef
470 IN EFI_DHCP6_CONFIG_DATA *Dhcp6CfgData OPTIONAL
471 );
472
473/**
474 Start the DHCPv6 S.A.R.R process.
475
476 The Start() function starts the DHCPv6 S.A.R.R process. This function can be called only when
477 the state of the configured IA is in the Dhcp6Init state. If the DHCPv6 S.A.R.R process completes
478 successfully, the state of the configured IA will be transferred through Dhcp6Selecting and
479 Dhcp6Requesting to Dhcp6Bound state. The update of the IPv6 addresses will be notified through
480 EFI_DHCP6_CONFIG_DATA.IaInfoEvent. At the time when each event occurs in this process, the
481 callback function set by EFI_DHCP6_PROTOCOL.Configure() will be called and the user can take
482 this opportunity to control the process. If EFI_DHCP6_CONFIG_DATA.IaInfoEvent is NULL, the
483 Start() function call is a blocking operation. It will return after the DHCPv6 S.A.R.R process
484 completes or aborted by users. If the process is aborted by system or network error, the state of
485 the configured IA will be transferred to Dhcp6Init. The Start() function can be called again to
486 restart the process.
487
488 @param[in] This Pointer to the EFI_DHCP6_PROTOCOL instance.
489
490 @retval EFI_SUCCESS The DHCPv6 S.A.R.R process is completed and at least one IPv6
491 address has been bound to the configured IA when
492 EFI_DHCP6_CONFIG_DATA.IaInfoEvent is NULL.
493 The DHCPv6 S.A.R.R process is started when
494 EFI_DHCP6_CONFIG_DATA.IaInfoEvent is not NULL.
495 @retval EFI_ACCESS_DENIED The EFI DHCPv6 Child instance hasn't been configured.
496 @retval EFI_INVALID_PARAMETER This is NULL.
497 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
498 @retval EFI_ALREADY_STARTED The DHCPv6 S.A.R.R process has already started.
499 @retval EFI_DEVICE_ERROR An unexpected network or system error occurred.
500 @retval EFI_NO_RESPONSE The DHCPv6 S.A.R.R process failed because of no response.
501 @retval EFI_NO_MAPPING No IPv6 address has been bound to the configured IA after the
502 DHCPv6 S.A.R.R process.
503 @retval EFI_ABORTED The DHCPv6 S.A.R.R process aborted by user.
504 @retval EFI_NO_MEDIA There was a media error.
505
506**/
507typedef
511 );
512
513/**
514 Request configuration information without the assignment of any IA addresses of the client.
515
516 The InfoRequest() function is used to request configuration information without the assignment
517 of any IPv6 address of the client. Client sends out Information Request packet to obtain
518 the required configuration information, and DHCPv6 server responds with Reply packet containing
519 the information for the client. The received Reply packet will be passed to the user by
520 ReplyCallback function. If user returns EFI_NOT_READY from ReplyCallback, the EFI DHCPv6
521 Protocol instance will continue to receive other Reply packets unless timeout according to
522 the Retransmission parameter. Otherwise, the Information Request exchange process will be
523 finished successfully if user returns EFI_SUCCESS from ReplyCallback.
524
525 @param[in] This Pointer to the EFI_DHCP6_PROTOCOL instance.
526 @param[in] SendClientId If TRUE, the EFI DHCPv6 Protocol instance will build Client
527 Identifier option and include it into Information Request
528 packet. If FALSE, Client Identifier option will not be included.
529 Client Identifier option can not be specified through OptionList
530 parameter.
531 @param[in] OptionRequest Pointer to the Option Request option in the Information Request
532 packet. Option Request option can not be specified through
533 OptionList parameter.
534 @param[in] OptionCount Number of options in OptionList.
535 @param[in] OptionList List of other DHCPv6 options. These options will be appended
536 to the Option Request option. The caller is responsible for
537 freeing this buffer. Type is defined in EFI_DHCP6_PROTOCOL.GetModeData().
538 @param[in] Retransmission Parameter to control Information Request packet retransmission
539 behavior. The buffer can be freed after EFI_DHCP6_PROTOCOL.InfoRequest()
540 returns.
541 @param[in] TimeoutEvent If not NULL, this event is signaled when the information request
542 exchange aborted because of no response. If NULL, the function
543 call is a blocking operation; and it will return after the
544 information-request exchange process finish or aborted by users.
545 @param[in] ReplyCallback The callback function is to intercept various events that occur
546 in the Information Request exchange process. It should not be
547 set to NULL.
548 @param[in] CallbackContext Pointer to the context that will be passed to ReplyCallback.
549
550 @retval EFI_SUCCESS The DHCPv6 S.A.R.R process is completed and at least one IPv6
551 @retval EFI_SUCCESS The DHCPv6 information request exchange process completed
552 when TimeoutEvent is NULL. Information Request packet has been
553 sent to DHCPv6 server when TimeoutEvent is not NULL.
554 @retval EFI_INVALID_PARAMETER One or more following conditions are TRUE:
555 - This is NULL.
556 - OptionRequest is NULL or OptionRequest->OpCode is invalid.
557 - OptionCount > 0 and OptionList is NULL.
558 - OptionList is not NULL, and Client Identify option or
559 Option Request option is specified in the OptionList.
560 - Retransimssion is NULL.
561 - Both Retransimssion->Mrc and Retransmission->Mrd are zero.
562 - ReplyCallback is NULL.
563 @retval EFI_DEVICE_ERROR An unexpected network or system error occurred.
564 @retval EFI_NO_RESPONSE The DHCPv6 information request exchange process failed
565 because of no response, or not all requested-options are
566 responded by DHCPv6 servers when Timeout happened.
567 @retval EFI_ABORTED The DHCPv6 information request exchange process aborted by user.
568
569**/
570typedef
574 IN BOOLEAN SendClientId,
575 IN EFI_DHCP6_PACKET_OPTION *OptionRequest,
576 IN UINT32 OptionCount,
577 IN EFI_DHCP6_PACKET_OPTION *OptionList[] OPTIONAL,
578 IN EFI_DHCP6_RETRANSMISSION *Retransmission,
579 IN EFI_EVENT TimeoutEvent OPTIONAL,
580 IN EFI_DHCP6_INFO_CALLBACK ReplyCallback,
581 IN VOID *CallbackContext OPTIONAL
582 );
583
584/**
585 Manually extend the valid and preferred lifetimes for the IPv6 addresses of the configured
586 IA and update other configuration parameters by sending Renew or Rebind packet.
587
588 The RenewRebind() function is used to manually extend the valid and preferred lifetimes for the
589 IPv6 addresses of the configured IA and update other configuration parameters by sending Renew or
590 Rebind packet.
591 - When RebindRequest is FALSE and the state of the configured IA is Dhcp6Bound, it
592 will send Renew packet to the previously DHCPv6 server and transfer the state of the configured
593 IA to Dhcp6Renewing. If valid Reply packet received, the state transfers to Dhcp6Bound
594 and the valid and preferred timer restarts. If fails, the state transfers to Dhcp6Bound but the
595 timer continues.
596 - When RebindRequest is TRUE and the state of the configured IA is Dhcp6Bound, it will
597 send Rebind packet. If valid Reply packet received, the state transfers to Dhcp6Bound and the
598 valid and preferred timer restarts. If fails, the state transfers to Dhcp6Init and the IA can't
599 be used.
600
601 @param[in] This Pointer to the EFI_DHCP4_PROTOCOL instance.
602 @param[in] RebindRequest If TRUE, it will send Rebind packet and enter the Dhcp6Rebinding state.
603 Otherwise, it will send Renew packet and enter the Dhcp6Renewing state.
604
605 @retval EFI_SUCCESS The DHCPv6 renew/rebind exchange process has completed and at
606 least one IPv6 address of the configured IA has been bound again
607 when EFI_DHCP6_CONFIG_DATA.IaInfoEvent is NULL.
608 The EFI DHCPv6 Protocol instance has sent Renew or Rebind packet
609 when EFI_DHCP6_CONFIG_DATA.IaInfoEvent is not NULL.
610 @retval EFI_ACCESS_DENIED The EFI DHCPv6 Child instance hasn't been configured, or the state
611 of the configured IA is not in Dhcp6Bound.
612 @retval EFI_ALREADY_STARTED The state of the configured IA has already entered Dhcp6Renewing
613 when RebindRequest is FALSE.
614 The state of the configured IA has already entered Dhcp6Rebinding
615 when RebindRequest is TRUE.
616 @retval EFI_INVALID_PARAMETER This is NULL.
617 @retval EFI_DEVICE_ERROR An unexpected system or system error occurred.
618 @retval EFI_NO_RESPONSE The DHCPv6 renew/rebind exchange process failed because of no response.
619 @retval EFI_NO_MAPPING No IPv6 address has been bound to the configured IA after the DHCPv6
620 renew/rebind exchange process.
621 @retval EFI_ABORTED The DHCPv6 renew/rebind exchange process aborted by user.
622
623**/
624typedef
628 IN BOOLEAN RebindRequest
629 );
630
631/**
632 Inform that one or more IPv6 addresses assigned by a server are already in use by
633 another node.
634
635 The Decline() function is used to manually decline the assignment of IPv6 addresses, which
636 have been already used by another node. If all IPv6 addresses of the configured IA are declined
637 through this function, the state of the IA will switch through Dhcp6Declining to Dhcp6Init,
638 otherwise, the state of the IA will restore to Dhcp6Bound after the declining process. The
639 Decline() can only be called when the IA is in Dhcp6Bound state. If the
640 EFI_DHCP6_CONFIG_DATA.IaInfoEvent is NULL, this function is a blocking operation. It
641 will return after the declining process finishes, or aborted by user.
642
643 @param[in] This Pointer to the EFI_DHCP4_PROTOCOL instance.
644 @param[in] AddressCount Number of declining IPv6 addresses.
645 @param[in] Addresses Pointer to the buffer stored all the declining IPv6 addresses.
646
647 @retval EFI_SUCCESS The DHCPv6 decline exchange process has completed when
648 EFI_DHCP6_CONFIG_DATA.IaInfoEvent is NULL.
649 The EFI DHCPv6 Protocol instance has sent Decline packet when
650 EFI_DHCP6_CONFIG_DATA.IaInfoEvent is not NULL.
651 @retval EFI_INVALID_PARAMETER One or more following conditions are TRUE
652 - This is NULL.
653 - AddressCount is zero or Addresses is NULL.
654 @retval EFI_NOT_FOUND Any specified IPv6 address is not correlated with the configured IA
655 for this instance.
656 @retval EFI_ACCESS_DENIED The EFI DHCPv6 Child instance hasn't been configured, or the
657 state of the configured IA is not in Dhcp6Bound.
658 @retval EFI_DEVICE_ERROR An unexpected network or system error occurred.
659 @retval EFI_ABORTED The DHCPv6 decline exchange process aborted by user.
660
661**/
662typedef
666 IN UINT32 AddressCount,
667 IN EFI_IPv6_ADDRESS *Addresses
668 );
669
670/**
671 Release one or more IPv6 addresses associated with the configured IA for current instance.
672
673 The Release() function is used to manually release the one or more IPv6 address. If AddressCount
674 is zero, it will release all IPv6 addresses of the configured IA. If all IPv6 addresses of the IA
675 are released through this function, the state of the IA will switch through Dhcp6Releasing to
676 Dhcp6Init, otherwise, the state of the IA will restore to Dhcp6Bound after the releasing process.
677 The Release() can only be called when the IA is in Dhcp6Bound state. If the
678 EFI_DHCP6_CONFIG_DATA.IaInfoEvent is NULL, the function is a blocking operation. It will return
679 after the releasing process finishes, or aborted by user.
680
681 @param[in] This Pointer to the EFI_DHCP6_PROTOCOL instance.
682 @param[in] AddressCount Number of releasing IPv6 addresses.
683 @param[in] Addresses Pointer to the buffer stored all the releasing IPv6 addresses.
684 Ignored if AddressCount is zero.
685 @retval EFI_SUCCESS The DHCPv6 release exchange process has completed when
686 EFI_DHCP6_CONFIG_DATA.IaInfoEvent is NULL.
687 The EFI DHCPv6 Protocol instance has sent Release packet when
688 EFI_DHCP6_CONFIG_DATA.IaInfoEvent is not NULL.
689 @retval EFI_INVALID_PARAMETER One or more following conditions are TRUE
690 - This is NULL.
691 - AddressCount is not zero or Addresses is NULL.
692 @retval EFI_NOT_FOUND Any specified IPv6 address is not correlated with the configured
693 IA for this instance.
694 @retval EFI_ACCESS_DENIED The EFI DHCPv6 Child instance hasn't been configured, or the
695 state of the configured IA is not in Dhcp6Bound.
696 @retval EFI_DEVICE_ERROR An unexpected network or system error occurred.
697 @retval EFI_ABORTED The DHCPv6 release exchange process aborted by user.
698
699**/
700typedef
704 IN UINT32 AddressCount,
705 IN EFI_IPv6_ADDRESS *Addresses
706 );
707
708/**
709 Stop the DHCPv6 S.A.R.R process.
710
711 The Stop() function is used to stop the DHCPv6 S.A.R.R process. If this function is called
712 successfully, all the IPv6 addresses of the configured IA will be released and the state of
713 the configured IA will be transferred to Dhcp6Init.
714
715 @param[in] This Pointer to the EFI_DHCP6_PROTOCOL instance.
716
717 @retval EFI_SUCCESS The DHCPv6 S.A.R.R process has been stopped when
718 EFI_DHCP6_CONFIG_DATA.IaInfoEvent is NULL.
719 The EFI DHCPv6 Protocol instance has sent Release packet if
720 need release or has been stopped if needn't, when
721 EFI_DHCP6_CONFIG_DATA.IaInfoEvent is not NULL.
722 @retval EFI_INVALID_PARAMETER This is NULL.
723
724**/
725typedef
729 );
730
731/**
732 Parse the option data in the DHCPv6 packet.
733
734 The Parse() function is used to retrieve the option list in the DHCPv6 packet.
735
736 @param[in] This Pointer to the EFI_DHCP6_PROTOCOL instance.
737
738 @param[in] Packet Pointer to packet to be parsed.
739 @param[in] OptionCount On input, the number of entries in the PacketOptionList.
740 On output, the number of DHCPv6 options in the Packet.
741 @param[in] PacketOptionList List of pointers to the DHCPv6 options in the Packet.
742 The OpCode and OpLen in EFI_DHCP6_PACKET_OPTION are
743 both stored in network byte order.
744 @retval EFI_SUCCESS The packet was successfully parsed.
745 @retval EFI_INVALID_PARAMETER One or more following conditions are TRUE
746 - This is NULL.
747 - Packet is NULL.
748 - Packet is not a well-formed DHCPv6 packet.
749 - OptionCount is NULL.
750 - *OptionCount is not zero and PacketOptionList is NULL.
751 @retval EFI_BUFFER_TOO_SMALL *OptionCount is smaller than the number of options that were
752 found in the Packet.
753
754**/
755typedef
759 IN EFI_DHCP6_PACKET *Packet,
760 IN OUT UINT32 *OptionCount,
761 OUT EFI_DHCP6_PACKET_OPTION *PacketOptionList[] OPTIONAL
762 );
763
764///
765/// The EFI DHCPv6 Protocol is used to get IPv6 addresses and other configuration parameters
766/// from DHCPv6 servers.
767///
779
782
783#endif
unsigned short UINT16
2-byte unsigned value.
unsigned char BOOLEAN
Logical Boolean.
#define EFIAPI
unsigned char UINT8
1-byte unsigned value.
unsigned int UINT32
4-byte unsigned value.
#define VOID
Undeclared type.
Definition Base.h:272
#define OPTIONAL
Passing the datum to the function is optional, and a NULL is passed if the value is not supplied.
Definition Base.h:293
EFI_STATUS(EFIAPI * EFI_DHCP6_CALLBACK)(IN EFI_DHCP6_PROTOCOL *This, IN VOID *Context, IN EFI_DHCP6_STATE CurrentState, IN EFI_DHCP6_EVENT Dhcp6Event, IN EFI_DHCP6_PACKET *Packet, OUT EFI_DHCP6_PACKET **NewPacket OPTIONAL)
EFI_DHCP6_CALLBACK is provided by the consumer of the EFI DHCPv6 Protocol instance to intercept event...
Definition Dhcp6.h:321
EFI_STATUS(EFIAPI * EFI_DHCP6_CONFIGURE)(IN EFI_DHCP6_PROTOCOL *This, IN EFI_DHCP6_CONFIG_DATA *Dhcp6CfgData OPTIONAL)
Initialize or clean up the configuration data for the EFI DHCPv6 Protocol instance.
Definition Dhcp6.h:468
EFI_STATUS(EFIAPI * EFI_DHCP6_RENEW_REBIND)(IN EFI_DHCP6_PROTOCOL *This, IN BOOLEAN RebindRequest)
Manually extend the valid and preferred lifetimes for the IPv6 addresses of the configured IA and upd...
Definition Dhcp6.h:626
EFI_STATUS(EFIAPI * EFI_DHCP6_DECLINE)(IN EFI_DHCP6_PROTOCOL *This, IN UINT32 AddressCount, IN EFI_IPv6_ADDRESS *Addresses)
Inform that one or more IPv6 addresses assigned by a server are already in use by another node.
Definition Dhcp6.h:664
struct _EFI_DHCP6_PROTOCOL EFI_DHCP6_PROTOCOL
Definition Dhcp6.h:29
EFI_GUID gEfiDhcp6ProtocolGuid
EFI_STATUS(EFIAPI * EFI_DHCP6_RELEASE)(IN EFI_DHCP6_PROTOCOL *This, IN UINT32 AddressCount, IN EFI_IPv6_ADDRESS *Addresses)
Release one or more IPv6 addresses associated with the configured IA for current instance.
Definition Dhcp6.h:702
EFI_STATUS(EFIAPI * EFI_DHCP6_INFO_REQUEST)(IN EFI_DHCP6_PROTOCOL *This, IN BOOLEAN SendClientId, IN EFI_DHCP6_PACKET_OPTION *OptionRequest, IN UINT32 OptionCount, IN EFI_DHCP6_PACKET_OPTION *OptionList[] OPTIONAL, IN EFI_DHCP6_RETRANSMISSION *Retransmission, IN EFI_EVENT TimeoutEvent OPTIONAL, IN EFI_DHCP6_INFO_CALLBACK ReplyCallback, IN VOID *CallbackContext OPTIONAL)
Request configuration information without the assignment of any IA addresses of the client.
Definition Dhcp6.h:572
EFI_DHCP6_EVENT
Definition Dhcp6.h:79
@ Dhcp6SendDecline
A Decline packet is about to be sent.
Definition Dhcp6.h:111
@ Dhcp6RcvdReply
A Reply packet is received and will be passed to Dhcp6Callback.
Definition Dhcp6.h:102
@ Dhcp6RcvdAdvertise
An Advertise packet is received and will be passed to Dhcp6Callback.
Definition Dhcp6.h:88
@ Dhcp6SendRequest
A Request packet is about to be sent.
Definition Dhcp6.h:98
@ Dhcp6EnterRenewing
A Renew packet is about to be sent.
Definition Dhcp6.h:126
@ Dhcp6SendRelease
A Release packet is about to be sent.
Definition Dhcp6.h:121
@ Dhcp6SendConfirm
A Confirm packet is about to be sent.
Definition Dhcp6.h:116
@ Dhcp6SendSolicit
A Solicit packet is about to be sent.
Definition Dhcp6.h:84
@ Dhcp6EnterRebinding
A Rebind packet is about to be sent.
Definition Dhcp6.h:131
@ Dhcp6SelectAdvertise
It is time for Dhcp6Callback to determine whether select the default Advertise packet by RFC 3315 pol...
Definition Dhcp6.h:93
@ Dhcp6RcvdReconfigure
A Reconfigure packet is received and will be passed to Dhcp6Callback.
Definition Dhcp6.h:106
EFI_STATUS(EFIAPI * EFI_DHCP6_GET_MODE_DATA)(IN EFI_DHCP6_PROTOCOL *This, OUT EFI_DHCP6_MODE_DATA *Dhcp6ModeData OPTIONAL, OUT EFI_DHCP6_CONFIG_DATA *Dhcp6ConfigData OPTIONAL)
Retrieve the current operating mode data and configuration data for the EFI DHCPv6 Protocol instance.
Definition Dhcp6.h:424
EFI_STATUS(EFIAPI * EFI_DHCP6_INFO_CALLBACK)(IN EFI_DHCP6_PROTOCOL *This, IN VOID *Context, IN EFI_DHCP6_PACKET *Packet)
EFI_DHCP6_INFO_CALLBACK is provided by the consumer of the EFI DHCPv6 Protocol instance to intercept ...
Definition Dhcp6.h:400
EFI_DHCP6_STATE
Definition Dhcp6.h:31
@ Dhcp6Declining
A Decline packet is sent out to indicate one or more addresses of the configured IA are in use by ano...
Definition Dhcp6.h:52
@ Dhcp6Requesting
A Request is sent out to the DHCPv6 server, and the EFI DHCPv6 Protocol instance is waiting for Reply...
Definition Dhcp6.h:46
@ Dhcp6Releasing
A Release packet is sent out to release one or more IPv6 addresses of the configured IA,...
Definition Dhcp6.h:62
@ Dhcp6Bound
The DHCPv6 S.A.R.R process is completed for the configured IA.
Definition Dhcp6.h:66
@ Dhcp6Selecting
A Solicit packet is sent out to discover DHCPv6 server, and the EFI DHCPv6 Protocol instance is colle...
Definition Dhcp6.h:41
@ Dhcp6Rebinding
A Rebind packet is sent out to extend lifetime for the IPv6 addresses of the configured IA,...
Definition Dhcp6.h:76
@ Dhcp6Renewing
A Renew packet is sent out to extend lifetime for the IPv6 addresses of the configured IA,...
Definition Dhcp6.h:71
@ Dhcp6Init
The EFI DHCPv6 Protocol instance is configured, and start() needs to be called.
Definition Dhcp6.h:36
@ Dhcp6Confirming
A Confirm packet is sent out to confirm the IPv6 addresses of the configured IA, and the EFI DHCPv6 P...
Definition Dhcp6.h:57
EFI_STATUS(EFIAPI * EFI_DHCP6_STOP)(IN EFI_DHCP6_PROTOCOL *This)
Stop the DHCPv6 S.A.R.R process.
Definition Dhcp6.h:727
EFI_GUID gEfiDhcp6ServiceBindingProtocolGuid
EFI_STATUS(EFIAPI * EFI_DHCP6_PARSE)(IN EFI_DHCP6_PROTOCOL *This, IN EFI_DHCP6_PACKET *Packet, IN OUT UINT32 *OptionCount, OUT EFI_DHCP6_PACKET_OPTION *PacketOptionList[] OPTIONAL)
Parse the option data in the DHCPv6 packet.
Definition Dhcp6.h:757
EFI_STATUS(EFIAPI * EFI_DHCP6_START)(IN EFI_DHCP6_PROTOCOL *This)
Start the DHCPv6 S.A.R.R process.
Definition Dhcp6.h:509
IPv6_ADDRESS EFI_IPv6_ADDRESS
16-byte buffer.
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
GUID EFI_GUID
128-bit buffer containing a unique identifier value.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
Definition compiler.h:926
#define EFI_EVENT
Definition efi.h:54
#define IN
Definition mlx_utils.h:28
#define OUT
Definition mlx_utils.h:29
BOOLEAN ReconfigureAccept
If TRUE, the EFI DHCPv6 Protocol instance is willing to accept Reconfigure packet.
Definition Dhcp6.h:369
EFI_DHCP6_IA_DESCRIPTOR IaDescriptor
The descriptor for the IA of the EFI DHCPv6 Protocol instance.
Definition Dhcp6.h:355
BOOLEAN RapidCommit
If TRUE, the EFI DHCPv6 Protocol instance will send Solicit packet with Rapid Commit option.
Definition Dhcp6.h:375
UINT32 OptionCount
Number of the DHCPv6 options in the OptionList.
Definition Dhcp6.h:343
EFI_DHCP6_RETRANSMISSION * SolicitRetransmission
Parameter to control Solicit packet retransmission behavior.
Definition Dhcp6.h:380
VOID * CallbackContext
Pointer to the context that will be passed to Dhcp6Callback.
Definition Dhcp6.h:339
EFI_EVENT IaInfoEvent
If not NULL, the event will be signaled when any IPv6 address information of the configured IA is upd...
Definition Dhcp6.h:363
EFI_DHCP6_CALLBACK Dhcp6Callback
The callback function is to intercept various events that occur in the DHCPv6 S.A....
Definition Dhcp6.h:335
EFI_DHCP6_PACKET_OPTION ** OptionList
List of the DHCPv6 options to be included in Solicit and Request packet.
Definition Dhcp6.h:351
UINT8 Duid[1]
Array of DUID octects.
Definition Dhcp6.h:216
UINT16 Length
Length of DUID in octects.
Definition Dhcp6.h:212
EFI_DHCP6_HEADER defines the format of the DHCPv6 header.
Definition Dhcp6.h:169
UINT32 TransactionId
The DHCPv6 message type.
Definition Dhcp6.h:177
UINT32 MessageType
The DHCPv6 transaction ID.
Definition Dhcp6.h:173
EFI_IPv6_ADDRESS IpAddress
The IPv6 address.
Definition Dhcp6.h:247
UINT32 ValidLifetime
The valid lifetime in unit of seconds for the IPv6 address.
Definition Dhcp6.h:255
UINT32 PreferredLifetime
The preferred lifetime in unit of seconds for the IPv6 address.
Definition Dhcp6.h:251
UINT16 Type
Type for an IA.
Definition Dhcp6.h:259
UINT32 IaId
The identifier for an IA.
Definition Dhcp6.h:260
EFI_DHCP6_PACKET * ReplyPacket
Pointer to the cached latest Reply packet.
Definition Dhcp6.h:275
EFI_DHCP6_IA_DESCRIPTOR Descriptor
The descriptor for IA.
Definition Dhcp6.h:267
EFI_DHCP6_IA_ADDRESS IaAddress[1]
List of the IPv6 addresses of the configured IA.
Definition Dhcp6.h:284
EFI_DHCP6_STATE State
The state of the configured IA.
Definition Dhcp6.h:271
UINT32 IaAddressCount
Number of IPv6 addresses of the configured IA.
Definition Dhcp6.h:279
EFI_DHCP6_DUID * ClientId
Pointer to the DHCPv6 unique identifier.
Definition Dhcp6.h:291
EFI_DHCP6_IA * Ia
Pointer to the configured IA of current instance.
Definition Dhcp6.h:296
EFI_DHCP6_PACKET_OPTION defines the format of the DHCPv6 option, See RFC 3315 for more information.
Definition Dhcp6.h:149
UINT16 OpCode
The DHCPv6 option code, stored in network order.
Definition Dhcp6.h:153
UINT16 OpLen
Length of the DHCPv6 option data, stored in network order.
Definition Dhcp6.h:158
UINT8 Data[1]
The data for the DHCPv6 option, stored in network order.
Definition Dhcp6.h:162
EFI_DHCP6_PACKET defines the format of the DHCPv6 packet.
Definition Dhcp6.h:184
EFI_DHCP6_HEADER Header
The DHCPv6 packet header.
Definition Dhcp6.h:198
UINT32 Size
Size of the EFI_DHCP6_PACKET buffer.
Definition Dhcp6.h:188
UINT8 Option[1]
Start of the DHCPv6 packed option data.
Definition Dhcp6.h:202
UINT32 Length
Length of the EFI_DHCP6_PACKET from the first byte of the Header field to the last byte of the Option...
Definition Dhcp6.h:193
UINT32 Mrt
Maximum retransmission timeout for each retry.
Definition Dhcp6.h:234
UINT32 Mrc
Maximum retransmission count for one packet.
Definition Dhcp6.h:228
UINT32 Mrd
Maximum retransmission duration for one packet.
Definition Dhcp6.h:240
UINT32 Irt
Initial retransmission timeout.
Definition Dhcp6.h:223
The EFI DHCPv6 Protocol is used to get IPv6 addresses and other configuration parameters from DHCPv6 ...
Definition Dhcp6.h:768
EFI_DHCP6_PARSE Parse
Definition Dhcp6.h:777
EFI_DHCP6_STOP Stop
Definition Dhcp6.h:776
EFI_DHCP6_START Start
Definition Dhcp6.h:771
EFI_DHCP6_CONFIGURE Configure
Definition Dhcp6.h:770
EFI_DHCP6_INFO_REQUEST InfoRequest
Definition Dhcp6.h:772
EFI_DHCP6_GET_MODE_DATA GetModeData
Definition Dhcp6.h:769
EFI_DHCP6_RELEASE Release
Definition Dhcp6.h:775
EFI_DHCP6_RENEW_REBIND RenewRebind
Definition Dhcp6.h:773
EFI_DHCP6_DECLINE Decline
Definition Dhcp6.h:774