NetworkPkg: Support DNS4/6 GeneralLookUp feature
This patch is used to support DNS4/6 GeneralLookUp feature. Cc: Subramanian Sriram <sriram-s@hpe.com> Cc: El-Haj-Mahmoud Samer <samer.el-haj-mahmoud@hpe.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19579 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -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
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user