]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/DnsDxe/DnsImpl.h
NetworkPkg: Remove DNS QType and QClass definition
[mirror_edk2.git] / NetworkPkg / DnsDxe / DnsImpl.h
index c3a889bcd51534b8dc900a0e1b1283c80d97dc67..72b85cb111844335560c9104487e410c7c5d817d 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 DnsDxe support functions implementation.\r
    \r
-Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -119,6 +119,7 @@ typedef struct {
   UINT32                     PacketToLive;\r
   CHAR16                     *QueryHostName;\r
   EFI_IPv4_ADDRESS           QueryIpAddress;\r
+  BOOLEAN                    GeneralLookUp;\r
   EFI_DNS4_COMPLETION_TOKEN  *Token;\r
 } DNS4_TOKEN_ENTRY;\r
 \r
@@ -126,6 +127,7 @@ typedef struct {
   UINT32                     PacketToLive;\r
   CHAR16                     *QueryHostName;\r
   EFI_IPv6_ADDRESS           QueryIpAddress;\r
+  BOOLEAN                    GeneralLookUp;\r
   EFI_DNS6_COMPLETION_TOKEN  *Token;\r
 } DNS6_TOKEN_ENTRY;\r
 \r
@@ -174,19 +176,6 @@ typedef struct {
   UINT16      DataLength;\r
 } DNS_ANSWER_SECTION;\r
 \r
-#define DNS_TYPE_A      1\r
-#define DNS_TYPE_NS     2\r
-#define DNS_TYPE_CNAME  5\r
-#define DNS_TYPE_PTR    12\r
-#define DNS_TYPE_HINFO  13\r
-#define DNS_TYPE_MX     15\r
-#define DNS_TYPE_AAAA   28\r
-#define DNS_TYPE_SRV_RR 33\r
-#define DNS_TYPE_AXFR   252\r
-#define DNS_TYPE_ANY    255\r
-\r
-#define DNS_CLASS_INET  1\r
-\r
 #define DNS4_DOMAIN  L"in-addr.arpa"\r
 #define DNS6_DOMAIN  L"IP6.ARPA"\r
 \r
@@ -567,6 +556,24 @@ AddDns6ServerIp (
   IN EFI_IPv6_ADDRESS           ServerIp\r
   );\r
 \r
+/**\r
+  Fill QName for IP querying. QName is a domain name represented as \r
+  a sequence of labels, where each label consists of a length octet \r
+  followed by that number of octets. The domain name terminates with \r
+  the zero length octet for the null label of the root.\r
+\r
+  @param  HostName          Queried HostName    \r
+\r
+  @retval NULL      Failed to fill QName.\r
+  @return           QName filled successfully.\r
+  \r
+**/ \r
+CHAR8 *\r
+EFIAPI\r
+DnsFillinQNameForQueryIp (\r
+  IN  CHAR16              *HostName\r
+  );\r
+\r
 /**\r
   Find out whether the response is valid or invalid.\r
 \r
@@ -658,22 +665,24 @@ DoDnsQuery (
   );\r
 \r
 /**\r
-  Construct the Packet to query Ip.\r
+  Construct the Packet according query section.\r
 \r
   @param  Instance              The DNS instance\r
-  @param  HostName              Queried HostName  \r
-  @param  Type                  DNS query Type\r
-  @param  Packet                The packet for querying Ip\r
+  @param  QueryName             Queried Name  \r
+  @param  Type                  Queried Type \r
+  @param  Class                 Queried Class \r
+  @param  Packet                The packet for query\r
 \r
   @retval EFI_SUCCESS           The packet is constructed.\r
   @retval Others                Failed to construct the Packet.\r
 \r
 **/\r
 EFI_STATUS\r
-ConstructDNSQueryIp (\r
+ConstructDNSQuery (\r
   IN  DNS_INSTANCE              *Instance,\r
-  IN  CHAR16                    *HostName,\r
+  IN  CHAR8                     *QueryName,\r
   IN  UINT16                    Type,\r
+  IN  UINT16                    Class,\r
   OUT NET_BUF                   **Packet\r
   );\r
 \r