iPXE
Data Structures | Macros | Typedefs | Functions | Variables
Dns4.h File Reference

This file defines the EFI Domain Name Service Binding Protocol interface. More...

Go to the source code of this file.

Data Structures

struct  EFI_DNS4_CONFIG_DATA
 EFI_DNS4_CONFIG_DATA. More...
 
struct  EFI_DNS4_CACHE_ENTRY
 EFI_DNS4_CACHE_ENTRY. More...
 
struct  EFI_DNS4_MODE_DATA
 EFI_DNS4_MODE_DATA. More...
 
struct  DNS_HOST_TO_ADDR_DATA
 DNS_HOST_TO_ADDR_DATA. More...
 
struct  DNS_ADDR_TO_HOST_DATA
 DNS_ADDR_TO_HOST_DATA. More...
 
struct  DNS_RESOURCE_RECORD
 DNS_RESOURCE_RECORD. More...
 
struct  DNS_GENERAL_LOOKUP_DATA
 DNS_GENERAL_LOOKUP_DATA. More...
 
struct  EFI_DNS4_COMPLETION_TOKEN
 EFI_DNS4_COMPLETION_TOKEN. More...
 
struct  _EFI_DNS4_PROTOCOL
 The EFI_DNS4_Protocol provides the function to get the host name and address mapping, also provides pass through interface to retrieve arbitrary information from DNS. More...
 

Macros

#define EFI_DNS4_SERVICE_BINDING_PROTOCOL_GUID
 
#define EFI_DNS4_PROTOCOL_GUID
 

Typedefs

typedef struct _EFI_DNS4_PROTOCOL EFI_DNS4_PROTOCOL
 
typedef EFI_STATUS(EFIAPIEFI_DNS4_GET_MODE_DATA) (IN EFI_DNS4_PROTOCOL *This, OUT EFI_DNS4_MODE_DATA *DnsModeData)
 Retrieve mode data of this DNS instance. More...
 
typedef EFI_STATUS(EFIAPIEFI_DNS4_CONFIGURE) (IN EFI_DNS4_PROTOCOL *This, IN EFI_DNS4_CONFIG_DATA *DnsConfigData)
 Configure this DNS instance. More...
 
typedef EFI_STATUS(EFIAPIEFI_DNS4_HOST_NAME_TO_IP) (IN EFI_DNS4_PROTOCOL *This, IN CHAR16 *HostName, IN EFI_DNS4_COMPLETION_TOKEN *Token)
 Host name to host address translation. More...
 
typedef EFI_STATUS(EFIAPIEFI_DNS4_IP_TO_HOST_NAME) (IN EFI_DNS4_PROTOCOL *This, IN EFI_IPv4_ADDRESS IpAddress, IN EFI_DNS4_COMPLETION_TOKEN *Token)
 IPv4 address to host name translation also known as Reverse DNS lookup. More...
 
typedef EFI_STATUS(EFIAPIEFI_DNS4_GENERAL_LOOKUP) (IN EFI_DNS4_PROTOCOL *This, IN CHAR8 *QName, IN UINT16 QType, IN UINT16 QClass, IN EFI_DNS4_COMPLETION_TOKEN *Token)
 Retrieve arbitrary information from the DNS server. More...
 
typedef EFI_STATUS(EFIAPIEFI_DNS4_UPDATE_DNS_CACHE) (IN EFI_DNS4_PROTOCOL *This, IN BOOLEAN DeleteFlag, IN BOOLEAN Override, IN EFI_DNS4_CACHE_ENTRY DnsCacheEntry)
 This function is to update the DNS Cache. More...
 
typedef EFI_STATUS(EFIAPIEFI_DNS4_POLL) (IN EFI_DNS4_PROTOCOL *This)
 Polls for incoming data packets and processes outgoing data packets. More...
 
typedef EFI_STATUS(EFIAPIEFI_DNS4_CANCEL) (IN EFI_DNS4_PROTOCOL *This, IN EFI_DNS4_COMPLETION_TOKEN *Token)
 Abort an asynchronous DNS operation, including translation between IP and Host, and general look up behavior. More...
 

Functions

 FILE_LICENCE (BSD2_PATENT)
 

Variables

EFI_GUID gEfiDns4ServiceBindingProtocolGuid
 
EFI_GUID gEfiDns4ProtocolGuid
 

Detailed Description

This file defines the EFI Domain Name Service Binding Protocol interface.

It is split into the following two main sections: DNSv4 Service Binding Protocol (DNSv4SB) DNSv4 Protocol (DNSv4)

Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Revision Reference:
This Protocol is introduced in UEFI Specification 2.5

Definition in file Dns4.h.

Macro Definition Documentation

◆ EFI_DNS4_SERVICE_BINDING_PROTOCOL_GUID

#define EFI_DNS4_SERVICE_BINDING_PROTOCOL_GUID
Value:
{ \
0xb625b186, 0xe063, 0x44f7, {0x89, 0x5, 0x6a, 0x74, 0xdc, 0x6f, 0x52, 0xb4 } \
}

Definition at line 20 of file Dns4.h.

◆ EFI_DNS4_PROTOCOL_GUID

#define EFI_DNS4_PROTOCOL_GUID
Value:
{ \
0xae3d28cc, 0xe05b, 0x4fa1, {0xa0, 0x11, 0x7e, 0xb5, 0x5a, 0x3f, 0x14, 0x1 } \
}

Definition at line 25 of file Dns4.h.

Typedef Documentation

◆ EFI_DNS4_PROTOCOL

Definition at line 30 of file Dns4.h.

◆ EFI_DNS4_GET_MODE_DATA

typedef EFI_STATUS(EFIAPI * EFI_DNS4_GET_MODE_DATA) (IN EFI_DNS4_PROTOCOL *This, OUT EFI_DNS4_MODE_DATA *DnsModeData)

Retrieve mode data of this DNS instance.

This function is used to retrieve DNS mode data for this DNS instance.

Parameters
[in]ThisPointer to EFI_DNS4_PROTOCOL instance.
[out]DnsModeDataPoint to the mode data.
Return values
EFI_SUCCESSThe operation completed successfully.
EFI_NOT_STARTEDWhen DnsConfigData is queried, no configuration data is available because this instance has not been configured.
EFI_INVALID_PARAMETERThis is NULL or DnsModeData is NULL.
EFI_OUT_OF_RESOURCESFailed to allocate needed resources.

Definition at line 293 of file Dns4.h.

◆ EFI_DNS4_CONFIGURE

typedef EFI_STATUS(EFIAPI * EFI_DNS4_CONFIGURE) (IN EFI_DNS4_PROTOCOL *This, IN EFI_DNS4_CONFIG_DATA *DnsConfigData)

Configure this DNS instance.

This function is used to configure DNS mode data for this DNS instance.

Parameters
[in]ThisPointer to EFI_DNS4_PROTOCOL instance.
[in]DnsConfigDataPoint to the Configuration data.
Return values
EFI_SUCCESSThe operation completed successfully.
EFI_UNSUPPORTEDThe designated protocol is not supported.
EFI_INVALID_PARAMETERThis is NULL. The StationIp address provided in DnsConfigData is not a valid unicast. DnsServerList is NULL while DnsServerListCount is not ZERO. DnsServerListCount is ZERO while DnsServerList is not NULL
EFI_OUT_OF_RESOURCESThe DNS instance data or required space could not be allocated.
EFI_DEVICE_ERRORAn unexpected system or network error occurred. The EFI DNSv4 Protocol instance is not configured.
EFI_ALREADY_STARTEDSecond call to Configure() with DnsConfigData. To reconfigure the instance the caller must call Configure() with NULL first to return driver to unconfigured state.

Definition at line 325 of file Dns4.h.

◆ EFI_DNS4_HOST_NAME_TO_IP

typedef EFI_STATUS(EFIAPI * EFI_DNS4_HOST_NAME_TO_IP) (IN EFI_DNS4_PROTOCOL *This, IN CHAR16 *HostName, IN EFI_DNS4_COMPLETION_TOKEN *Token)

Host name to host address translation.

The HostNameToIp () function is used to translate the host name to host IP address. A type A query is used to get the one or more IP addresses for this host.

Parameters
[in]ThisPointer to EFI_DNS4_PROTOCOL instance.
[in]HostNameHost name.
[in]TokenPoint to the completion token to translate host name to host address.
Return values
EFI_SUCCESSThe operation completed successfully.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE: This is NULL. Token is NULL. Token.Event is NULL. HostName is NULL. HostName string is unsupported format.
EFI_NO_MAPPINGThere's no source address is available for use.
EFI_NOT_STARTEDThis instance has not been started.

Definition at line 352 of file Dns4.h.

◆ EFI_DNS4_IP_TO_HOST_NAME

typedef EFI_STATUS(EFIAPI * EFI_DNS4_IP_TO_HOST_NAME) (IN EFI_DNS4_PROTOCOL *This, IN EFI_IPv4_ADDRESS IpAddress, IN EFI_DNS4_COMPLETION_TOKEN *Token)

IPv4 address to host name translation also known as Reverse DNS lookup.

The IpToHostName() function is used to translate the host address to host name. A type PTR query is used to get the primary name of the host. Support of this function is optional.

Parameters
[in]ThisPointer to EFI_DNS4_PROTOCOL instance.
[in]IpAddressIp Address.
[in]TokenPoint to the completion token to translate host address to host name.
Return values
EFI_SUCCESSThe operation completed successfully.
EFI_UNSUPPORTEDThis function is not supported.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE: This is NULL. Token is NULL. Token.Event is NULL. IpAddress is not valid IP address .
EFI_NO_MAPPINGThere's no source address is available for use.
EFI_ALREADY_STARTEDThis Token is being used in another DNS session.
EFI_OUT_OF_RESOURCESFailed to allocate needed resources.

Definition at line 382 of file Dns4.h.

◆ EFI_DNS4_GENERAL_LOOKUP

typedef EFI_STATUS(EFIAPI * EFI_DNS4_GENERAL_LOOKUP) (IN EFI_DNS4_PROTOCOL *This, IN CHAR8 *QName, IN UINT16 QType, IN UINT16 QClass, IN EFI_DNS4_COMPLETION_TOKEN *Token)

Retrieve arbitrary information from the DNS server.

This GeneralLookup() function retrieves arbitrary information from the DNS. The caller supplies a QNAME, QTYPE, and QCLASS, and all of the matching RRs are returned. All RR content (e.g., TTL) was returned. The caller need parse the returned RR to get required information. The function is optional.

Parameters
[in]ThisPointer to EFI_DNS4_PROTOCOL instance.
[in]QNamePointer to Query Name.
[in]QTypeQuery Type.
[in]QClassQuery Name.
[in]TokenPoint to the completion token to retrieve arbitrary information.
Return values
EFI_SUCCESSThe operation completed successfully.
EFI_UNSUPPORTEDThis function is not supported. Or the requested QType is not supported
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE: This is NULL. Token is NULL. Token.Event is NULL. QName is NULL.
EFI_NO_MAPPINGThere's no source address is available for use.
EFI_ALREADY_STARTEDThis Token is being used in another DNS session.
EFI_OUT_OF_RESOURCESFailed to allocate needed resources.

Definition at line 417 of file Dns4.h.

◆ EFI_DNS4_UPDATE_DNS_CACHE

typedef EFI_STATUS(EFIAPI * EFI_DNS4_UPDATE_DNS_CACHE) (IN EFI_DNS4_PROTOCOL *This, IN BOOLEAN DeleteFlag, IN BOOLEAN Override, IN EFI_DNS4_CACHE_ENTRY DnsCacheEntry)

This function is to update the DNS Cache.

The UpdateDnsCache() function is used to add/delete/modify DNS cache entry. DNS cache can be normally dynamically updated after the DNS resolve succeeds. This function provided capability to manually add/delete/modify the DNS cache.

Parameters
[in]ThisPointer to EFI_DNS4_PROTOCOL instance.
[in]DeleteFlagIf FALSE, this function is to add one entry to the DNS Cahce. If TRUE, this function will delete matching DNS Cache entry.
[in]OverrideIf TRUE, the maching DNS cache entry will be overwritten with the supplied parameter. If FALSE, EFI_ACCESS_DENIED will be returned if the entry to be added is already existed.
[in]DnsCacheEntryPointer to DNS Cache entry.
Return values
EFI_SUCCESSThe operation completed successfully.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE: This is NULL. DnsCacheEntry.HostName is NULL. DnsCacheEntry.IpAddress is NULL. DnsCacheEntry.Timeout is zero.
EFI_ACCESS_DENIEDThe DNS cache entry already exists and Override is not TRUE.

Definition at line 453 of file Dns4.h.

◆ EFI_DNS4_POLL

typedef EFI_STATUS(EFIAPI * EFI_DNS4_POLL) (IN EFI_DNS4_PROTOCOL *This)

Polls for incoming data packets and processes outgoing data packets.

The Poll() function can be used by network drivers and applications to increase the rate that data packets are moved between the communications device and the transmit and receive queues. In some systems, the periodic timer event in the managed network driver may not poll the underlying communications device fast enough to transmit and/or receive all data packets without missing incoming packets or dropping outgoing packets. Drivers and applications that are experiencing packet loss should try calling the Poll() function more often.

Parameters
[in]ThisPointer to EFI_DNS4_PROTOCOL instance.
Return values
EFI_SUCCESSIncoming or outgoing data was processed.
EFI_NOT_STARTEDThis EFI DNS Protocol instance has not been started.
EFI_INVALID_PARAMETERThis is NULL.
EFI_DEVICE_ERRORAn unexpected system or network error occurred.
EFI_TIMEOUTData was dropped out of the transmit and/or receive queue. Consider increasing the polling rate.

Definition at line 483 of file Dns4.h.

◆ EFI_DNS4_CANCEL

typedef EFI_STATUS(EFIAPI * EFI_DNS4_CANCEL) (IN EFI_DNS4_PROTOCOL *This, IN EFI_DNS4_COMPLETION_TOKEN *Token)

Abort an asynchronous DNS operation, including translation between IP and Host, and general look up behavior.

The Cancel() function is used to abort a pending resolution request. After calling this function, Token.Status will be set to EFI_ABORTED and then Token.Event will be signaled. If the token is not in one of the queues, which usually means that the asynchronous operation has completed, this function will not signal the token and EFI_NOT_FOUND is returned.

Parameters
[in]ThisPointer to EFI_DNS4_PROTOCOL instance.
[in]TokenPointer to a token that has been issued by EFI_DNS4_PROTOCOL.HostNameToIp (), EFI_DNS4_PROTOCOL.IpToHostName() or EFI_DNS4_PROTOCOL.GeneralLookup(). If NULL, all pending tokens are aborted.
Return values
EFI_SUCCESSIncoming or outgoing data was processed.
EFI_NOT_STARTEDThis EFI DNS4 Protocol instance has not been started.
EFI_INVALID_PARAMETERThis is NULL.
EFI_NOT_FOUNDWhen Token is not NULL, and the asynchronous DNS operation was not found in the transmit queue. It was either completed or was not issued by HostNameToIp(), IpToHostName() or GeneralLookup().

Definition at line 514 of file Dns4.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( BSD2_PATENT  )

Variable Documentation

◆ gEfiDns4ServiceBindingProtocolGuid

EFI_GUID gEfiDns4ServiceBindingProtocolGuid

◆ gEfiDns4ProtocolGuid

EFI_GUID gEfiDns4ProtocolGuid