Path: blob/main/sys/contrib/edk2/Include/Protocol/Dhcp6.h
96339 views
/** @file1UEFI Dynamic Host Configuration Protocol 6 Definition, which is used to get IPv62addresses and other configuration parameters from DHCPv6 servers.34Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>5SPDX-License-Identifier: BSD-2-Clause-Patent67@par Revision Reference:8This Protocol is introduced in UEFI Specification 2.2910**/1112#ifndef __EFI_DHCP6_PROTOCOL_H__13#define __EFI_DHCP6_PROTOCOL_H__1415#define EFI_DHCP6_PROTOCOL_GUID \16{ \170x87c8bad7, 0x595, 0x4053, {0x82, 0x97, 0xde, 0xde, 0x39, 0x5f, 0x5d, 0x5b } \18}1920#define EFI_DHCP6_SERVICE_BINDING_PROTOCOL_GUID \21{ \220x9fb9a8a1, 0x2f4a, 0x43a6, {0x88, 0x9c, 0xd0, 0xf7, 0xb6, 0xc4, 0x7a, 0xd5 } \23}2425typedef struct _EFI_DHCP6_PROTOCOL EFI_DHCP6_PROTOCOL;2627typedef enum {28///29/// The EFI DHCPv6 Protocol instance is configured, and start() needs30/// to be called31///32Dhcp6Init = 0x0,33///34/// A Solicit packet is sent out to discover DHCPv6 server, and the EFI35/// DHCPv6 Protocol instance is collecting Advertise packets.36///37Dhcp6Selecting = 0x1,38///39/// A Request is sent out to the DHCPv6 server, and the EFI DHCPv640/// Protocol instance is waiting for Reply packet.41///42Dhcp6Requesting = 0x2,43///44/// A Decline packet is sent out to indicate one or more addresses of the45/// configured IA are in use by another node, and the EFI DHCPv6.46/// Protocol instance is waiting for Reply packet.47///48Dhcp6Declining = 0x3,49///50/// A Confirm packet is sent out to confirm the IPv6 addresses of the51/// configured IA, and the EFI DHCPv6 Protocol instance is waiting for Reply packet.52///53Dhcp6Confirming = 0x4,54///55/// A Release packet is sent out to release one or more IPv6 addresses of56/// the configured IA, and the EFI DHCPv6 Protocol instance is waiting for Reply packet.57///58Dhcp6Releasing = 0x5,59///60/// The DHCPv6 S.A.R.R process is completed for the configured IA.61///62Dhcp6Bound = 0x6,63///64/// A Renew packet is sent out to extend lifetime for the IPv6 addresses of65/// the configured IA, and the EFI DHCPv6 Protocol instance is waiting for Reply packet.66///67Dhcp6Renewing = 0x7,68///69/// A Rebind packet is sent out to extend lifetime for the IPv6 addresses of70/// the configured IA, and the EFI DHCPv6 Protocol instance is waiting for Reply packet.71///72Dhcp6Rebinding = 0x873} EFI_DHCP6_STATE;7475typedef enum {76///77/// A Solicit packet is about to be sent. The packet is passed to Dhcp6Callback and78/// can be modified or replaced in Dhcp6Callback.79///80Dhcp6SendSolicit = 0x0,81///82/// An Advertise packet is received and will be passed to Dhcp6Callback.83///84Dhcp6RcvdAdvertise = 0x1,85///86/// It is time for Dhcp6Callback to determine whether select the default Advertise87/// packet by RFC 3315 policy, or overwrite it by specific user policy.88///89Dhcp6SelectAdvertise = 0x2,90///91/// A Request packet is about to be sent. The packet is passed to Dhcp6Callback and92/// can be modified or replaced in Dhcp6Callback.93///94Dhcp6SendRequest = 0x3,95///96/// A Reply packet is received and will be passed to Dhcp6Callback.97///98Dhcp6RcvdReply = 0x4,99///100/// A Reconfigure packet is received and will be passed to Dhcp6Callback.101///102Dhcp6RcvdReconfigure = 0x5,103///104/// A Decline packet is about to be sent. The packet is passed to Dhcp6Callback and105/// can be modified or replaced in Dhcp6Callback.106///107Dhcp6SendDecline = 0x6,108///109/// A Confirm packet is about to be sent. The packet is passed to Dhcp6Callback and110/// can be modified or replaced in Dhcp6Callback.111///112Dhcp6SendConfirm = 0x7,113///114/// A Release packet is about to be sent. The packet is passed to Dhcp6Callback and115/// can be modified or replaced in Dhcp6Callback.116///117Dhcp6SendRelease = 0x8,118///119/// A Renew packet is about to be sent. The packet is passed to Dhcp6Callback and120/// can be modified or replaced in Dhcp6Callback.121///122Dhcp6EnterRenewing = 0x9,123///124/// A Rebind packet is about to be sent. The packet is passed to Dhcp6Callback and125/// can be modified or replaced in Dhcp6Callback.126///127Dhcp6EnterRebinding = 0xa128} EFI_DHCP6_EVENT;129130///131/// An IA which carries assigned not temporary address.132///133#define EFI_DHCP6_IA_TYPE_NA 3134///135/// An IA which carries assigned temporary address.136///137#define EFI_DHCP6_IA_TYPE_TA 4138139#pragma pack(1)140///141/// EFI_DHCP6_PACKET_OPTION142/// defines the format of the DHCPv6 option, See RFC 3315 for more information.143/// This data structure is used to reference option data that is packed in the DHCPv6 packet.144///145typedef struct {146///147/// The DHCPv6 option code, stored in network order.148///149UINT16 OpCode;150///151/// Length of the DHCPv6 option data, stored in network order.152/// From the first byte to the last byte of the Data field.153///154UINT16 OpLen;155///156/// The data for the DHCPv6 option, stored in network order.157///158UINT8 Data[1];159} EFI_DHCP6_PACKET_OPTION;160161///162/// EFI_DHCP6_HEADER163/// defines the format of the DHCPv6 header. See RFC 3315 for more information.164///165typedef struct {166///167/// The DHCPv6 transaction ID.168///169UINT32 MessageType : 8;170///171/// The DHCPv6 message type.172///173UINT32 TransactionId : 24;174} EFI_DHCP6_HEADER;175176///177/// EFI_DHCP6_PACKET178/// defines the format of the DHCPv6 packet. See RFC 3315 for more information.179///180typedef struct {181///182/// Size of the EFI_DHCP6_PACKET buffer.183///184UINT32 Size;185///186/// Length of the EFI_DHCP6_PACKET from the first byte of the Header field to the last187/// byte of the Option[] field.188///189UINT32 Length;190struct {191///192/// The DHCPv6 packet header.193///194EFI_DHCP6_HEADER Header;195///196/// Start of the DHCPv6 packed option data.197///198UINT8 Option[1];199} Dhcp6;200} EFI_DHCP6_PACKET;201202#pragma pack()203204typedef struct {205///206/// Length of DUID in octects.207///208UINT16 Length;209///210/// Array of DUID octects.211///212UINT8 Duid[1];213} EFI_DHCP6_DUID;214215typedef struct {216///217/// Initial retransmission timeout.218///219UINT32 Irt;220///221/// Maximum retransmission count for one packet. If Mrc is zero, there's no upper limit222/// for retransmission count.223///224UINT32 Mrc;225///226/// Maximum retransmission timeout for each retry. It's the upper bound of the number of227/// retransmission timeout. If Mrt is zero, there is no upper limit for retransmission228/// timeout.229///230UINT32 Mrt;231///232/// Maximum retransmission duration for one packet. It's the upper bound of the numbers233/// the client may retransmit a message. If Mrd is zero, there's no upper limit for234/// retransmission duration.235///236UINT32 Mrd;237} EFI_DHCP6_RETRANSMISSION;238239typedef struct {240///241/// The IPv6 address.242///243EFI_IPv6_ADDRESS IpAddress;244///245/// The preferred lifetime in unit of seconds for the IPv6 address.246///247UINT32 PreferredLifetime;248///249/// The valid lifetime in unit of seconds for the IPv6 address.250///251UINT32 ValidLifetime;252} EFI_DHCP6_IA_ADDRESS;253254typedef struct {255UINT16 Type; ///< Type for an IA.256UINT32 IaId; ///< The identifier for an IA.257} EFI_DHCP6_IA_DESCRIPTOR;258259typedef struct {260///261/// The descriptor for IA.262///263EFI_DHCP6_IA_DESCRIPTOR Descriptor;264///265/// The state of the configured IA.266///267EFI_DHCP6_STATE State;268///269/// Pointer to the cached latest Reply packet. May be NULL if no packet is cached.270///271EFI_DHCP6_PACKET *ReplyPacket;272///273/// Number of IPv6 addresses of the configured IA.274///275UINT32 IaAddressCount;276///277/// List of the IPv6 addresses of the configured IA. When the state of the configured IA is278/// in Dhcp6Bound, Dhcp6Renewing and Dhcp6Rebinding, the IPv6 addresses are usable.279///280EFI_DHCP6_IA_ADDRESS IaAddress[1];281} EFI_DHCP6_IA;282283typedef struct {284///285/// Pointer to the DHCPv6 unique identifier. The caller is responsible for freeing this buffer.286///287EFI_DHCP6_DUID *ClientId;288///289/// Pointer to the configured IA of current instance. The caller can free this buffer after290/// using it.291///292EFI_DHCP6_IA *Ia;293} EFI_DHCP6_MODE_DATA;294295/**296EFI_DHCP6_CALLBACK is provided by the consumer of the EFI DHCPv6 Protocol instance to297intercept events that occurs in the DHCPv6 S.A.R.R process.298299@param[in] This Pointer to the EFI_DHCP6_PROTOCOL instance that is used to configure this300callback function.301@param[in] Context Pointer to the context that is initialized by EFI_DHCP6_PROTOCOL.Configure().302@param[in] CurrentState The current state of the configured IA.303@param[in] Dhcp6Event The event that occurs in the current state, which usually means a state transition.304@param[in] Packet Pointer to the DHCPv6 packet that is about to be sent or has been received.305The EFI DHCPv6 Protocol instance is responsible for freeing the buffer.306@param[out] NewPacket Pointer to the new DHCPv6 packet to overwrite the Packet. NewPacket can not307share the buffer with Packet. If *NewPacket is not NULL, the EFI DHCPv6308Protocol instance is responsible for freeing the buffer.309310@retval EFI_SUCCESS Tell the EFI DHCPv6 Protocol instance to continue the DHCPv6 S.A.R.R process.311@retval EFI_ABORTED Tell the EFI DHCPv6 Protocol instance to abort the DHCPv6 S.A.R.R process,312and the state of the configured IA will be transferred to Dhcp6Init.313314**/315typedef316EFI_STATUS317(EFIAPI *EFI_DHCP6_CALLBACK)(318IN EFI_DHCP6_PROTOCOL *This,319IN VOID *Context,320IN EFI_DHCP6_STATE CurrentState,321IN EFI_DHCP6_EVENT Dhcp6Event,322IN EFI_DHCP6_PACKET *Packet,323OUT EFI_DHCP6_PACKET **NewPacket OPTIONAL324);325326typedef struct {327///328/// The callback function is to intercept various events that occur in the DHCPv6 S.A.R.R329/// process. Set to NULL to ignore all those events.330///331EFI_DHCP6_CALLBACK Dhcp6Callback;332///333/// Pointer to the context that will be passed to Dhcp6Callback.334///335VOID *CallbackContext;336///337/// Number of the DHCPv6 options in the OptionList.338///339UINT32 OptionCount;340///341/// List of the DHCPv6 options to be included in Solicit and Request packet. The buffer342/// can be freed after EFI_DHCP6_PROTOCOL.Configure() returns. Ignored if343/// OptionCount is zero. OptionList should not contain Client Identifier option344/// and any IA option, which will be appended by EFI DHCPv6 Protocol instance345/// automatically.346///347EFI_DHCP6_PACKET_OPTION **OptionList;348///349/// The descriptor for the IA of the EFI DHCPv6 Protocol instance.350///351EFI_DHCP6_IA_DESCRIPTOR IaDescriptor;352///353/// If not NULL, the event will be signaled when any IPv6 address information of the354/// configured IA is updated, including IPv6 address, preferred lifetime and valid355/// lifetime, or the DHCPv6 S.A.R.R process fails. Otherwise, Start(),356/// renewrebind(), decline(), release() and stop() will be blocking357/// operations, and they will wait for the exchange process completion or failure.358///359EFI_EVENT IaInfoEvent;360///361/// If TRUE, the EFI DHCPv6 Protocol instance is willing to accept Reconfigure packet.362/// Otherwise, it will ignore it. Reconfigure Accept option can not be specified through363/// OptionList parameter.364///365BOOLEAN ReconfigureAccept;366///367/// If TRUE, the EFI DHCPv6 Protocol instance will send Solicit packet with Rapid368/// Commit option. Otherwise, Rapid Commit option will not be included in Solicit369/// packet. Rapid Commit option can not be specified through OptionList parameter.370///371BOOLEAN RapidCommit;372///373/// Parameter to control Solicit packet retransmission behavior. The374/// buffer can be freed after EFI_DHCP6_PROTOCOL.Configure() returns.375///376EFI_DHCP6_RETRANSMISSION *SolicitRetransmission;377} EFI_DHCP6_CONFIG_DATA;378379/**380EFI_DHCP6_INFO_CALLBACK is provided by the consumer of the EFI DHCPv6 Protocol381instance to intercept events that occurs in the DHCPv6 Information Request exchange process.382383@param[in] This Pointer to the EFI_DHCP6_PROTOCOL instance that is used to configure this384callback function.385@param[in] Context Pointer to the context that is initialized in the EFI_DHCP6_PROTOCOL.InfoRequest().386@param[in] Packet Pointer to Reply packet that has been received. The EFI DHCPv6 Protocol instance is387responsible for freeing the buffer.388389@retval EFI_SUCCESS Tell the EFI DHCPv6 Protocol instance to finish Information Request exchange process.390@retval EFI_NOT_READY Tell the EFI DHCPv6 Protocol instance to continue Information Request exchange process.391@retval EFI_ABORTED Tell the EFI DHCPv6 Protocol instance to abort the Information Request exchange process.392393**/394typedef395EFI_STATUS396(EFIAPI *EFI_DHCP6_INFO_CALLBACK)(397IN EFI_DHCP6_PROTOCOL *This,398IN VOID *Context,399IN EFI_DHCP6_PACKET *Packet400);401402/**403Retrieve the current operating mode data and configuration data for the EFI DHCPv6 Protocol instance.404405@param[in] This Pointer to the EFI_DHCP6_PROTOCOL instance.406@param[out] Dhcp6ModeData Pointer to the DHCPv6 mode data structure. The caller is responsible for freeing this407structure and each reference buffer.408@param[out] Dhcp6ConfigData Pointer to the DHCPv6 configuration data structure. The caller is responsible for409freeing this structure and each reference buffer.410411@retval EFI_SUCCESS The mode data was returned.412@retval EFI_ACCESS_DENIED The EFI DHCPv6 Protocol instance has not been configured when Dhcp6ConfigData is not NULL.413@retval EFI_INVALID_PARAMETER One or more following conditions are TRUE:414- This is NULL.415- Both Dhcp6ConfigData and Dhcp6ModeData are NULL.416417**/418typedef419EFI_STATUS420(EFIAPI *EFI_DHCP6_GET_MODE_DATA)(421IN EFI_DHCP6_PROTOCOL *This,422OUT EFI_DHCP6_MODE_DATA *Dhcp6ModeData OPTIONAL,423OUT EFI_DHCP6_CONFIG_DATA *Dhcp6ConfigData OPTIONAL424);425426/**427Initialize or clean up the configuration data for the EFI DHCPv6 Protocol instance.428429The Configure() function is used to initialize or clean up the configuration data of the EFI430DHCPv6 Protocol instance.431- When Dhcp6CfgData is not NULL and Configure() is called successfully, the432configuration data will be initialized in the EFI DHCPv6 Protocol instance and the state of the433configured IA will be transferred into Dhcp6Init.434- When Dhcp6CfgData is NULL and Configure() is called successfully, the configuration435data will be cleaned up and no IA will be associated with the EFI DHCPv6 Protocol instance.436437To update the configuration data for an EFI DCHPv6 Protocol instance, the original data must be438cleaned up before setting the new configuration data.439440@param[in] This Pointer to the EFI_DHCP6_PROTOCOL instance.441@param[in] Dhcp6CfgData Pointer to the DHCPv6 configuration data structure.442443@retval EFI_SUCCESS The mode data was returned.444@retval EFI_INVALID_PARAMETER One or more following conditions are TRUE445- This is NULL.446- OptionCount > 0 and OptionList is NULL.447- OptionList is not NULL, and Client Id option, Reconfigure Accept option,448Rapid Commit option or any IA option is specified in the OptionList.449- IaDescriptor.Type is neither EFI_DHCP6_IA_TYPE_NA nor EFI_DHCP6_IA_TYPE_NA.450- IaDescriptor is not unique.451- Both IaInfoEvent and SolicitRetransimssion are NULL.452- SolicitRetransmission is not NULL, and both SolicitRetransimssion->Mrc and453SolicitRetransmission->Mrd are zero.454@retval EFI_ACCESS_DENIED The EFI DHCPv6 Protocol instance has been already configured455when Dhcp6CfgData is not NULL.456The EFI DHCPv6 Protocol instance has already started the457DHCPv6 S.A.R.R when Dhcp6CfgData is NULL.458@retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.459@retval EFI_DEVICE_ERROR An unexpected system or network error occurred.460461**/462typedef463EFI_STATUS464(EFIAPI *EFI_DHCP6_CONFIGURE)(465IN EFI_DHCP6_PROTOCOL *This,466IN EFI_DHCP6_CONFIG_DATA *Dhcp6CfgData OPTIONAL467);468469/**470Start the DHCPv6 S.A.R.R process.471472The Start() function starts the DHCPv6 S.A.R.R process. This function can be called only when473the state of the configured IA is in the Dhcp6Init state. If the DHCPv6 S.A.R.R process completes474successfully, the state of the configured IA will be transferred through Dhcp6Selecting and475Dhcp6Requesting to Dhcp6Bound state. The update of the IPv6 addresses will be notified through476EFI_DHCP6_CONFIG_DATA.IaInfoEvent. At the time when each event occurs in this process, the477callback function set by EFI_DHCP6_PROTOCOL.Configure() will be called and the user can take478this opportunity to control the process. If EFI_DHCP6_CONFIG_DATA.IaInfoEvent is NULL, the479Start() function call is a blocking operation. It will return after the DHCPv6 S.A.R.R process480completes or aborted by users. If the process is aborted by system or network error, the state of481the configured IA will be transferred to Dhcp6Init. The Start() function can be called again to482restart the process.483484@param[in] This Pointer to the EFI_DHCP6_PROTOCOL instance.485486@retval EFI_SUCCESS The DHCPv6 S.A.R.R process is completed and at least one IPv6487address has been bound to the configured IA when488EFI_DHCP6_CONFIG_DATA.IaInfoEvent is NULL.489The DHCPv6 S.A.R.R process is started when490EFI_DHCP6_CONFIG_DATA.IaInfoEvent is not NULL.491@retval EFI_ACCESS_DENIED The EFI DHCPv6 Child instance hasn't been configured.492@retval EFI_INVALID_PARAMETER This is NULL.493@retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.494@retval EFI_ALREADY_STARTED The DHCPv6 S.A.R.R process has already started.495@retval EFI_DEVICE_ERROR An unexpected network or system error occurred.496@retval EFI_NO_RESPONSE The DHCPv6 S.A.R.R process failed because of no response.497@retval EFI_NO_MAPPING No IPv6 address has been bound to the configured IA after the498DHCPv6 S.A.R.R process.499@retval EFI_ABORTED The DHCPv6 S.A.R.R process aborted by user.500@retval EFI_NO_MEDIA There was a media error.501502**/503typedef504EFI_STATUS505(EFIAPI *EFI_DHCP6_START)(506IN EFI_DHCP6_PROTOCOL *This507);508509/**510Request configuration information without the assignment of any IA addresses of the client.511512The InfoRequest() function is used to request configuration information without the assignment513of any IPv6 address of the client. Client sends out Information Request packet to obtain514the required configuration information, and DHCPv6 server responds with Reply packet containing515the information for the client. The received Reply packet will be passed to the user by516ReplyCallback function. If user returns EFI_NOT_READY from ReplyCallback, the EFI DHCPv6517Protocol instance will continue to receive other Reply packets unless timeout according to518the Retransmission parameter. Otherwise, the Information Request exchange process will be519finished successfully if user returns EFI_SUCCESS from ReplyCallback.520521@param[in] This Pointer to the EFI_DHCP6_PROTOCOL instance.522@param[in] SendClientId If TRUE, the EFI DHCPv6 Protocol instance will build Client523Identifier option and include it into Information Request524packet. If FALSE, Client Identifier option will not be included.525Client Identifier option can not be specified through OptionList526parameter.527@param[in] OptionRequest Pointer to the Option Request option in the Information Request528packet. Option Request option can not be specified through529OptionList parameter.530@param[in] OptionCount Number of options in OptionList.531@param[in] OptionList List of other DHCPv6 options. These options will be appended532to the Option Request option. The caller is responsible for533freeing this buffer. Type is defined in EFI_DHCP6_PROTOCOL.GetModeData().534@param[in] Retransmission Parameter to control Information Request packet retransmission535behavior. The buffer can be freed after EFI_DHCP6_PROTOCOL.InfoRequest()536returns.537@param[in] TimeoutEvent If not NULL, this event is signaled when the information request538exchange aborted because of no response. If NULL, the function539call is a blocking operation; and it will return after the540information-request exchange process finish or aborted by users.541@param[in] ReplyCallback The callback function is to intercept various events that occur542in the Information Request exchange process. It should not be543set to NULL.544@param[in] CallbackContext Pointer to the context that will be passed to ReplyCallback.545546@retval EFI_SUCCESS The DHCPv6 S.A.R.R process is completed and at least one IPv6547@retval EFI_SUCCESS The DHCPv6 information request exchange process completed548when TimeoutEvent is NULL. Information Request packet has been549sent to DHCPv6 server when TimeoutEvent is not NULL.550@retval EFI_INVALID_PARAMETER One or more following conditions are TRUE:551- This is NULL.552- OptionRequest is NULL or OptionRequest->OpCode is invalid.553- OptionCount > 0 and OptionList is NULL.554- OptionList is not NULL, and Client Identify option or555Option Request option is specified in the OptionList.556- Retransimssion is NULL.557- Both Retransimssion->Mrc and Retransmission->Mrd are zero.558- ReplyCallback is NULL.559@retval EFI_DEVICE_ERROR An unexpected network or system error occurred.560@retval EFI_NO_RESPONSE The DHCPv6 information request exchange process failed561because of no response, or not all requested-options are562responded by DHCPv6 servers when Timeout happened.563@retval EFI_ABORTED The DHCPv6 information request exchange process aborted by user.564565**/566typedef567EFI_STATUS568(EFIAPI *EFI_DHCP6_INFO_REQUEST)(569IN EFI_DHCP6_PROTOCOL *This,570IN BOOLEAN SendClientId,571IN EFI_DHCP6_PACKET_OPTION *OptionRequest,572IN UINT32 OptionCount,573IN EFI_DHCP6_PACKET_OPTION *OptionList[] OPTIONAL,574IN EFI_DHCP6_RETRANSMISSION *Retransmission,575IN EFI_EVENT TimeoutEvent OPTIONAL,576IN EFI_DHCP6_INFO_CALLBACK ReplyCallback,577IN VOID *CallbackContext OPTIONAL578);579580/**581Manually extend the valid and preferred lifetimes for the IPv6 addresses of the configured582IA and update other configuration parameters by sending Renew or Rebind packet.583584The RenewRebind() function is used to manually extend the valid and preferred lifetimes for the585IPv6 addresses of the configured IA and update other configuration parameters by sending Renew or586Rebind packet.587- When RebindRequest is FALSE and the state of the configured IA is Dhcp6Bound, it588will send Renew packet to the previously DHCPv6 server and transfer the state of the configured589IA to Dhcp6Renewing. If valid Reply packet received, the state transfers to Dhcp6Bound590and the valid and preferred timer restarts. If fails, the state transfers to Dhcp6Bound but the591timer continues.592- When RebindRequest is TRUE and the state of the configured IA is Dhcp6Bound, it will593send Rebind packet. If valid Reply packet received, the state transfers to Dhcp6Bound and the594valid and preferred timer restarts. If fails, the state transfers to Dhcp6Init and the IA can't595be used.596597@param[in] This Pointer to the EFI_DHCP4_PROTOCOL instance.598@param[in] RebindRequest If TRUE, it will send Rebind packet and enter the Dhcp6Rebinding state.599Otherwise, it will send Renew packet and enter the Dhcp6Renewing state.600601@retval EFI_SUCCESS The DHCPv6 renew/rebind exchange process has completed and at602least one IPv6 address of the configured IA has been bound again603when EFI_DHCP6_CONFIG_DATA.IaInfoEvent is NULL.604The EFI DHCPv6 Protocol instance has sent Renew or Rebind packet605when EFI_DHCP6_CONFIG_DATA.IaInfoEvent is not NULL.606@retval EFI_ACCESS_DENIED The EFI DHCPv6 Child instance hasn't been configured, or the state607of the configured IA is not in Dhcp6Bound.608@retval EFI_ALREADY_STARTED The state of the configured IA has already entered Dhcp6Renewing609when RebindRequest is FALSE.610The state of the configured IA has already entered Dhcp6Rebinding611when RebindRequest is TRUE.612@retval EFI_INVALID_PARAMETER This is NULL.613@retval EFI_DEVICE_ERROR An unexpected system or system error occurred.614@retval EFI_NO_RESPONSE The DHCPv6 renew/rebind exchange process failed because of no response.615@retval EFI_NO_MAPPING No IPv6 address has been bound to the configured IA after the DHCPv6616renew/rebind exchange process.617@retval EFI_ABORTED The DHCPv6 renew/rebind exchange process aborted by user.618619**/620typedef621EFI_STATUS622(EFIAPI *EFI_DHCP6_RENEW_REBIND)(623IN EFI_DHCP6_PROTOCOL *This,624IN BOOLEAN RebindRequest625);626627/**628Inform that one or more IPv6 addresses assigned by a server are already in use by629another node.630631The Decline() function is used to manually decline the assignment of IPv6 addresses, which632have been already used by another node. If all IPv6 addresses of the configured IA are declined633through this function, the state of the IA will switch through Dhcp6Declining to Dhcp6Init,634otherwise, the state of the IA will restore to Dhcp6Bound after the declining process. The635Decline() can only be called when the IA is in Dhcp6Bound state. If the636EFI_DHCP6_CONFIG_DATA.IaInfoEvent is NULL, this function is a blocking operation. It637will return after the declining process finishes, or aborted by user.638639@param[in] This Pointer to the EFI_DHCP4_PROTOCOL instance.640@param[in] AddressCount Number of declining IPv6 addresses.641@param[in] Addresses Pointer to the buffer stored all the declining IPv6 addresses.642643@retval EFI_SUCCESS The DHCPv6 decline exchange process has completed when644EFI_DHCP6_CONFIG_DATA.IaInfoEvent is NULL.645The EFI DHCPv6 Protocol instance has sent Decline packet when646EFI_DHCP6_CONFIG_DATA.IaInfoEvent is not NULL.647@retval EFI_INVALID_PARAMETER One or more following conditions are TRUE648- This is NULL.649- AddressCount is zero or Addresses is NULL.650@retval EFI_NOT_FOUND Any specified IPv6 address is not correlated with the configured IA651for this instance.652@retval EFI_ACCESS_DENIED The EFI DHCPv6 Child instance hasn't been configured, or the653state of the configured IA is not in Dhcp6Bound.654@retval EFI_DEVICE_ERROR An unexpected network or system error occurred.655@retval EFI_ABORTED The DHCPv6 decline exchange process aborted by user.656657**/658typedef659EFI_STATUS660(EFIAPI *EFI_DHCP6_DECLINE)(661IN EFI_DHCP6_PROTOCOL *This,662IN UINT32 AddressCount,663IN EFI_IPv6_ADDRESS *Addresses664);665666/**667Release one or more IPv6 addresses associated with the configured IA for current instance.668669The Release() function is used to manually release the one or more IPv6 address. If AddressCount670is zero, it will release all IPv6 addresses of the configured IA. If all IPv6 addresses of the IA671are released through this function, the state of the IA will switch through Dhcp6Releasing to672Dhcp6Init, otherwise, the state of the IA will restore to Dhcp6Bound after the releasing process.673The Release() can only be called when the IA is in Dhcp6Bound state. If the674EFI_DHCP6_CONFIG_DATA.IaInfoEvent is NULL, the function is a blocking operation. It will return675after the releasing process finishes, or aborted by user.676677@param[in] This Pointer to the EFI_DHCP6_PROTOCOL instance.678@param[in] AddressCount Number of releasing IPv6 addresses.679@param[in] Addresses Pointer to the buffer stored all the releasing IPv6 addresses.680Ignored if AddressCount is zero.681@retval EFI_SUCCESS The DHCPv6 release exchange process has completed when682EFI_DHCP6_CONFIG_DATA.IaInfoEvent is NULL.683The EFI DHCPv6 Protocol instance has sent Release packet when684EFI_DHCP6_CONFIG_DATA.IaInfoEvent is not NULL.685@retval EFI_INVALID_PARAMETER One or more following conditions are TRUE686- This is NULL.687- AddressCount is not zero or Addresses is NULL.688@retval EFI_NOT_FOUND Any specified IPv6 address is not correlated with the configured689IA for this instance.690@retval EFI_ACCESS_DENIED The EFI DHCPv6 Child instance hasn't been configured, or the691state of the configured IA is not in Dhcp6Bound.692@retval EFI_DEVICE_ERROR An unexpected network or system error occurred.693@retval EFI_ABORTED The DHCPv6 release exchange process aborted by user.694695**/696typedef697EFI_STATUS698(EFIAPI *EFI_DHCP6_RELEASE)(699IN EFI_DHCP6_PROTOCOL *This,700IN UINT32 AddressCount,701IN EFI_IPv6_ADDRESS *Addresses702);703704/**705Stop the DHCPv6 S.A.R.R process.706707The Stop() function is used to stop the DHCPv6 S.A.R.R process. If this function is called708successfully, all the IPv6 addresses of the configured IA will be released and the state of709the configured IA will be transferred to Dhcp6Init.710711@param[in] This Pointer to the EFI_DHCP6_PROTOCOL instance.712713@retval EFI_SUCCESS The DHCPv6 S.A.R.R process has been stopped when714EFI_DHCP6_CONFIG_DATA.IaInfoEvent is NULL.715The EFI DHCPv6 Protocol instance has sent Release packet if716need release or has been stopped if needn't, when717EFI_DHCP6_CONFIG_DATA.IaInfoEvent is not NULL.718@retval EFI_INVALID_PARAMETER This is NULL.719720**/721typedef722EFI_STATUS723(EFIAPI *EFI_DHCP6_STOP)(724IN EFI_DHCP6_PROTOCOL *This725);726727/**728Parse the option data in the DHCPv6 packet.729730The Parse() function is used to retrieve the option list in the DHCPv6 packet.731732@param[in] This Pointer to the EFI_DHCP6_PROTOCOL instance.733734@param[in] Packet Pointer to packet to be parsed.735@param[in] OptionCount On input, the number of entries in the PacketOptionList.736On output, the number of DHCPv6 options in the Packet.737@param[in] PacketOptionList List of pointers to the DHCPv6 options in the Packet.738The OpCode and OpLen in EFI_DHCP6_PACKET_OPTION are739both stored in network byte order.740@retval EFI_SUCCESS The packet was successfully parsed.741@retval EFI_INVALID_PARAMETER One or more following conditions are TRUE742- This is NULL.743- Packet is NULL.744- Packet is not a well-formed DHCPv6 packet.745- OptionCount is NULL.746- *OptionCount is not zero and PacketOptionList is NULL.747@retval EFI_BUFFER_TOO_SMALL *OptionCount is smaller than the number of options that were748found in the Packet.749750**/751typedef752EFI_STATUS753(EFIAPI *EFI_DHCP6_PARSE)(754IN EFI_DHCP6_PROTOCOL *This,755IN EFI_DHCP6_PACKET *Packet,756IN OUT UINT32 *OptionCount,757OUT EFI_DHCP6_PACKET_OPTION *PacketOptionList[] OPTIONAL758);759760///761/// The EFI DHCPv6 Protocol is used to get IPv6 addresses and other configuration parameters762/// from DHCPv6 servers.763///764struct _EFI_DHCP6_PROTOCOL {765EFI_DHCP6_GET_MODE_DATA GetModeData;766EFI_DHCP6_CONFIGURE Configure;767EFI_DHCP6_START Start;768EFI_DHCP6_INFO_REQUEST InfoRequest;769EFI_DHCP6_RENEW_REBIND RenewRebind;770EFI_DHCP6_DECLINE Decline;771EFI_DHCP6_RELEASE Release;772EFI_DHCP6_STOP Stop;773EFI_DHCP6_PARSE Parse;774};775776extern EFI_GUID gEfiDhcp6ProtocolGuid;777extern EFI_GUID gEfiDhcp6ServiceBindingProtocolGuid;778779#endif780781782