1cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu/** @file 2cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu This file defines the EFI DNSv6 (Domain Name Service version 6) Protocol. It is split 3cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu into the following two main sections: 4cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu DNSv6 Service Binding Protocol (DNSv6SB) 5cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu DNSv6 Protocol (DNSv6) 6cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 7cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu Copyright (c) 2015, Intel Corporation. All rights reserved.<BR> 8cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu This program and the accompanying materials 9cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu are licensed and made available under the terms and conditions of the BSD License 10cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu which accompanies this distribution. The full text of the license may be found at 11cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu http://opensource.org/licenses/bsd-license.php 12cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 13cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 14cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 15cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 16cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @par Revision Reference: 17cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu This Protocol is introduced in UEFI Specification 2.5 18cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 19cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu**/ 20cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 21cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu#ifndef __EFI_DNS6_PROTOCOL_H__ 22cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu#define __EFI_DNS6_PROTOCOL_H__ 23cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 24cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu#define EFI_DNS6_SERVICE_BINDING_PROTOCOL_GUID \ 25cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu { \ 26cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 0x7f1647c8, 0xb76e, 0x44b2, {0xa5, 0x65, 0xf7, 0xf, 0xf1, 0x9c, 0xd1, 0x9e } \ 27cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu } 28cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 29cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu#define EFI_DNS6_PROTOCOL_GUID \ 30cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu { \ 31cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 0xca37bc1f, 0xa327, 0x4ae9, {0x82, 0x8a, 0x8c, 0x40, 0xd8, 0x50, 0x6a, 0x17 } \ 32cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu } 33cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 34cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwutypedef struct _EFI_DNS6_PROTOCOL EFI_DNS6_PROTOCOL; 35cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 36cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu/// 37cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu/// EFI_DNS6_CONFIG_DATA 38cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu/// 39cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwutypedef struct { 40cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 41cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// If TRUE, enable DNS cache function for this DNS instance. If FALSE, all DNS query 42cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// will not lookup local DNS cache. 43cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 44cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu BOOLEAN EnableDnsCache; 45cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 46cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// Use the protocol number defined in 47cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// http://www.iana.org/assignments/protocol-numbers. Beside TCP/UDP, Other protocol 48cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// is invalid value. An implementation can choose to support UDP, or both TCP and UDP. 49cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 50cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu UINT8 Protocol; 51cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 52cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// The local IP address to use. Set to zero to let the underlying IPv6 53cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// driver choose a source address. If not zero it must be one of the 54cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// configured IP addresses in the underlying IPv6 driver. 55cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 56cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu EFI_IPv6_ADDRESS StationIp; 57cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 58cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// Local port number. Set to zero to use the automatically assigned port number. 59cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 60cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu UINT16 LocalPort; 61cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 62cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// Count of the DNS servers. When used with GetModeData(), 63cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// this field is the count of originally configured servers when 64cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// Configure() was called for this instance. When used with 65cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// Configure() this is the count of caller-supplied servers. If the 66cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// DnsServerListCount is zero, the DNS server configuration 67cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// will be retrieved from DHCP server automatically. 68cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 69cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu UINT32 DnsServerCount; 70cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 71cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// Pointer to DNS server list containing DnsServerListCount 72cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// entries or NULL if DnsServerListCount is 0. For Configure(), 73cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// this will be NULL when there are no caller supplied server addresses 74cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// and the DNS instance will retrieve DNS server from DHCP Server. 75cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// The provided DNS server list is recommended to be filled up in the sequence 76cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// of preference. When used with GetModeData(), the buffer containing the list 77cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// will be allocated by the driver implementing this protocol and must be 78cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// freed by the caller. When used with Configure(), the buffer 79cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// containing the list will be allocated and released by the caller. 80cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 81cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu EFI_IPv6_ADDRESS *DnsServerList; 82cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 83cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// Retry number if no response received after RetryInterval. 84cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 85cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu UINT32 RetryCount; 86cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 87cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// Minimum interval of retry is 2 second. If the retry interval is less than 2 88cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// seconds, then use the 2 seconds. 89cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu UINT32 RetryInterval; 90cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu} EFI_DNS6_CONFIG_DATA; 91cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 92cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu/// 93cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu/// EFI_DNS6_CACHE_ENTRY 94cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu/// 95cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwutypedef struct { 96cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 97cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// Host name. This should be interpreted as Unicode characters. 98cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 99cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu CHAR16 *HostName; 100cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 101cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// IP address of this host. 102cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 103cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu EFI_IPv6_ADDRESS *IpAddress; 104cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 105cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// Time in second unit that this entry will remain in DNS cache. A value of zero means 106cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// that this entry is permanent. A nonzero value will override the existing one if 107cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// this entry to be added is dynamic entry. Implementations may set its default 108cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// timeout value for the dynamically created DNS cache entry after one DNS resolve 109cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// succeeds. 110cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu UINT32 Timeout; 111cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu} EFI_DNS6_CACHE_ENTRY; 112cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 113cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu/// 114cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu/// EFI_DNS6_MODE_DATA 115cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu/// 116cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwutypedef struct { 117cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 118cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// The configuration data of this instance. 119cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 120cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu EFI_DNS6_CONFIG_DATA DnsConfigData; 121cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 122cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// Number of configured DNS6 servers. 123cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 124cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu UINT32 DnsServerCount; 125cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 126cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// Pointer to common list of addresses of all configured DNS server used by EFI_DNS6_PROTOCOL 127cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// instances. List will include DNS servers configured by this or any other EFI_DNS6_PROTOCOL 128cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// instance. The storage for this list is allocated by the driver publishing this protocol, 129cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// and must be freed by the caller. 130cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 131cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu EFI_IPv6_ADDRESS *DnsServerList; 132cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 133cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// Number of DNS Cache entries. The DNS Cache is shared among all DNS instances. 134cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 135cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu UINT32 DnsCacheCount; 136cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 137cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// Pointer to a buffer containing DnsCacheCount DNS Cache 138cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// entry structures. The storage for thislist is allocated by the driver 139cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// publishing this protocol and must be freed by caller. 140cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 141cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu EFI_DNS6_CACHE_ENTRY *DnsCacheList; 142cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu} EFI_DNS6_MODE_DATA; 143cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 144cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu/// 145cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu/// DNS6_HOST_TO_ADDR_DATA 146cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu/// 147cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwutypedef struct { 148cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 149cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// Number of the returned IP address. 150cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 151cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu UINT32 IpCount; 152cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 153cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// Pointer to the all the returned IP address. 154cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 155cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu EFI_IPv6_ADDRESS *IpList; 156cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu} DNS6_HOST_TO_ADDR_DATA; 157cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 158cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu/// 159cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu/// DNS6_ADDR_TO_HOST_DATA 160cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu/// 161cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwutypedef struct { 162cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 163cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// Pointer to the primary name for this host address. It's the caller's 164cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// responsibility to free the response memory. 165cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 166cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu CHAR16 *HostName; 167cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu} DNS6_ADDR_TO_HOST_DATA; 168cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 169cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu/// 170cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu/// DNS6_RESOURCE_RECORD 171cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu/// 172cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwutypedef struct { 173cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 174cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// The Owner name. 175cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 176cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu CHAR8 *QName; 177cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 178cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// The Type Code of this RR. 179cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 180cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu UINT16 QType; 181cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 182cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// The CLASS code of this RR. 183cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 184cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu UINT16 QClass; 185cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 186cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 32 bit integer which specify the time interval that the resource record may be 187cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// cached before the source of the information should again be consulted. Zero means 188cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// this RR cannot be cached. 189cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 190cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu UINT32 TTL; 191cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 192cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 16 big integer which specify the length of RData. 193cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 194cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu UINT16 DataLength; 195cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 196cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// A string of octets that describe the resource, the format of this information 197cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// varies according to QType and QClass difference. 198cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 199cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu CHAR8 *RData; 200cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu} DNS6_RESOURCE_RECORD; 201cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 202cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu/// 203cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu/// DNS6_GENERAL_LOOKUP_DATA 204cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu/// 205cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwutypedef struct { 206cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 207cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// Number of returned matching RRs. 208cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 209cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu UINTN RRCount; 210cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 211cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// Pointer to the all the returned matching RRs. It's caller responsibility to free 212cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// the allocated memory to hold the returned RRs. 213cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 214cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu DNS6_RESOURCE_RECORD *RRList; 215cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu} DNS6_GENERAL_LOOKUP_DATA; 216cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 217cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu/// 218cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu/// EFI_DNS6_COMPLETION_TOKEN 219cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu/// 220cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwutypedef struct { 221cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 222cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// This Event will be signaled after the Status field is updated by the EFI DNSv6 223cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// protocol driver. The type of Event must be EFI_NOTIFY_SIGNAL. 224cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 225cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu EFI_EVENT Event; 226cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 227cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// Will be set to one of the following values: 228cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// EFI_SUCCESS: The host name to address translation completed successfully. 229cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// EFI_NOT_FOUND: No matching Resource Record (RR) is found. 230cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// EFI_TIMEOUT: No DNS server reachable, or RetryCount was exhausted without 231cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// response from all specified DNS servers. 232cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// EFI_DEVICE_ERROR: An unexpected system or network error occurred. 233cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// EFI_NO_MEDIA: There was a media error. 234cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 235cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu EFI_STATUS Status; 236cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 237cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// The parameter configured through DNSv6.Configure() interface. Retry number if no 238cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// response received after RetryInterval. 239cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 240cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu UINT32 RetryCount; 241cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 242cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// The parameter configured through DNSv6.Configure() interface. Minimum interval of 243cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// retry is 2 seconds. If the retry interval is less than 2 seconds, then use the 2 244cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// seconds. 245cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 246cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu UINT32 RetryInterval; 247cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 248cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// DNSv6 completion token data 249cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 250cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu union { 251cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 252cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// When the Token is used for host name to address translation, H2AData is a pointer 253cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// to the DNS6_HOST_TO_ADDR_DATA. 254cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 255cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu DNS6_HOST_TO_ADDR_DATA *H2AData; 256cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 257cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// When the Token is used for host address to host name translation, A2HData is a 258cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// pointer to the DNS6_ADDR_TO_HOST_DATA. 259cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 260cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu DNS6_ADDR_TO_HOST_DATA *A2HData; 261cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 262cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// When the Token is used for a general lookup function, GLookupDATA is a pointer to 263cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// the DNS6_GENERAL_LOOKUP_DATA. 264cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu /// 265cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu DNS6_GENERAL_LOOKUP_DATA *GLookupData; 266cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu } RspData; 267cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu} EFI_DNS6_COMPLETION_TOKEN; 268cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 269cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu/** 270cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu Retrieve mode data of this DNS instance. 271cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 272cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu This function is used to retrieve DNS mode data for this DNS instance. 273cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 274cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @param[in] This Pointer to EFI_DNS6_PROTOCOL instance. 275cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @param[out] DnsModeData Pointer to the caller-allocated storage for the 276cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu EFI_DNS6_MODE_DATA data. 277cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 278cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_SUCCESS The operation completed successfully. 279cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_NOT_STARTED When DnsConfigData is queried, no configuration data 280cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu is available because this instance has not been 281cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu configured. 282cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_INVALID_PARAMETER This is NULL or DnsModeData is NULL. 283cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_OUT_OF_RESOURCE Failed to allocate needed resources. 284cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu**/ 285cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwutypedef 286cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwuEFI_STATUS 287cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu(EFIAPI * EFI_DNS6_GET_MODE_DATA)( 288cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu IN EFI_DNS6_PROTOCOL *This, 289cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu OUT EFI_DNS6_MODE_DATA *DnsModeData 290cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu ); 291cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 292cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu/** 293cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu Configure this DNS instance. 294cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 295cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu The Configure() function is used to set and change the configuration data for this 296cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu EFI DNSv6 Protocol driver instance. Reset the DNS instance if DnsConfigData is NULL. 297cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 298cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @param[in] This Pointer to EFI_DNS6_PROTOCOL instance. 299cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @param[in] DnsConfigData Pointer to the configuration data structure. All associated 300cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu storage to be allocated and released by caller. 301cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 302cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_SUCCESS The operation completed successfully. 303cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_INVALID_PARAMTER This is NULL. 304cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu The StationIp address provided in DnsConfigData is not a valid unicast. 305cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu DnsServerList is NULL while DnsServerList Count is not ZERO. 306cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu DnsServerList Count is ZERO while DnsServerList is not NULL. 307cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_OUT_OF_RESOURCES The DNS instance data or required space could not be allocated. 308cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. The 309cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu EFI DNSv6 Protocol instance is not configured. 310cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_UNSUPPORTED The designated protocol is not supported. 311cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_ALREADY_STARTED Second call to Configure() with DnsConfigData. To 312cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu reconfigure the instance the caller must call Configure() with 313cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu NULL first to return driver to unconfigured state. 314cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu**/ 315cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwutypedef 316cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwuEFI_STATUS 317cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu(EFIAPI * EFI_DNS6_CONFIGURE)( 318cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu IN EFI_DNS6_PROTOCOL *This, 319cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu IN EFI_DNS6_CONFIG_DATA *DnsConfigData 320cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu ); 321cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 322cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu/** 323cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu Host name to host address translation. 324cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 325cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu The HostNameToIp () function is used to translate the host name to host IP address. A 326cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu type A query is used to get the one or more IPv6 addresses for this host. 327cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 328cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @param[in] This Pointer to EFI_DNS6_PROTOCOL instance. 329cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @param[in] Hostname Host name. 330cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @param[in] Token Point to the completion token to translate host name 331cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu to host address. 332cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 333cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_SUCCESS The operation completed successfully. 334cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE: 335cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu This is NULL. 336cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu Token is NULL. 337cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu Token.Event is NULL. 338cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu HostName is NULL or buffer contained unsupported characters. 339cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_NO_MAPPING There's no source address is available for use. 340cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_ALREADY_STARTED This Token is being used in another DNS session. 341cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_NOT_STARTED This instance has not been started. 342cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_OUT_OF_RESOURCES Failed to allocate needed resources. 343cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu**/ 344cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwutypedef 345cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwuEFI_STATUS 346cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu(EFIAPI *EFI_DNS6_HOST_NAME_TO_IP) ( 347cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu IN EFI_DNS6_PROTOCOL *This, 348cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu IN CHAR16 *HostName, 349cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu IN EFI_DNS6_COMPLETION_TOKEN *Token 350cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu ); 351cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 352cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu/** 353cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu Host address to host name translation. 354cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 355cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu The IpToHostName () function is used to translate the host address to host name. A 356cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu type PTR query is used to get the primary name of the host. Implementation can choose 357cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu to support this function or not. 358cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 359cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @param[in] This Pointer to EFI_DNS6_PROTOCOL instance. 360cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @param[in] IpAddress Ip Address. 361cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @param[in] Token Point to the completion token to translate host 362cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu address to host name. 363cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 364cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_SUCCESS The operation completed successfully. 365cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_UNSUPPORTED This function is not supported. 366cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE: 367cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu This is NULL. 368cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu Token is NULL. 369cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu Token.Event is NULL. 370cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu IpAddress is not valid IP address. 371cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_NO_MAPPING There's no source address is available for use. 372cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_NOT_STARTED This instance has not been started. 373cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_OUT_OF_RESOURCES Failed to allocate needed resources. 374cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu**/ 375cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwutypedef 376cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwuEFI_STATUS 377cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu(EFIAPI *EFI_DNS6_IP_TO_HOST_NAME) ( 378cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu IN EFI_DNS6_PROTOCOL *This, 379cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu IN EFI_IPv6_ADDRESS IpAddress, 380cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu IN EFI_DNS6_COMPLETION_TOKEN *Token 381cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu ); 382cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 383cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu/** 384cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu This function provides capability to retrieve arbitrary information from the DNS 385cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu server. 386cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 387cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu This GeneralLookup() function retrieves arbitrary information from the DNS. The caller 388cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu supplies a QNAME, QTYPE, and QCLASS, and all of the matching RRs are returned. All 389cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu RR content (e.g., TTL) was returned. The caller need parse the returned RR to get 390cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu required information. The function is optional. Implementation can choose to support 391cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu it or not. 392cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 393cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @param[in] This Pointer to EFI_DNS6_PROTOCOL instance. 394cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @param[in] QName Pointer to Query Name. 395cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @param[in] QType Query Type. 396cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @param[in] QClass Query Name. 397cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @param[in] Token Point to the completion token to retrieve arbitrary 398cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu information. 399cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 400cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_SUCCESS The operation completed successfully. 401cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_UNSUPPORTED This function is not supported. Or the requested 402cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu QType is not supported 403cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE: 404cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu This is NULL. 405cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu Token is NULL. 406cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu Token.Event is NULL. 407cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu QName is NULL. 408cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_NO_MAPPING There's no source address is available for use. 409cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_NOT_STARTED This instance has not been started. 410cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_OUT_OF_RESOURCES Failed to allocate needed resources. 411cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu**/ 412cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwutypedef 413cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwuEFI_STATUS 414cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu(EFIAPI *EFI_DNS6_GENERAL_LOOKUP) ( 415cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu IN EFI_DNS6_PROTOCOL *This, 416cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu IN CHAR8 *QName, 417cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu IN UINT16 QType, 418cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu IN UINT16 QClass, 419cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu IN EFI_DNS6_COMPLETION_TOKEN *Token 420cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu ); 421cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 422cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu/** 423cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu This function is to update the DNS Cache. 424cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 425cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu The UpdateDnsCache() function is used to add/delete/modify DNS cache entry. DNS cache 426cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu can be normally dynamically updated after the DNS resolve succeeds. This function 427cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu provided capability to manually add/delete/modify the DNS cache. 428cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 429cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @param[in] This Pointer to EFI_DNS6_PROTOCOL instance. 430cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @param[in] DeleteFlag If FALSE, this function is to add one entry to the 431cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu DNS Cahce. If TRUE, this function will delete 432cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu matching DNS Cache entry. 433cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @param[in] Override If TRUE, the maching DNS cache entry will be 434cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu overwritten with the supplied parameter. If FALSE, 435cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu EFI_ACCESS_DENIED will be returned if the entry to 436cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu be added is already existed. 437cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @param[in] DnsCacheEntry Pointer to DNS Cache entry. 438cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 439cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_SUCCESS The operation completed successfully. 440cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE: 441cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu This is NULL. 442cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu DnsCacheEntry.HostName is NULL. 443cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu DnsCacheEntry.IpAddress is NULL. 444cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu DnsCacheEntry.Timeout is zero. 445cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_ACCESS_DENIED The DNS cache entry already exists and Override is 446cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu not TRUE. 447cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_OUT_OF_RESOURCE Failed to allocate needed resources. 448cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu**/ 449cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwutypedef 450cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwuEFI_STATUS 451cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu(EFIAPI *EFI_DNS6_UPDATE_DNS_CACHE) ( 452cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu IN EFI_DNS6_PROTOCOL *This, 453cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu IN BOOLEAN DeleteFlag, 454cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu IN BOOLEAN Override, 455cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu IN EFI_DNS6_CACHE_ENTRY DnsCacheEntry 456cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu ); 457cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 458cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu/** 459cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu Polls for incoming data packets and processes outgoing data packets. 460cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 461cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu The Poll() function can be used by network drivers and applications to increase the 462cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu rate that data packets are moved between the communications device and the transmit 463cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu and receive queues. 464cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 465cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu In some systems, the periodic timer event in the managed network driver may not poll 466cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu the underlying communications device fast enough to transmit and/or receive all data 467cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu packets without missing incoming packets or dropping outgoing packets. Drivers and 468cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu applications that are experiencing packet loss should try calling the Poll() 469cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu function more often. 470cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 471cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @param[in] This Pointer to EFI_DNS6_PROTOCOL instance. 472cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 473cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_SUCCESS Incoming or outgoing data was processed. 474cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_NOT_STARTED This EFI DNS Protocol instance has not been started. 475cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_INVALID_PARAMETER This is NULL. 476cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_NO_MAPPING There is no source address is available for use. 477cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. 478cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_TIMEOUT Data was dropped out of the transmit and/or receive 479cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu queue. Consider increasing the polling rate. 480cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu**/ 481cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwutypedef 482cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwuEFI_STATUS 483cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu(EFIAPI *EFI_DNS6_POLL) ( 484cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu IN EFI_DNS6_PROTOCOL *This 485cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu ); 486cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 487cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu/** 488cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu Abort an asynchronous DNS operation, including translation between IP and Host, and 489cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu general look up behavior. 490cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 491cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu The Cancel() function is used to abort a pending resolution request. After calling 492cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu this function, Token.Status will be set to EFI_ABORTED and then Token.Event will be 493cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu signaled. If the token is not in one of the queues, which usually means that the 494cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu asynchronous operation has completed, this function will not signal the token and 495cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu EFI_NOT_FOUND is returned. 496cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 497cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @param[in] This Pointer to EFI_DNS6_PROTOCOL instance. 498cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @param[in] Token Pointer to a token that has been issued by 499cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu EFI_DNS6_PROTOCOL.HostNameToIp (), 500cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu EFI_DNS6_PROTOCOL.IpToHostName() or 501cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu EFI_DNS6_PROTOCOL.GeneralLookup(). 502cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu If NULL, all pending tokens are aborted. 503cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 504cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_SUCCESS Incoming or outgoing data was processed. 505cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_NOT_STARTED This EFI DNS6 Protocol instance has not been started. 506cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_INVALID_PARAMETER This is NULL. 507cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_NO_MAPPING There's no source address is available for use. 508cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu @retval EFI_NOT_FOUND When Token is not NULL, and the asynchronous DNS 509cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu operation was not found in the transmit queue. It 510cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu was either completed or was not issued by 511cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu HostNameToIp(), IpToHostName() or GeneralLookup(). 512cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu**/ 513cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwutypedef 514cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwuEFI_STATUS 515cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu(EFIAPI *EFI_DNS6_CANCEL) ( 516cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu IN EFI_DNS6_PROTOCOL *This, 517cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu IN EFI_DNS6_COMPLETION_TOKEN *Token 518cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu ); 519cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 520cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu/// 521cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu/// The EFI_DNS6_PROTOCOL provides the function to get the host name and address 522cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu/// mapping, also provide pass through interface to retrieve arbitrary information from 523cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu/// DNSv6. 524cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu/// 525cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwustruct _EFI_DNS6_PROTOCOL { 526cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu EFI_DNS6_GET_MODE_DATA GetModeData; 527cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu EFI_DNS6_CONFIGURE Configure; 528cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu EFI_DNS6_HOST_NAME_TO_IP HostNameToIp; 529cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu EFI_DNS6_IP_TO_HOST_NAME IpToHostName; 530cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu EFI_DNS6_GENERAL_LOOKUP GeneralLookUp; 531cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu EFI_DNS6_UPDATE_DNS_CACHE UpdateDnsCache; 532cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu EFI_DNS6_POLL Poll; 533cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu EFI_DNS6_CANCEL Cancel; 534cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu}; 535cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 536cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwuextern EFI_GUID gEfiDns6ServiceBindingProtocolGuid; 537cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwuextern EFI_GUID gEfiDns6ProtocolGuid; 538cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu 539cff298f44cbb3d592f7673f420315f0a4499153fjiaxinwu#endif 540