From fcae1a993676997c8c21e95b7e69663683c326db Mon Sep 17 00:00:00 2001 From: Jiaxin Wu Date: Wed, 30 Dec 2015 08:10:55 +0000 Subject: NetworkPkg: Support DNS4/6 GeneralLookUp feature This patch is used to support DNS4/6 GeneralLookUp feature. Cc: Subramanian Sriram Cc: El-Haj-Mahmoud Samer Cc: Ye Ting Cc: Fu Siyuan Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu Reviewed-by: Ye Ting git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19579 6f19259b-4bc3-4df7-8a09-765794883524 --- NetworkPkg/DnsDxe/DnsImpl.h | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) (limited to 'NetworkPkg/DnsDxe/DnsImpl.h') diff --git a/NetworkPkg/DnsDxe/DnsImpl.h b/NetworkPkg/DnsDxe/DnsImpl.h index c3a889bcd5..a13355f855 100644 --- a/NetworkPkg/DnsDxe/DnsImpl.h +++ b/NetworkPkg/DnsDxe/DnsImpl.h @@ -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; @@ -567,6 +569,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. + +**/ +UINT8 * +EFIAPI +DnsFillinQNameForQueryIp ( + IN CHAR16 *HostName + ); + /** Find out whether the response is valid or invalid. @@ -658,22 +678,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 ); -- cgit v1.2.3