Copyright (c) 2015, Intel Corporation. All rights reserved.
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.
#define EFI_DNS4_PROTOCOL_GUID |
Value:
{ \ 0xae3d28cc, 0xe05b, 0x4fa1, {0xa0, 0x11, 0x7e, 0xb5, 0x5a, 0x3f, 0x14, 0x1 } \ }
#define EFI_DNS4_SERVICE_BINDING_PROTOCOL_GUID |
Value:
{ \ 0xb625b186, 0xe063, 0x44f7, {0x89, 0x5, 0x6a, 0x74, 0xdc, 0x6f, 0x52, 0xb4 } \ }
typedef IN BOOLEAN DeleteFlag |
typedef IN BOOLEAN IN BOOLEAN IN EFI_DNS4_CACHE_ENTRY DnsCacheEntry |
typedef IN EFI_DNS4_CONFIG_DATA* DnsConfigData |
typedef OUT EFI_DNS4_MODE_DATA* DnsModeData |
typedef struct _EFI_DNS4_PROTOCOL EFI_DNS4_PROTOCOL |
typedef IN EFI_IPv4_ADDRESS IpAddress |
typedef IN EFI_DNS4_COMPLETION_TOKEN* Token |
typedef EFI_STATUS | ( | EFIAPI * | EFI_DNS4_CANCEL | ) |
Retrieve mode data of this DNS instance.
This function is used to retrieve DNS mode data for this DNS instance.
[in] | This | Pointer to EFI_DNS4_PROTOCOL instance. |
[out] | DnsModeData | Point to the mode data. |
EFI_SUCCESS | The operation completed successfully. | |
EFI_NOT_STARTED | When DnsConfigData is queried, no configuration data is available because this instance has not been configured. | |
EFI_INVALID_PARAMETER | This is NULL or DnsModeData is NULL. | |
EFI_OUT_OF_RESOURCES | Failed to allocate needed resources. |
This function is used to configure DNS mode data for this DNS instance.
[in] | This | Pointer to EFI_DNS4_PROTOCOL instance. |
[in] | DnsConfigData | Point to the Configuration data. |
EFI_SUCCESS | The operation completed successfully. | |
EFI_UNSUPPORTED | The designated protocol is not supported. | |
EFI_INVALID_PARAMTER | Thisis 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_RESOURCES | The DNS instance data or required space could not be allocated. | |
EFI_DEVICE_ERROR | An unexpected system or network error occurred. The EFI DNSv4 Protocol instance is not configured. | |
EFI_ALREADY_STARTED | Second call to Configure() with DnsConfigData. To reconfigure the instance the caller must call Configure() with NULL first to return driver to unconfigured state. |
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.
[in] | This | Pointer to EFI_DNS4_PROTOCOL instance. |
[in] | Hostname | Host name. |
[in] | Token | Point to the completion token to translate host name to host address. |
EFI_SUCCESS | The operation completed successfully. | |
EFI_INVALID_PARAMETER | One 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_MAPPING | There's no source address is available for use. | |
EFI_NOT_STARTED | This instance has not been started. |
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.
[in] | This | Pointer to EFI_DNS4_PROTOCOL instance. |
[in] | IpAddress | Ip Address. |
[in] | Token | Point to the completion token to translate host address to host name. |
EFI_SUCCESS | The operation completed successfully. | |
EFI_UNSUPPORTED | This function is not supported. | |
EFI_INVALID_PARAMETER | One 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_MAPPING | There's no source address is available for use. | |
EFI_ALREADY_STARTED | This Token is being used in another DNS session. | |
EFI_NOT_STARTED | This instance has not been started. | |
EFI_OUT_OF_RESOURCES | Failed to allocate needed resources. |
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.
[in] | This | Pointer to EFI_DNS4_PROTOCOL instance. |
[in] | QName | Pointer to Query Name. |
[in] | QType | Query Type. |
[in] | QClass | Query Name. |
[in] | Token | Point to the completion token to retrieve arbitrary information. |
EFI_SUCCESS | The operation completed successfully. | |
EFI_UNSUPPORTED | This function is not supported. Or the requested QType is not supported | |
EFI_INVALID_PARAMETER | One or more of the following conditions is TRUE: This is NULL. Token is NULL. Token.Event is NULL. QName is NULL. | |
EFI_NO_MAPPING | There's no source address is available for use. | |
EFI_ALREADY_STARTED | This Token is being used in another DNS session. | |
EFI_OUT_OF_RESOURCES | Failed to allocate needed resources. |
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.
[in] | This | Pointer to EFI_DNS4_PROTOCOL instance. |
[in] | DeleteFlag | If FALSE, this function is to add one entry to the DNS Cahce. If TRUE, this function will delete matching DNS Cache entry. |
[in] | Override | If 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] | DnsCacheEntry | Pointer to DNS Cache entry. |
EFI_SUCCESS | The operation completed successfully. | |
EFI_INVALID_PARAMETER | One 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_DENIED | The DNS cache entry already exists and Override is not TRUE. |
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.
[in] | This | Pointer to EFI_DNS4_PROTOCOL instance. |
EFI_SUCCESS | Incoming or outgoing data was processed. | |
EFI_NOT_STARTED | This EFI DNS Protocol instance has not been started. | |
EFI_INVALID_PARAMETER | This is NULL. | |
EFI_DEVICE_ERROR | An unexpected system or network error occurred. | |
EFI_TIMEOUT | Data was dropped out of the transmit and/or receive queue. Consider increasing the polling rate. |
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.
[in] | This | Pointer to EFI_DNS4_PROTOCOL instance. |
[in] | Token | Pointer 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. |
EFI_SUCCESS | Incoming or outgoing data was processed. | |
EFI_NOT_STARTED | This EFI DNS4 Protocol instance has not been started. | |
EFI_INVALID_PARAMETER | This is NULL. | |
EFI_NOT_FOUND | When 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(). |