X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=NetworkPkg%2FDnsDxe%2FDnsImpl.h;h=72b85cb111844335560c9104487e410c7c5d817d;hb=a74f05d972c816dde1262ffb75e3512075f7aff8;hp=c3a889bcd51534b8dc900a0e1b1283c80d97dc67;hpb=99c048ef4aca44589d519946ee6a6c890ad9123b;p=mirror_edk2.git diff --git a/NetworkPkg/DnsDxe/DnsImpl.h b/NetworkPkg/DnsDxe/DnsImpl.h index c3a889bcd5..72b85cb111 100644 --- a/NetworkPkg/DnsDxe/DnsImpl.h +++ b/NetworkPkg/DnsDxe/DnsImpl.h @@ -1,7 +1,7 @@ /** @file DnsDxe support functions implementation. -Copyright (c) 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2015 - 2016, 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 @@ -119,6 +119,7 @@ typedef struct { UINT32 PacketToLive; CHAR16 *QueryHostName; EFI_IPv4_ADDRESS QueryIpAddress; + BOOLEAN GeneralLookUp; EFI_DNS4_COMPLETION_TOKEN *Token; } DNS4_TOKEN_ENTRY; @@ -126,6 +127,7 @@ typedef struct { UINT32 PacketToLive; CHAR16 *QueryHostName; EFI_IPv6_ADDRESS QueryIpAddress; + BOOLEAN GeneralLookUp; EFI_DNS6_COMPLETION_TOKEN *Token; } DNS6_TOKEN_ENTRY; @@ -174,19 +176,6 @@ typedef struct { UINT16 DataLength; } DNS_ANSWER_SECTION; -#define DNS_TYPE_A 1 -#define DNS_TYPE_NS 2 -#define DNS_TYPE_CNAME 5 -#define DNS_TYPE_PTR 12 -#define DNS_TYPE_HINFO 13 -#define DNS_TYPE_MX 15 -#define DNS_TYPE_AAAA 28 -#define DNS_TYPE_SRV_RR 33 -#define DNS_TYPE_AXFR 252 -#define DNS_TYPE_ANY 255 - -#define DNS_CLASS_INET 1 - #define DNS4_DOMAIN L"in-addr.arpa" #define DNS6_DOMAIN L"IP6.ARPA" @@ -567,6 +556,24 @@ AddDns6ServerIp ( IN EFI_IPv6_ADDRESS ServerIp ); +/** + Fill QName for IP querying. QName is a domain name represented as + a sequence of labels, where each label consists of a length octet + followed by that number of octets. The domain name terminates with + the zero length octet for the null label of the root. + + @param HostName Queried HostName + + @retval NULL Failed to fill QName. + @return QName filled successfully. + +**/ +CHAR8 * +EFIAPI +DnsFillinQNameForQueryIp ( + IN CHAR16 *HostName + ); + /** Find out whether the response is valid or invalid. @@ -658,22 +665,24 @@ DoDnsQuery ( ); /** - Construct the Packet to query Ip. + Construct the Packet according query section. @param Instance The DNS instance - @param HostName Queried HostName - @param Type DNS query Type - @param Packet The packet for querying Ip + @param QueryName Queried Name + @param Type Queried Type + @param Class Queried Class + @param Packet The packet for query @retval EFI_SUCCESS The packet is constructed. @retval Others Failed to construct the Packet. **/ EFI_STATUS -ConstructDNSQueryIp ( +ConstructDNSQuery ( IN DNS_INSTANCE *Instance, - IN CHAR16 *HostName, + IN CHAR8 *QueryName, IN UINT16 Type, + IN UINT16 Class, OUT NET_BUF **Packet );