2009-08-18 09:00:38 +02:00
|
|
|
/** @file
|
|
|
|
UEFI Dynamic Host Configuration Protocol 6 Definition, which is used to get IPv6
|
|
|
|
addresses and other configuration parameters from DHCPv6 servers.
|
|
|
|
|
2018-06-27 15:11:33 +02:00
|
|
|
Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
|
|
|
|
This program and the accompanying materials
|
|
|
|
are licensed and made available under the terms and conditions of the BSD License
|
|
|
|
which accompanies this distribution. The full text of the license may be found at
|
|
|
|
http://opensource.org/licenses/bsd-license.php
|
|
|
|
|
|
|
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
|
|
|
|
|
|
@par Revision Reference:
|
2009-09-03 11:22:38 +02:00
|
|
|
This Protocol is introduced in UEFI Specification 2.2
|
2009-08-18 09:00:38 +02:00
|
|
|
|
|
|
|
**/
|
|
|
|
|
|
|
|
#ifndef __EFI_DHCP6_PROTOCOL_H__
|
|
|
|
#define __EFI_DHCP6_PROTOCOL_H__
|
|
|
|
|
|
|
|
#define EFI_DHCP6_PROTOCOL_GUID \
|
|
|
|
{ \
|
|
|
|
0x87c8bad7, 0x595, 0x4053, {0x82, 0x97, 0xde, 0xde, 0x39, 0x5f, 0x5d, 0x5b } \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define EFI_DHCP6_SERVICE_BINDING_PROTOCOL_GUID \
|
|
|
|
{ \
|
|
|
|
0x9fb9a8a1, 0x2f4a, 0x43a6, {0x88, 0x9c, 0xd0, 0xf7, 0xb6, 0xc4, 0x7a, 0xd5 } \
|
|
|
|
}
|
|
|
|
|
|
|
|
typedef struct _EFI_DHCP6_PROTOCOL EFI_DHCP6_PROTOCOL;
|
|
|
|
|
2018-06-27 15:11:33 +02:00
|
|
|
typedef enum {
|
2009-08-18 09:00:38 +02:00
|
|
|
///
|
2018-06-27 15:11:33 +02:00
|
|
|
/// The EFI DHCPv6 Protocol instance is configured, and start() needs
|
2009-08-18 09:00:38 +02:00
|
|
|
/// to be called
|
|
|
|
///
|
|
|
|
Dhcp6Init = 0x0,
|
|
|
|
///
|
|
|
|
/// A Solicit packet is sent out to discover DHCPv6 server, and the EFI
|
|
|
|
/// DHCPv6 Protocol instance is collecting Advertise packets.
|
|
|
|
///
|
|
|
|
Dhcp6Selecting = 0x1,
|
|
|
|
///
|
2018-06-27 15:11:33 +02:00
|
|
|
/// A Request is sent out to the DHCPv6 server, and the EFI DHCPv6
|
2009-08-18 09:00:38 +02:00
|
|
|
/// Protocol instance is waiting for Reply packet.
|
|
|
|
///
|
|
|
|
Dhcp6Requesting = 0x2,
|
|
|
|
///
|
|
|
|
/// A Decline packet is sent out to indicate one or more addresses of the
|
|
|
|
/// configured IA are in use by another node, and the EFI DHCPv6.
|
|
|
|
/// Protocol instance is waiting for Reply packet.
|
|
|
|
///
|
|
|
|
Dhcp6Declining = 0x3,
|
|
|
|
///
|
2018-06-27 15:11:33 +02:00
|
|
|
/// A Confirm packet is sent out to confirm the IPv6 addresses of the
|
2009-08-18 09:00:38 +02:00
|
|
|
/// configured IA, and the EFI DHCPv6 Protocol instance is waiting for Reply packet.
|
|
|
|
///
|
|
|
|
Dhcp6Confirming = 0x4,
|
|
|
|
///
|
|
|
|
/// A Release packet is sent out to release one or more IPv6 addresses of
|
|
|
|
/// the configured IA, and the EFI DHCPv6 Protocol instance is waiting for Reply packet.
|
|
|
|
///
|
|
|
|
Dhcp6Releasing = 0x5,
|
|
|
|
///
|
|
|
|
/// The DHCPv6 S.A.R.R process is completed for the configured IA.
|
|
|
|
///
|
|
|
|
Dhcp6Bound = 0x6,
|
|
|
|
///
|
|
|
|
/// A Renew packet is sent out to extend lifetime for the IPv6 addresses of
|
|
|
|
/// the configured IA, and the EFI DHCPv6 Protocol instance is waiting for Reply packet.
|
|
|
|
///
|
|
|
|
Dhcp6Renewing = 0x7,
|
|
|
|
///
|
|
|
|
/// A Rebind packet is sent out to extend lifetime for the IPv6 addresses of
|
|
|
|
/// the configured IA, and the EFI DHCPv6 Protocol instance is waiting for Reply packet.
|
|
|
|
///
|
|
|
|
Dhcp6Rebinding = 0x8
|
|
|
|
} EFI_DHCP6_STATE;
|
|
|
|
|
|
|
|
typedef enum {
|
2018-06-27 15:11:33 +02:00
|
|
|
///
|
2009-08-18 09:00:38 +02:00
|
|
|
/// A Solicit packet is about to be sent. The packet is passed to Dhcp6Callback and
|
|
|
|
/// can be modified or replaced in Dhcp6Callback.
|
|
|
|
///
|
|
|
|
Dhcp6SendSolicit = 0x0,
|
2018-06-27 15:11:33 +02:00
|
|
|
///
|
2009-08-18 09:00:38 +02:00
|
|
|
/// An Advertise packet is received and will be passed to Dhcp6Callback.
|
|
|
|
///
|
|
|
|
Dhcp6RcvdAdvertise = 0x1,
|
2018-06-27 15:11:33 +02:00
|
|
|
///
|
2009-08-18 09:00:38 +02:00
|
|
|
/// It is time for Dhcp6Callback to determine whether select the default Advertise
|
|
|
|
/// packet by RFC 3315 policy, or overwrite it by specific user policy.
|
|
|
|
///
|
|
|
|
Dhcp6SelectAdvertise = 0x2,
|
2018-06-27 15:11:33 +02:00
|
|
|
///
|
2009-08-18 09:00:38 +02:00
|
|
|
/// A Request packet is about to be sent. The packet is passed to Dhcp6Callback and
|
|
|
|
/// can be modified or replaced in Dhcp6Callback.
|
|
|
|
///
|
|
|
|
Dhcp6SendRequest = 0x3,
|
2018-06-27 15:11:33 +02:00
|
|
|
///
|
2009-08-18 09:00:38 +02:00
|
|
|
/// A Reply packet is received and will be passed to Dhcp6Callback.
|
|
|
|
///
|
|
|
|
Dhcp6RcvdReply = 0x4,
|
2018-06-27 15:11:33 +02:00
|
|
|
///
|
2009-08-18 09:00:38 +02:00
|
|
|
/// A Reconfigure packet is received and will be passed to Dhcp6Callback.
|
|
|
|
///
|
|
|
|
Dhcp6RcvdReconfigure = 0x5,
|
2018-06-27 15:11:33 +02:00
|
|
|
///
|
2009-08-18 09:00:38 +02:00
|
|
|
/// A Decline packet is about to be sent. The packet is passed to Dhcp6Callback and
|
|
|
|
/// can be modified or replaced in Dhcp6Callback.
|
|
|
|
///
|
|
|
|
Dhcp6SendDecline = 0x6,
|
2018-06-27 15:11:33 +02:00
|
|
|
///
|
2009-08-18 09:00:38 +02:00
|
|
|
/// A Confirm packet is about to be sent. The packet is passed to Dhcp6Callback and
|
|
|
|
/// can be modified or replaced in Dhcp6Callback.
|
|
|
|
///
|
|
|
|
Dhcp6SendConfirm = 0x7,
|
2018-06-27 15:11:33 +02:00
|
|
|
///
|
2009-08-18 09:00:38 +02:00
|
|
|
/// A Release packet is about to be sent. The packet is passed to Dhcp6Callback and
|
|
|
|
/// can be modified or replaced in Dhcp6Callback.
|
|
|
|
///
|
|
|
|
Dhcp6SendRelease = 0x8,
|
2018-06-27 15:11:33 +02:00
|
|
|
///
|
2009-08-18 09:00:38 +02:00
|
|
|
/// A Renew packet is about to be sent. The packet is passed to Dhcp6Callback and
|
2018-06-27 15:11:33 +02:00
|
|
|
/// can be modified or replaced in Dhcp6Callback.
|
2009-08-18 09:00:38 +02:00
|
|
|
///
|
|
|
|
Dhcp6EnterRenewing = 0x9,
|
2018-06-27 15:11:33 +02:00
|
|
|
///
|
|
|
|
/// A Rebind packet is about to be sent. The packet is passed to Dhcp6Callback and
|
2009-08-18 09:00:38 +02:00
|
|
|
/// can be modified or replaced in Dhcp6Callback.
|
|
|
|
///
|
|
|
|
Dhcp6EnterRebinding = 0xa
|
|
|
|
} EFI_DHCP6_EVENT;
|
|
|
|
|
|
|
|
///
|
|
|
|
/// An IA which carries assigned not temporary address.
|
|
|
|
///
|
|
|
|
#define EFI_DHCP6_IA_TYPE_NA 3
|
|
|
|
///
|
|
|
|
/// An IA which carries assigned temporary address.
|
|
|
|
///
|
|
|
|
#define EFI_DHCP6_IA_TYPE_TA 4
|
|
|
|
|
|
|
|
#pragma pack(1)
|
2009-09-17 04:37:58 +02:00
|
|
|
///
|
|
|
|
/// EFI_DHCP6_PACKET_OPTION
|
|
|
|
/// defines the format of the DHCPv6 option, See RFC 3315 for more information.
|
2018-06-27 15:11:33 +02:00
|
|
|
/// This data structure is used to reference option data that is packed in the DHCPv6 packet.
|
2009-09-17 04:37:58 +02:00
|
|
|
///
|
2009-08-18 09:00:38 +02:00
|
|
|
typedef struct {
|
|
|
|
///
|
2009-09-17 04:37:58 +02:00
|
|
|
/// The DHCPv6 option code, stored in network order.
|
2009-08-18 09:00:38 +02:00
|
|
|
///
|
|
|
|
UINT16 OpCode;
|
|
|
|
///
|
2009-09-17 04:37:58 +02:00
|
|
|
/// Length of the DHCPv6 option data, stored in network order.
|
|
|
|
/// From the first byte to the last byte of the Data field.
|
2009-08-18 09:00:38 +02:00
|
|
|
///
|
|
|
|
UINT16 OpLen;
|
|
|
|
///
|
2009-09-17 04:37:58 +02:00
|
|
|
/// The data for the DHCPv6 option, stored in network order.
|
2009-08-18 09:00:38 +02:00
|
|
|
///
|
|
|
|
UINT8 Data[1];
|
|
|
|
} EFI_DHCP6_PACKET_OPTION;
|
|
|
|
|
2009-09-17 04:37:58 +02:00
|
|
|
///
|
|
|
|
/// EFI_DHCP6_HEADER
|
2018-06-27 15:11:33 +02:00
|
|
|
/// defines the format of the DHCPv6 header. See RFC 3315 for more information.
|
2009-09-17 04:37:58 +02:00
|
|
|
///
|
2009-08-18 09:00:38 +02:00
|
|
|
typedef struct{
|
|
|
|
///
|
|
|
|
/// The DHCPv6 transaction ID.
|
|
|
|
///
|
|
|
|
UINT32 MessageType:8;
|
|
|
|
///
|
|
|
|
/// The DHCPv6 message type.
|
|
|
|
///
|
|
|
|
UINT32 TransactionId:24;
|
|
|
|
} EFI_DHCP6_HEADER;
|
|
|
|
|
2009-09-17 04:37:58 +02:00
|
|
|
///
|
2018-06-27 15:11:33 +02:00
|
|
|
/// EFI_DHCP6_PACKET
|
2009-09-17 04:37:58 +02:00
|
|
|
/// defines the format of the DHCPv6 packet. See RFC 3315 for more information.
|
|
|
|
///
|
2009-08-18 09:00:38 +02:00
|
|
|
typedef struct {
|
|
|
|
///
|
|
|
|
/// Size of the EFI_DHCP6_PACKET buffer.
|
|
|
|
///
|
|
|
|
UINT32 Size;
|
|
|
|
///
|
|
|
|
/// Length of the EFI_DHCP6_PACKET from the first byte of the Header field to the last
|
|
|
|
/// byte of the Option[] field.
|
|
|
|
///
|
|
|
|
UINT32 Length;
|
|
|
|
struct{
|
|
|
|
///
|
|
|
|
/// The DHCPv6 packet header.
|
|
|
|
///
|
|
|
|
EFI_DHCP6_HEADER Header;
|
|
|
|
///
|
|
|
|
/// Start of the DHCPv6 packed option data.
|
|
|
|
///
|
|
|
|
UINT8 Option[1];
|
|
|
|
} Dhcp6;
|
|
|
|
} EFI_DHCP6_PACKET;
|
|
|
|
|
|
|
|
#pragma pack()
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
///
|
|
|
|
/// Length of DUID in octects.
|
|
|
|
///
|
|
|
|
UINT16 Length;
|
|
|
|
///
|
|
|
|
/// Array of DUID octects.
|
|
|
|
///
|
|
|
|
UINT8 Duid[1];
|
|
|
|
} EFI_DHCP6_DUID;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
///
|
|
|
|
/// Initial retransmission timeout.
|
|
|
|
///
|
|
|
|
UINT32 Irt;
|
|
|
|
///
|
2018-06-27 15:11:33 +02:00
|
|
|
/// Maximum retransmission count for one packet. If Mrc is zero, there's no upper limit
|
2009-08-18 09:00:38 +02:00
|
|
|
/// for retransmission count.
|
|
|
|
///
|
|
|
|
UINT32 Mrc;
|
|
|
|
///
|
2018-06-27 15:11:33 +02:00
|
|
|
/// Maximum retransmission timeout for each retry. It's the upper bound of the number of
|
|
|
|
/// retransmission timeout. If Mrt is zero, there is no upper limit for retransmission
|
2009-08-18 09:00:38 +02:00
|
|
|
/// timeout.
|
|
|
|
///
|
|
|
|
UINT32 Mrt;
|
|
|
|
///
|
2018-06-27 15:11:33 +02:00
|
|
|
/// Maximum retransmission duration for one packet. It's the upper bound of the numbers
|
|
|
|
/// the client may retransmit a message. If Mrd is zero, there's no upper limit for
|
2009-08-18 09:00:38 +02:00
|
|
|
/// retransmission duration.
|
|
|
|
///
|
|
|
|
UINT32 Mrd;
|
|
|
|
} EFI_DHCP6_RETRANSMISSION;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
///
|
|
|
|
/// The IPv6 address.
|
|
|
|
///
|
|
|
|
EFI_IPv6_ADDRESS IpAddress;
|
|
|
|
///
|
|
|
|
/// The preferred lifetime in unit of seconds for the IPv6 address.
|
|
|
|
///
|
|
|
|
UINT32 PreferredLifetime;
|
|
|
|
///
|
|
|
|
/// The valid lifetime in unit of seconds for the IPv6 address.
|
|
|
|
///
|
|
|
|
UINT32 ValidLifetime;
|
|
|
|
} EFI_DHCP6_IA_ADDRESS;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
UINT16 Type; ///< Type for an IA.
|
|
|
|
UINT32 IaId; ///< The identifier for an IA.
|
|
|
|
} EFI_DHCP6_IA_DESCRIPTOR;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
///
|
|
|
|
/// The descriptor for IA.
|
|
|
|
///
|
|
|
|
EFI_DHCP6_IA_DESCRIPTOR Descriptor;
|
|
|
|
///
|
|
|
|
/// The state of the configured IA.
|
|
|
|
///
|
|
|
|
EFI_DHCP6_STATE State;
|
|
|
|
///
|
|
|
|
/// Pointer to the cached latest Reply packet. May be NULL if no packet is cached.
|
|
|
|
///
|
|
|
|
EFI_DHCP6_PACKET *ReplyPacket;
|
|
|
|
///
|
|
|
|
/// Number of IPv6 addresses of the configured IA.
|
|
|
|
///
|
|
|
|
UINT32 IaAddressCount;
|
|
|
|
///
|
2018-06-27 15:11:33 +02:00
|
|
|
/// List of the IPv6 addresses of the configured IA. When the state of the configured IA is
|
2009-08-18 09:00:38 +02:00
|
|
|
/// in Dhcp6Bound, Dhcp6Renewing and Dhcp6Rebinding, the IPv6 addresses are usable.
|
|
|
|
///
|
|
|
|
EFI_DHCP6_IA_ADDRESS IaAddress[1];
|
|
|
|
} EFI_DHCP6_IA;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
///
|
|
|
|
/// Pointer to the DHCPv6 unique identifier. The caller is responsible for freeing this buffer.
|
|
|
|
///
|
|
|
|
EFI_DHCP6_DUID *ClientId;
|
|
|
|
///
|
|
|
|
/// Pointer to the configured IA of current instance. The caller can free this buffer after
|
|
|
|
/// using it.
|
|
|
|
///
|
|
|
|
EFI_DHCP6_IA *Ia;
|
|
|
|
} EFI_DHCP6_MODE_DATA;
|
|
|
|
|
|
|
|
/**
|
2018-06-27 15:11:33 +02:00
|
|
|
EFI_DHCP6_CALLBACK is provided by the consumer of the EFI DHCPv6 Protocol instance to
|
2009-08-18 09:00:38 +02:00
|
|
|
intercept events that occurs in the DHCPv6 S.A.R.R process.
|
|
|
|
|
2018-06-27 15:11:33 +02:00
|
|
|
@param[in] This Pointer to the EFI_DHCP6_PROTOCOL instance that is used to configure this
|
2009-08-18 09:00:38 +02:00
|
|
|
callback function.
|
|
|
|
@param[in] Context Pointer to the context that is initialized by EFI_DHCP6_PROTOCOL.Configure().
|
|
|
|
@param[in] CurrentState The current state of the configured IA.
|
|
|
|
@param[in] Dhcp6Event The event that occurs in the current state, which usually means a state transition.
|
|
|
|
@param[in] Packet Pointer to the DHCPv6 packet that is about to be sent or has been received.
|
2018-06-27 15:11:33 +02:00
|
|
|
The EFI DHCPv6 Protocol instance is responsible for freeing the buffer.
|
|
|
|
@param[out] NewPacket Pointer to the new DHCPv6 packet to overwrite the Packet. NewPacket can not
|
|
|
|
share the buffer with Packet. If *NewPacket is not NULL, the EFI DHCPv6
|
2009-08-18 09:00:38 +02:00
|
|
|
Protocol instance is responsible for freeing the buffer.
|
|
|
|
|
|
|
|
@retval EFI_SUCCESS Tell the EFI DHCPv6 Protocol instance to continue the DHCPv6 S.A.R.R process.
|
2018-06-27 15:11:33 +02:00
|
|
|
@retval EFI_ABORTED Tell the EFI DHCPv6 Protocol instance to abort the DHCPv6 S.A.R.R process,
|
2009-08-18 09:00:38 +02:00
|
|
|
and the state of the configured IA will be transferred to Dhcp6Init.
|
|
|
|
|
|
|
|
**/
|
2018-06-27 15:11:33 +02:00
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
2010-04-17 00:40:15 +02:00
|
|
|
(EFIAPI *EFI_DHCP6_CALLBACK)(
|
2009-08-18 09:00:38 +02:00
|
|
|
IN EFI_DHCP6_PROTOCOL *This,
|
|
|
|
IN VOID *Context,
|
|
|
|
IN EFI_DHCP6_STATE CurrentState,
|
|
|
|
IN EFI_DHCP6_EVENT Dhcp6Event,
|
2018-06-27 15:11:33 +02:00
|
|
|
IN EFI_DHCP6_PACKET *Packet,
|
2009-08-18 09:00:38 +02:00
|
|
|
OUT EFI_DHCP6_PACKET **NewPacket OPTIONAL
|
|
|
|
);
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
///
|
2018-06-27 15:11:33 +02:00
|
|
|
/// The callback function is to intercept various events that occur in the DHCPv6 S.A.R.R
|
2009-08-18 09:00:38 +02:00
|
|
|
/// process. Set to NULL to ignore all those events.
|
|
|
|
///
|
|
|
|
EFI_DHCP6_CALLBACK Dhcp6Callback;
|
|
|
|
///
|
|
|
|
/// Pointer to the context that will be passed to Dhcp6Callback.
|
|
|
|
///
|
|
|
|
VOID *CallbackContext;
|
|
|
|
///
|
|
|
|
/// Number of the DHCPv6 options in the OptionList.
|
|
|
|
///
|
|
|
|
UINT32 OptionCount;
|
|
|
|
///
|
2018-06-27 15:11:33 +02:00
|
|
|
/// List of the DHCPv6 options to be included in Solicit and Request packet. The buffer
|
|
|
|
/// can be freed after EFI_DHCP6_PROTOCOL.Configure() returns. Ignored if
|
|
|
|
/// OptionCount is zero. OptionList should not contain Client Identifier option
|
|
|
|
/// and any IA option, which will be appended by EFI DHCPv6 Protocol instance
|
|
|
|
/// automatically.
|
2009-08-18 09:00:38 +02:00
|
|
|
///
|
|
|
|
EFI_DHCP6_PACKET_OPTION **OptionList;
|
|
|
|
///
|
|
|
|
/// The descriptor for the IA of the EFI DHCPv6 Protocol instance.
|
|
|
|
///
|
|
|
|
EFI_DHCP6_IA_DESCRIPTOR IaDescriptor;
|
|
|
|
///
|
2018-06-27 15:11:33 +02:00
|
|
|
/// If not NULL, the event will be signaled when any IPv6 address information of the
|
|
|
|
/// configured IA is updated, including IPv6 address, preferred lifetime and valid
|
|
|
|
/// lifetime, or the DHCPv6 S.A.R.R process fails. Otherwise, Start(),
|
|
|
|
/// renewrebind(), decline(), release() and stop() will be blocking
|
2009-08-18 09:00:38 +02:00
|
|
|
/// operations, and they will wait for the exchange process completion or failure.
|
|
|
|
///
|
|
|
|
EFI_EVENT IaInfoEvent;
|
|
|
|
///
|
2018-06-27 15:11:33 +02:00
|
|
|
/// If TRUE, the EFI DHCPv6 Protocol instance is willing to accept Reconfigure packet.
|
|
|
|
/// Otherwise, it will ignore it. Reconfigure Accept option can not be specified through
|
2009-08-18 09:00:38 +02:00
|
|
|
/// OptionList parameter.
|
|
|
|
///
|
|
|
|
BOOLEAN ReconfigureAccept;
|
|
|
|
///
|
2018-06-27 15:11:33 +02:00
|
|
|
/// If TRUE, the EFI DHCPv6 Protocol instance will send Solicit packet with Rapid
|
|
|
|
/// Commit option. Otherwise, Rapid Commit option will not be included in Solicit
|
2009-08-18 09:00:38 +02:00
|
|
|
/// packet. Rapid Commit option can not be specified through OptionList parameter.
|
|
|
|
///
|
|
|
|
BOOLEAN RapidCommit;
|
|
|
|
///
|
2018-06-27 15:11:33 +02:00
|
|
|
/// Parameter to control Solicit packet retransmission behavior. The
|
2009-08-18 09:00:38 +02:00
|
|
|
/// buffer can be freed after EFI_DHCP6_PROTOCOL.Configure() returns.
|
|
|
|
///
|
|
|
|
EFI_DHCP6_RETRANSMISSION *SolicitRetransmission;
|
|
|
|
} EFI_DHCP6_CONFIG_DATA;
|
|
|
|
|
|
|
|
/**
|
2018-06-27 15:11:33 +02:00
|
|
|
EFI_DHCP6_INFO_CALLBACK is provided by the consumer of the EFI DHCPv6 Protocol
|
2009-08-18 09:00:38 +02:00
|
|
|
instance to intercept events that occurs in the DHCPv6 Information Request exchange process.
|
|
|
|
|
2018-06-27 15:11:33 +02:00
|
|
|
@param[in] This Pointer to the EFI_DHCP6_PROTOCOL instance that is used to configure this
|
2009-08-18 09:00:38 +02:00
|
|
|
callback function.
|
|
|
|
@param[in] Context Pointer to the context that is initialized in the EFI_DHCP6_PROTOCOL.InfoRequest().
|
2018-06-27 15:11:33 +02:00
|
|
|
@param[in] Packet Pointer to Reply packet that has been received. The EFI DHCPv6 Protocol instance is
|
2009-08-18 09:00:38 +02:00
|
|
|
responsible for freeing the buffer.
|
|
|
|
|
|
|
|
@retval EFI_SUCCESS Tell the EFI DHCPv6 Protocol instance to finish Information Request exchange process.
|
|
|
|
@retval EFI_NOT_READY Tell the EFI DHCPv6 Protocol instance to continue Information Request exchange process.
|
|
|
|
@retval EFI_ABORTED Tell the EFI DHCPv6 Protocol instance to abort the Information Request exchange process.
|
|
|
|
|
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
2010-04-17 00:40:15 +02:00
|
|
|
(EFIAPI *EFI_DHCP6_INFO_CALLBACK)(
|
2009-08-18 09:00:38 +02:00
|
|
|
IN EFI_DHCP6_PROTOCOL *This,
|
|
|
|
IN VOID *Context,
|
|
|
|
IN EFI_DHCP6_PACKET *Packet
|
|
|
|
);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Retrieve the current operating mode data and configuration data for the EFI DHCPv6 Protocol instance.
|
|
|
|
|
|
|
|
@param[in] This Pointer to the EFI_DHCP6_PROTOCOL instance.
|
2018-06-27 15:11:33 +02:00
|
|
|
@param[out] Dhcp6ModeData Pointer to the DHCPv6 mode data structure. The caller is responsible for freeing this
|
2009-08-18 09:00:38 +02:00
|
|
|
structure and each reference buffer.
|
2018-06-27 15:11:33 +02:00
|
|
|
@param[out] Dhcp6ConfigData Pointer to the DHCPv6 configuration data structure. The caller is responsible for
|
2009-08-18 09:00:38 +02:00
|
|
|
freeing this structure and each reference buffer.
|
|
|
|
|
|
|
|
@retval EFI_SUCCESS The mode data was returned.
|
|
|
|
@retval EFI_ACCESS_DENIED The EFI DHCPv6 Protocol instance has not been configured when Dhcp6ConfigData is not NULL.
|
|
|
|
@retval EFI_INVALID_PARAMETER One or more following conditions are TRUE:
|
2018-06-27 15:11:33 +02:00
|
|
|
- This is NULL.
|
2009-08-18 09:00:38 +02:00
|
|
|
- Both Dhcp6ConfigData and Dhcp6ModeData are NULL.
|
|
|
|
|
|
|
|
**/
|
2018-06-27 15:11:33 +02:00
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
2009-08-18 09:00:38 +02:00
|
|
|
(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
|
|
|
|
);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Initialize or clean up the configuration data for the EFI DHCPv6 Protocol instance.
|
|
|
|
|
2018-06-27 15:11:33 +02:00
|
|
|
The Configure() function is used to initialize or clean up the configuration data of the EFI
|
2009-08-18 09:00:38 +02:00
|
|
|
DHCPv6 Protocol instance.
|
2018-06-27 15:11:33 +02:00
|
|
|
- When Dhcp6CfgData is not NULL and Configure() is called successfully, the
|
|
|
|
configuration data will be initialized in the EFI DHCPv6 Protocol instance and the state of the
|
2009-08-18 09:00:38 +02:00
|
|
|
configured IA will be transferred into Dhcp6Init.
|
2018-06-27 15:11:33 +02:00
|
|
|
- When Dhcp6CfgData is NULL and Configure() is called successfully, the configuration
|
2009-08-18 09:00:38 +02:00
|
|
|
data will be cleaned up and no IA will be associated with the EFI DHCPv6 Protocol instance.
|
|
|
|
|
2018-06-27 15:11:33 +02:00
|
|
|
To update the configuration data for an EFI DCHPv6 Protocol instance, the original data must be
|
2009-08-18 09:00:38 +02:00
|
|
|
cleaned up before setting the new configuration data.
|
|
|
|
|
|
|
|
@param[in] This Pointer to the EFI_DHCP6_PROTOCOL instance.
|
|
|
|
@param[in] Dhcp6CfgData Pointer to the DHCPv6 configuration data structure.
|
|
|
|
|
|
|
|
@retval EFI_SUCCESS The mode data was returned.
|
|
|
|
@retval EFI_INVALID_PARAMETER One or more following conditions are TRUE
|
2018-06-27 15:11:33 +02:00
|
|
|
- This is NULL.
|
2009-08-18 09:00:38 +02:00
|
|
|
- OptionCount > 0 and OptionList is NULL.
|
|
|
|
- OptionList is not NULL, and Client Id option, Reconfigure Accept option,
|
|
|
|
Rapid Commit option or any IA option is specified in the OptionList.
|
|
|
|
- IaDescriptor.Type is neither EFI_DHCP6_IA_TYPE_NA nor EFI_DHCP6_IA_TYPE_NA.
|
|
|
|
- IaDescriptor is not unique.
|
|
|
|
- Both IaInfoEvent and SolicitRetransimssion are NULL.
|
2018-06-27 15:11:33 +02:00
|
|
|
- SolicitRetransmission is not NULL, and both SolicitRetransimssion->Mrc and
|
2009-08-18 09:00:38 +02:00
|
|
|
SolicitRetransmission->Mrd are zero.
|
2018-06-27 15:11:33 +02:00
|
|
|
@retval EFI_ACCESS_DENIED The EFI DHCPv6 Protocol instance has been already configured
|
2009-08-18 09:00:38 +02:00
|
|
|
when Dhcp6CfgData is not NULL.
|
2018-06-27 15:11:33 +02:00
|
|
|
The EFI DHCPv6 Protocol instance has already started the
|
2009-08-18 09:00:38 +02:00
|
|
|
DHCPv6 S.A.R.R when Dhcp6CfgData is NULL.
|
|
|
|
@retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
|
|
|
|
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
|
|
|
|
|
|
|
|
**/
|
2018-06-27 15:11:33 +02:00
|
|
|
typedef
|
2009-08-18 09:00:38 +02:00
|
|
|
EFI_STATUS
|
|
|
|
(EFIAPI *EFI_DHCP6_CONFIGURE)(
|
|
|
|
IN EFI_DHCP6_PROTOCOL *This,
|
|
|
|
IN EFI_DHCP6_CONFIG_DATA *Dhcp6CfgData OPTIONAL
|
|
|
|
);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Start the DHCPv6 S.A.R.R process.
|
|
|
|
|
2018-06-27 15:11:33 +02:00
|
|
|
The Start() function starts the DHCPv6 S.A.R.R process. This function can be called only when
|
2009-08-18 09:00:38 +02:00
|
|
|
the state of the configured IA is in the Dhcp6Init state. If the DHCPv6 S.A.R.R process completes
|
2018-06-27 15:11:33 +02:00
|
|
|
successfully, the state of the configured IA will be transferred through Dhcp6Selecting and
|
|
|
|
Dhcp6Requesting to Dhcp6Bound state. The update of the IPv6 addresses will be notified through
|
|
|
|
EFI_DHCP6_CONFIG_DATA.IaInfoEvent. At the time when each event occurs in this process, the
|
|
|
|
callback function set by EFI_DHCP6_PROTOCOL.Configure() will be called and the user can take
|
|
|
|
this opportunity to control the process. If EFI_DHCP6_CONFIG_DATA.IaInfoEvent is NULL, the
|
2009-08-18 09:00:38 +02:00
|
|
|
Start() function call is a blocking operation. It will return after the DHCPv6 S.A.R.R process
|
|
|
|
completes or aborted by users. If the process is aborted by system or network error, the state of
|
|
|
|
the configured IA will be transferred to Dhcp6Init. The Start() function can be called again to
|
|
|
|
restart the process.
|
|
|
|
|
|
|
|
@param[in] This Pointer to the EFI_DHCP6_PROTOCOL instance.
|
|
|
|
|
2018-06-27 15:11:33 +02:00
|
|
|
@retval EFI_SUCCESS The DHCPv6 S.A.R.R process is completed and at least one IPv6
|
|
|
|
address has been bound to the configured IA when
|
|
|
|
EFI_DHCP6_CONFIG_DATA.IaInfoEvent is NULL.
|
|
|
|
The DHCPv6 S.A.R.R process is started when
|
2009-08-18 09:00:38 +02:00
|
|
|
EFI_DHCP6_CONFIG_DATA.IaInfoEvent is not NULL.
|
2009-08-19 11:08:27 +02:00
|
|
|
@retval EFI_ACCESS_DENIED The EFI DHCPv6 Child instance hasn't been configured.
|
2009-08-18 09:00:38 +02:00
|
|
|
@retval EFI_INVALID_PARAMETER This is NULL.
|
|
|
|
@retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
|
|
|
|
@retval EFI_ALREADY_STARTED The DHCPv6 S.A.R.R process has already started.
|
|
|
|
@retval EFI_DEVICE_ERROR An unexpected network or system error occurred.
|
|
|
|
@retval EFI_NO_RESPONSE The DHCPv6 S.A.R.R process failed because of no response.
|
2018-06-27 15:11:33 +02:00
|
|
|
@retval EFI_NO_MAPPING No IPv6 address has been bound to the configured IA after the
|
2009-08-18 09:00:38 +02:00
|
|
|
DHCPv6 S.A.R.R process.
|
|
|
|
@retval EFI_ABORTED The DHCPv6 S.A.R.R process aborted by user.
|
2010-02-03 05:37:11 +01:00
|
|
|
@retval EFI_NO_MEDIA There was a media error.
|
2009-08-18 09:00:38 +02:00
|
|
|
|
|
|
|
**/
|
2018-06-27 15:11:33 +02:00
|
|
|
typedef
|
2009-08-18 09:00:38 +02:00
|
|
|
EFI_STATUS
|
|
|
|
(EFIAPI *EFI_DHCP6_START)(
|
|
|
|
IN EFI_DHCP6_PROTOCOL *This
|
|
|
|
);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Request configuration information without the assignment of any IA addresses of the client.
|
|
|
|
|
|
|
|
The InfoRequest() function is used to request configuration information without the assignment
|
2018-06-27 15:11:33 +02:00
|
|
|
of any IPv6 address of the client. Client sends out Information Request packet to obtain
|
|
|
|
the required configuration information, and DHCPv6 server responds with Reply packet containing
|
|
|
|
the information for the client. The received Reply packet will be passed to the user by
|
2009-08-18 09:00:38 +02:00
|
|
|
ReplyCallback function. If user returns EFI_NOT_READY from ReplyCallback, the EFI DHCPv6
|
2018-06-27 15:11:33 +02:00
|
|
|
Protocol instance will continue to receive other Reply packets unless timeout according to
|
|
|
|
the Retransmission parameter. Otherwise, the Information Request exchange process will be
|
2009-08-18 09:00:38 +02:00
|
|
|
finished successfully if user returns EFI_SUCCESS from ReplyCallback.
|
|
|
|
|
|
|
|
@param[in] This Pointer to the EFI_DHCP6_PROTOCOL instance.
|
|
|
|
@param[in] SendClientId If TRUE, the EFI DHCPv6 Protocol instance will build Client
|
|
|
|
Identifier option and include it into Information Request
|
|
|
|
packet. If FALSE, Client Identifier option will not be included.
|
2018-06-27 15:11:33 +02:00
|
|
|
Client Identifier option can not be specified through OptionList
|
2009-08-18 09:00:38 +02:00
|
|
|
parameter.
|
|
|
|
@param[in] OptionRequest Pointer to the Option Request option in the Information Request
|
|
|
|
packet. Option Request option can not be specified through
|
|
|
|
OptionList parameter.
|
|
|
|
@param[in] OptionCount Number of options in OptionList.
|
|
|
|
@param[in] OptionList List of other DHCPv6 options. These options will be appended
|
|
|
|
to the Option Request option. The caller is responsible for
|
|
|
|
freeing this buffer. Type is defined in EFI_DHCP6_PROTOCOL.GetModeData().
|
|
|
|
@param[in] Retransmission Parameter to control Information Request packet retransmission
|
|
|
|
behavior. The buffer can be freed after EFI_DHCP6_PROTOCOL.InfoRequest()
|
|
|
|
returns.
|
|
|
|
@param[in] TimeoutEvent If not NULL, this event is signaled when the information request
|
|
|
|
exchange aborted because of no response. If NULL, the function
|
2018-06-27 15:11:33 +02:00
|
|
|
call is a blocking operation; and it will return after the
|
2009-08-18 09:00:38 +02:00
|
|
|
information-request exchange process finish or aborted by users.
|
|
|
|
@param[in] ReplyCallback The callback function is to intercept various events that occur
|
|
|
|
in the Information Request exchange process. It should not be
|
|
|
|
set to NULL.
|
|
|
|
@param[in] CallbackContext Pointer to the context that will be passed to ReplyCallback.
|
|
|
|
|
2018-06-27 15:11:33 +02:00
|
|
|
@retval EFI_SUCCESS The DHCPv6 S.A.R.R process is completed and at least one IPv6
|
|
|
|
@retval EFI_SUCCESS The DHCPv6 information request exchange process completed
|
2009-08-18 09:00:38 +02:00
|
|
|
when TimeoutEvent is NULL. Information Request packet has been
|
|
|
|
sent to DHCPv6 server when TimeoutEvent is not NULL.
|
|
|
|
@retval EFI_INVALID_PARAMETER One or more following conditions are TRUE:
|
2018-06-27 15:11:33 +02:00
|
|
|
- This is NULL.
|
2009-08-18 09:00:38 +02:00
|
|
|
- OptionRequest is NULL or OptionRequest->OpCode is invalid.
|
|
|
|
- OptionCount > 0 and OptionList is NULL.
|
2018-06-27 15:11:33 +02:00
|
|
|
- OptionList is not NULL, and Client Identify option or
|
2009-08-18 09:00:38 +02:00
|
|
|
Option Request option is specified in the OptionList.
|
|
|
|
- Retransimssion is NULL.
|
|
|
|
- Both Retransimssion->Mrc and Retransmission->Mrd are zero.
|
|
|
|
- ReplyCallback is NULL.
|
|
|
|
@retval EFI_DEVICE_ERROR An unexpected network or system error occurred.
|
2018-06-27 15:11:33 +02:00
|
|
|
@retval EFI_NO_RESPONSE The DHCPv6 information request exchange process failed
|
|
|
|
because of no response, or not all requested-options are
|
2009-08-18 09:00:38 +02:00
|
|
|
responded by DHCPv6 servers when Timeout happened.
|
|
|
|
@retval EFI_ABORTED The DHCPv6 information request exchange process aborted by user.
|
|
|
|
|
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
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,
|
2018-06-27 15:11:33 +02:00
|
|
|
IN EFI_DHCP6_RETRANSMISSION *Retransmission,
|
2009-08-18 09:00:38 +02:00
|
|
|
IN EFI_EVENT TimeoutEvent OPTIONAL,
|
|
|
|
IN EFI_DHCP6_INFO_CALLBACK ReplyCallback,
|
|
|
|
IN VOID *CallbackContext OPTIONAL
|
|
|
|
);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Manually extend the valid and preferred lifetimes for the IPv6 addresses of the configured
|
|
|
|
IA and update other configuration parameters by sending Renew or Rebind packet.
|
|
|
|
|
2018-06-27 15:11:33 +02:00
|
|
|
The RenewRebind() function is used to manually extend the valid and preferred lifetimes for the
|
|
|
|
IPv6 addresses of the configured IA and update other configuration parameters by sending Renew or
|
|
|
|
Rebind packet.
|
|
|
|
- When RebindRequest is FALSE and the state of the configured IA is Dhcp6Bound, it
|
|
|
|
will send Renew packet to the previously DHCPv6 server and transfer the state of the configured
|
|
|
|
IA to Dhcp6Renewing. If valid Reply packet received, the state transfers to Dhcp6Bound
|
|
|
|
and the valid and preferred timer restarts. If fails, the state transfers to Dhcp6Bound but the
|
|
|
|
timer continues.
|
|
|
|
- When RebindRequest is TRUE and the state of the configured IA is Dhcp6Bound, it will
|
|
|
|
send Rebind packet. If valid Reply packet received, the state transfers to Dhcp6Bound and the
|
2009-08-19 11:08:27 +02:00
|
|
|
valid and preferred timer restarts. If fails, the state transfers to Dhcp6Init and the IA can't
|
2009-08-18 09:00:38 +02:00
|
|
|
be used.
|
|
|
|
|
|
|
|
@param[in] This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
2018-06-27 15:11:33 +02:00
|
|
|
@param[in] RebindRequest If TRUE, it will send Rebind packet and enter the Dhcp6Rebinding state.
|
2009-08-18 09:00:38 +02:00
|
|
|
Otherwise, it will send Renew packet and enter the Dhcp6Renewing state.
|
|
|
|
|
2018-06-27 15:11:33 +02:00
|
|
|
@retval EFI_SUCCESS The DHCPv6 renew/rebind exchange process has completed and at
|
2009-08-18 09:00:38 +02:00
|
|
|
least one IPv6 address of the configured IA has been bound again
|
2018-06-27 15:11:33 +02:00
|
|
|
when EFI_DHCP6_CONFIG_DATA.IaInfoEvent is NULL.
|
|
|
|
The EFI DHCPv6 Protocol instance has sent Renew or Rebind packet
|
2009-08-18 09:00:38 +02:00
|
|
|
when EFI_DHCP6_CONFIG_DATA.IaInfoEvent is not NULL.
|
2009-08-19 11:08:27 +02:00
|
|
|
@retval EFI_ACCESS_DENIED The EFI DHCPv6 Child instance hasn't been configured, or the state
|
2009-08-18 09:00:38 +02:00
|
|
|
of the configured IA is not in Dhcp6Bound.
|
2018-06-27 15:11:33 +02:00
|
|
|
@retval EFI_ALREADY_STARTED The state of the configured IA has already entered Dhcp6Renewing
|
|
|
|
when RebindRequest is FALSE.
|
|
|
|
The state of the configured IA has already entered Dhcp6Rebinding
|
2009-08-18 09:00:38 +02:00
|
|
|
when RebindRequest is TRUE.
|
|
|
|
@retval EFI_INVALID_PARAMETER This is NULL.
|
|
|
|
@retval EFI_DEVICE_ERROR An unexpected system or system error occurred.
|
|
|
|
@retval EFI_NO_RESPONSE The DHCPv6 renew/rebind exchange process failed because of no response.
|
2018-06-27 15:11:33 +02:00
|
|
|
@retval EFI_NO_MAPPING No IPv6 address has been bound to the configured IA after the DHCPv6
|
2009-08-18 09:00:38 +02:00
|
|
|
renew/rebind exchange process.
|
|
|
|
@retval EFI_ABORTED The DHCPv6 renew/rebind exchange process aborted by user.
|
|
|
|
|
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
|
|
|
(EFIAPI *EFI_DHCP6_RENEW_REBIND)(
|
|
|
|
IN EFI_DHCP6_PROTOCOL *This,
|
|
|
|
IN BOOLEAN RebindRequest
|
|
|
|
);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Inform that one or more IPv6 addresses assigned by a server are already in use by
|
|
|
|
another node.
|
|
|
|
|
2018-06-27 15:11:33 +02:00
|
|
|
The Decline() function is used to manually decline the assignment of IPv6 addresses, which
|
|
|
|
have been already used by another node. If all IPv6 addresses of the configured IA are declined
|
|
|
|
through this function, the state of the IA will switch through Dhcp6Declining to Dhcp6Init,
|
|
|
|
otherwise, the state of the IA will restore to Dhcp6Bound after the declining process. The
|
|
|
|
Decline() can only be called when the IA is in Dhcp6Bound state. If the
|
|
|
|
EFI_DHCP6_CONFIG_DATA.IaInfoEvent is NULL, this function is a blocking operation. It
|
2009-08-18 09:00:38 +02:00
|
|
|
will return after the declining process finishes, or aborted by user.
|
|
|
|
|
|
|
|
@param[in] This Pointer to the EFI_DHCP4_PROTOCOL instance.
|
2018-06-27 15:11:33 +02:00
|
|
|
@param[in] AddressCount Number of declining IPv6 addresses.
|
2009-08-18 09:00:38 +02:00
|
|
|
@param[in] Addresses Pointer to the buffer stored all the declining IPv6 addresses.
|
|
|
|
|
2018-06-27 15:11:33 +02:00
|
|
|
@retval EFI_SUCCESS The DHCPv6 decline exchange process has completed when
|
2009-08-18 09:00:38 +02:00
|
|
|
EFI_DHCP6_CONFIG_DATA.IaInfoEvent is NULL.
|
2018-06-27 15:11:33 +02:00
|
|
|
The EFI DHCPv6 Protocol instance has sent Decline packet when
|
2009-08-18 09:00:38 +02:00
|
|
|
EFI_DHCP6_CONFIG_DATA.IaInfoEvent is not NULL.
|
|
|
|
@retval EFI_INVALID_PARAMETER One or more following conditions are TRUE
|
2018-06-27 15:11:33 +02:00
|
|
|
- This is NULL.
|
2009-08-18 09:00:38 +02:00
|
|
|
- AddressCount is zero or Addresses is NULL.
|
2018-06-27 15:11:33 +02:00
|
|
|
@retval EFI_NOT_FOUND Any specified IPv6 address is not correlated with the configured IA
|
2009-08-18 09:00:38 +02:00
|
|
|
for this instance.
|
2018-06-27 15:11:33 +02:00
|
|
|
@retval EFI_ACCESS_DENIED The EFI DHCPv6 Child instance hasn't been configured, or the
|
2009-08-18 09:00:38 +02:00
|
|
|
state of the configured IA is not in Dhcp6Bound.
|
|
|
|
@retval EFI_DEVICE_ERROR An unexpected network or system error occurred.
|
|
|
|
@retval EFI_ABORTED The DHCPv6 decline exchange process aborted by user.
|
|
|
|
|
|
|
|
**/
|
2018-06-27 15:11:33 +02:00
|
|
|
typedef
|
2009-08-18 09:00:38 +02:00
|
|
|
EFI_STATUS
|
|
|
|
(EFIAPI *EFI_DHCP6_DECLINE)(
|
|
|
|
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.
|
|
|
|
|
|
|
|
The Release() function is used to manually release the one or more IPv6 address. If AddressCount
|
|
|
|
is zero, it will release all IPv6 addresses of the configured IA. If all IPv6 addresses of the IA
|
2018-06-27 15:11:33 +02:00
|
|
|
are released through this function, the state of the IA will switch through Dhcp6Releasing to
|
2009-08-18 09:00:38 +02:00
|
|
|
Dhcp6Init, otherwise, the state of the IA will restore to Dhcp6Bound after the releasing process.
|
|
|
|
The Release() can only be called when the IA is in Dhcp6Bound state. If the
|
|
|
|
EFI_DHCP6_CONFIG_DATA.IaInfoEvent is NULL, the function is a blocking operation. It will return
|
2018-06-27 15:11:33 +02:00
|
|
|
after the releasing process finishes, or aborted by user.
|
2009-08-18 09:00:38 +02:00
|
|
|
|
|
|
|
@param[in] This Pointer to the EFI_DHCP6_PROTOCOL instance.
|
2018-06-27 15:11:33 +02:00
|
|
|
@param[in] AddressCount Number of releasing IPv6 addresses.
|
2009-08-18 09:00:38 +02:00
|
|
|
@param[in] Addresses Pointer to the buffer stored all the releasing IPv6 addresses.
|
|
|
|
Ignored if AddressCount is zero.
|
2018-06-27 15:11:33 +02:00
|
|
|
@retval EFI_SUCCESS The DHCPv6 release exchange process has completed when
|
2009-08-18 09:00:38 +02:00
|
|
|
EFI_DHCP6_CONFIG_DATA.IaInfoEvent is NULL.
|
2018-06-27 15:11:33 +02:00
|
|
|
The EFI DHCPv6 Protocol instance has sent Release packet when
|
2009-08-18 09:00:38 +02:00
|
|
|
EFI_DHCP6_CONFIG_DATA.IaInfoEvent is not NULL.
|
|
|
|
@retval EFI_INVALID_PARAMETER One or more following conditions are TRUE
|
2018-06-27 15:11:33 +02:00
|
|
|
- This is NULL.
|
2009-08-18 09:00:38 +02:00
|
|
|
- AddressCount is not zero or Addresses is NULL.
|
|
|
|
@retval EFI_NOT_FOUND Any specified IPv6 address is not correlated with the configured
|
|
|
|
IA for this instance.
|
2018-06-27 15:11:33 +02:00
|
|
|
@retval EFI_ACCESS_DENIED The EFI DHCPv6 Child instance hasn't been configured, or the
|
2009-08-18 09:00:38 +02:00
|
|
|
state of the configured IA is not in Dhcp6Bound.
|
|
|
|
@retval EFI_DEVICE_ERROR An unexpected network or system error occurred.
|
2018-06-27 15:11:33 +02:00
|
|
|
@retval EFI_ABORTED The DHCPv6 release exchange process aborted by user.
|
2009-08-18 09:00:38 +02:00
|
|
|
|
|
|
|
**/
|
2018-06-27 15:11:33 +02:00
|
|
|
typedef
|
2009-08-18 09:00:38 +02:00
|
|
|
EFI_STATUS
|
|
|
|
(EFIAPI *EFI_DHCP6_RELEASE)(
|
|
|
|
IN EFI_DHCP6_PROTOCOL *This,
|
|
|
|
IN UINT32 AddressCount,
|
|
|
|
IN EFI_IPv6_ADDRESS *Addresses
|
|
|
|
);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Stop the DHCPv6 S.A.R.R process.
|
|
|
|
|
|
|
|
The Stop() function is used to stop the DHCPv6 S.A.R.R process. If this function is called
|
|
|
|
successfully, all the IPv6 addresses of the configured IA will be released and the state of
|
2018-06-27 15:11:33 +02:00
|
|
|
the configured IA will be transferred to Dhcp6Init.
|
2009-08-18 09:00:38 +02:00
|
|
|
|
|
|
|
@param[in] This Pointer to the EFI_DHCP6_PROTOCOL instance.
|
|
|
|
|
|
|
|
@retval EFI_SUCCESS The DHCPv6 S.A.R.R process has been stopped when
|
|
|
|
EFI_DHCP6_CONFIG_DATA.IaInfoEvent is NULL.
|
|
|
|
The EFI DHCPv6 Protocol instance has sent Release packet if
|
2009-08-19 11:08:27 +02:00
|
|
|
need release or has been stopped if needn't, when
|
2009-08-18 09:00:38 +02:00
|
|
|
EFI_DHCP6_CONFIG_DATA.IaInfoEvent is not NULL.
|
|
|
|
@retval EFI_INVALID_PARAMETER This is NULL.
|
|
|
|
|
|
|
|
**/
|
2018-06-27 15:11:33 +02:00
|
|
|
typedef
|
2009-08-18 09:00:38 +02:00
|
|
|
EFI_STATUS
|
|
|
|
(EFIAPI *EFI_DHCP6_STOP)(
|
|
|
|
IN EFI_DHCP6_PROTOCOL *This
|
|
|
|
);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Parse the option data in the DHCPv6 packet.
|
|
|
|
|
2018-06-27 15:11:33 +02:00
|
|
|
The Parse() function is used to retrieve the option list in the DHCPv6 packet.
|
2009-08-18 09:00:38 +02:00
|
|
|
|
|
|
|
@param[in] This Pointer to the EFI_DHCP6_PROTOCOL instance.
|
|
|
|
|
|
|
|
@param[in] Packet Pointer to packet to be parsed.
|
|
|
|
@param[in] OptionCount On input, the number of entries in the PacketOptionList.
|
|
|
|
On output, the number of DHCPv6 options in the Packet.
|
|
|
|
@param[in] PacketOptionList List of pointers to the DHCPv6 options in the Packet.
|
|
|
|
The OpCode and OpLen in EFI_DHCP6_PACKET_OPTION are
|
|
|
|
both stored in network byte order.
|
|
|
|
@retval EFI_SUCCESS The packet was successfully parsed.
|
|
|
|
@retval EFI_INVALID_PARAMETER One or more following conditions are TRUE
|
|
|
|
- This is NULL.
|
|
|
|
- Packet is NULL.
|
|
|
|
- Packet is not a well-formed DHCPv6 packet.
|
|
|
|
- OptionCount is NULL.
|
|
|
|
- *OptionCount is not zero and PacketOptionList is NULL.
|
2018-06-27 15:11:33 +02:00
|
|
|
@retval EFI_BUFFER_TOO_SMALL *OptionCount is smaller than the number of options that were
|
2009-08-18 09:00:38 +02:00
|
|
|
found in the Packet.
|
|
|
|
|
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
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
|
|
|
|
);
|
|
|
|
|
|
|
|
///
|
|
|
|
/// The EFI DHCPv6 Protocol is used to get IPv6 addresses and other configuration parameters
|
|
|
|
/// from DHCPv6 servers.
|
|
|
|
///
|
|
|
|
struct _EFI_DHCP6_PROTOCOL {
|
|
|
|
EFI_DHCP6_GET_MODE_DATA GetModeData;
|
|
|
|
EFI_DHCP6_CONFIGURE Configure;
|
|
|
|
EFI_DHCP6_START Start;
|
|
|
|
EFI_DHCP6_INFO_REQUEST InfoRequest;
|
|
|
|
EFI_DHCP6_RENEW_REBIND RenewRebind;
|
|
|
|
EFI_DHCP6_DECLINE Decline;
|
|
|
|
EFI_DHCP6_RELEASE Release;
|
|
|
|
EFI_DHCP6_STOP Stop;
|
|
|
|
EFI_DHCP6_PARSE Parse;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern EFI_GUID gEfiDhcp6ProtocolGuid;
|
|
|
|
extern EFI_GUID gEfiDhcp6ServiceBindingProtocolGuid;
|
|
|
|
|
|
|
|
#endif
|