/** @file\r
DnsDxe support functions implementation.\r
- \r
-Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
+\r
+Copyright (c) 2015 - 2018, 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
\r
typedef struct {\r
LIST_ENTRY AllCacheLink;\r
- EFI_DNS4_CACHE_ENTRY DnsCache; \r
+ EFI_DNS4_CACHE_ENTRY DnsCache;\r
} DNS4_CACHE;\r
\r
typedef struct {\r
LIST_ENTRY AllCacheLink;\r
- EFI_DNS6_CACHE_ENTRY DnsCache; \r
+ EFI_DNS6_CACHE_ENTRY DnsCache;\r
} DNS6_CACHE;\r
\r
typedef struct {\r
LIST_ENTRY AllServerLink;\r
- EFI_IPv4_ADDRESS Dns4ServerIp; \r
+ EFI_IPv4_ADDRESS Dns4ServerIp;\r
} DNS4_SERVER_IP;\r
\r
typedef struct {\r
LIST_ENTRY AllServerLink;\r
- EFI_IPv6_ADDRESS Dns6ServerIp; \r
+ EFI_IPv6_ADDRESS Dns6ServerIp;\r
} DNS6_SERVER_IP;\r
\r
typedef struct {\r
\r
@retval EFI_SUCCESS Remove TokenEntry from TokenMap sucessfully.\r
@retval EFI_NOT_FOUND TokenEntry is not found in TokenMap.\r
- \r
+\r
**/\r
EFI_STATUS\r
Dns6RemoveTokenEntry (\r
EFIAPI\r
GetDns4TokenEntry (\r
IN NET_MAP *TokensMap,\r
- IN EFI_DNS4_COMPLETION_TOKEN *Token, \r
+ IN EFI_DNS4_COMPLETION_TOKEN *Token,\r
OUT DNS4_TOKEN_ENTRY **TokenEntry\r
);\r
\r
EFIAPI\r
GetDns6TokenEntry (\r
IN NET_MAP *TokensMap,\r
- IN EFI_DNS6_COMPLETION_TOKEN *Token, \r
+ IN EFI_DNS6_COMPLETION_TOKEN *Token,\r
OUT DNS6_TOKEN_ENTRY **TokenEntry\r
);\r
\r
\r
/**\r
Poll the UDP to get the IP4 default address, which may be retrieved\r
- by DHCP. \r
- \r
- The default time out value is 5 seconds. If IP has retrieved the default address, \r
+ by DHCP.\r
+\r
+ The default time out value is 5 seconds. If IP has retrieved the default address,\r
the UDP is reconfigured.\r
\r
@param Instance The DNS instance\r
\r
/**\r
Configure the UDP.\r
- \r
+\r
@param Instance The DNS session\r
@param UdpIo The UDP_IO instance\r
- \r
+\r
@retval EFI_SUCCESS The UDP is successfully configured for the\r
session.\r
\r
\r
/**\r
Configure the UDP.\r
- \r
+\r
@param Instance The DNS session\r
@param UdpIo The UDP_IO instance\r
\r
\r
/**\r
Update Dns4 cache to shared list of caches of all DNSv4 instances.\r
- \r
+\r
@param Dns4CacheList All Dns4 cache list.\r
- @param DeleteFlag If FALSE, this function is to add one entry to the DNS Cache. \r
- If TRUE, this function will delete matching DNS Cache entry. \r
- @param Override If TRUE, the matching DNS cache entry will be overwritten with the supplied parameter. \r
+ @param DeleteFlag If FALSE, this function is to add one entry to the DNS Cache.\r
+ If TRUE, this function will delete matching DNS Cache entry.\r
+ @param Override If TRUE, the matching DNS cache entry will be overwritten with the supplied parameter.\r
If FALSE, EFI_ACCESS_DENIED will be returned if the entry to be added is already exists.\r
@param DnsCacheEntry Entry Pointer to DNS Cache entry.\r
\r
@retval EFI_SUCCESS Update Dns4 cache successfully.\r
- @retval Others Failed to update Dns4 cache. \r
- \r
+ @retval Others Failed to update Dns4 cache.\r
+\r
**/\r
EFI_STATUS\r
EFIAPI\r
);\r
\r
/**\r
- Update Dns6 cache to shared list of caches of all DNSv6 instances. \r
+ Update Dns6 cache to shared list of caches of all DNSv6 instances.\r
\r
@param Dns6CacheList All Dns6 cache list.\r
- @param DeleteFlag If FALSE, this function is to add one entry to the DNS Cache. \r
- If TRUE, this function will delete matching DNS Cache entry. \r
- @param Override If TRUE, the matching DNS cache entry will be overwritten with the supplied parameter. \r
+ @param DeleteFlag If FALSE, this function is to add one entry to the DNS Cache.\r
+ If TRUE, this function will delete matching DNS Cache entry.\r
+ @param Override If TRUE, the matching DNS cache entry will be overwritten with the supplied parameter.\r
If FALSE, EFI_ACCESS_DENIED will be returned if the entry to be added is already exists.\r
@param DnsCacheEntry Entry Pointer to DNS Cache entry.\r
- \r
+\r
@retval EFI_SUCCESS Update Dns6 cache successfully.\r
@retval Others Failed to update Dns6 cache.\r
-**/ \r
+**/\r
EFI_STATUS\r
EFIAPI\r
UpdateDns6Cache (\r
);\r
\r
/**\r
- Add Dns4 ServerIp to common list of addresses of all configured DNSv4 server. \r
+ Add Dns4 ServerIp to common list of addresses of all configured DNSv4 server.\r
\r
- @param Dns4ServerList Common list of addresses of all configured DNSv4 server. \r
- @param ServerIp DNS server Ip. \r
+ @param Dns4ServerList Common list of addresses of all configured DNSv4 server.\r
+ @param ServerIp DNS server Ip.\r
\r
@retval EFI_SUCCESS Add Dns4 ServerIp to common list successfully.\r
@retval Others Failed to add Dns4 ServerIp to common list.\r
- \r
+\r
**/\r
EFI_STATUS\r
EFIAPI\r
);\r
\r
/**\r
- Add Dns6 ServerIp to common list of addresses of all configured DNSv6 server. \r
+ Add Dns6 ServerIp to common list of addresses of all configured DNSv6 server.\r
\r
- @param Dns6ServerList Common list of addresses of all configured DNSv6 server. \r
- @param ServerIp DNS server Ip. \r
+ @param Dns6ServerList Common list of addresses of all configured DNSv6 server.\r
+ @param ServerIp DNS server Ip.\r
\r
@retval EFI_SUCCESS Add Dns6 ServerIp to common list successfully.\r
@retval Others Failed to add Dns6 ServerIp to common list.\r
- \r
-**/ \r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
AddDns6ServerIp (\r
/**\r
Find out whether the response is valid or invalid.\r
\r
- @param TokensMap All DNS transmittal Tokens entry. \r
- @param Identification Identification for queried packet. \r
+ @param TokensMap All DNS transmittal Tokens entry.\r
+ @param Identification Identification for queried packet.\r
@param Type Type for queried packet.\r
@param Class Class for queried packet.\r
@param Item Return corresponding Token entry.\r
\r
@retval TRUE The response is valid.\r
@retval FALSE The response is invalid.\r
- \r
-**/ \r
+\r
+**/\r
BOOLEAN\r
IsValidDnsResponse (\r
IN NET_MAP *TokensMap,\r
\r
@param Instance The DNS instance\r
@param RxString Received buffer.\r
- @param Completed Flag to indicate that Dns response is valid. \r
- \r
+ @param Completed Flag to indicate that Dns response is valid.\r
+\r
@retval EFI_SUCCESS Parse Dns Response successfully.\r
@retval Others Failed to parse Dns Response.\r
- \r
-**/ \r
+\r
+**/\r
EFI_STATUS\r
ParseDnsResponse (\r
IN OUT DNS_INSTANCE *Instance,\r
@param IoStatus The status of the UDP receive\r
@param Context The opaque parameter to the function.\r
\r
-**/ \r
+**/\r
VOID\r
EFIAPI\r
DnsOnPacketReceived (\r
Construct the Packet according query section.\r
\r
@param Instance The DNS instance\r
- @param QueryName Queried Name \r
- @param Type Queried Type \r
- @param Class Queried Class \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
Retransmit the packet.\r
\r
@param Instance The DNS instance\r
- @param Packet Retransmit the packet \r
+ @param Packet Retransmit the packet\r
\r
@retval EFI_SUCCESS The packet is retransmitted.\r
@retval Others Failed to retransmit.\r
@retval EFI_SUCCESS The operation completed successfully.\r
@retval EFI_UNSUPPORTED The designated protocol is not supported.\r
@retval EFI_INVALID_PARAMTER Thisis NULL.\r
- The StationIp address provided in DnsConfigData is not a \r
+ The StationIp address provided in DnsConfigData is not a\r
valid unicast.\r
DnsServerList is NULL while DnsServerListCount\r
is not ZERO.\r
allocated.\r
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred. The\r
EFI DNSv4 Protocol instance is not configured.\r
- @retval EFI_ALREADY_STARTED Second call to Configure() with DnsConfigData. To \r
- reconfigure the instance the caller must call Configure() \r
+ @retval EFI_ALREADY_STARTED Second call to Configure() with DnsConfigData. To\r
+ reconfigure the instance the caller must call Configure()\r
with NULL first to return driver to unconfigured state.\r
**/\r
EFI_STATUS\r
/**\r
IPv4 address to host name translation also known as Reverse DNS lookup.\r
\r
- The IpToHostName() function is used to translate the host address to host name. A type PTR \r
+ The IpToHostName() function is used to translate the host address to host name. A type PTR\r
query is used to get the primary name of the host. Support of this function is optional.\r
\r
@param[in] This Pointer to EFI_DNS4_PROTOCOL instance.\r
);\r
\r
/**\r
- Retrieve arbitrary information from the DNS server. \r
+ Retrieve arbitrary information from the DNS server.\r
\r
This GeneralLookup() function retrieves arbitrary information from the DNS. The caller\r
supplies a QNAME, QTYPE, and QCLASS, and all of the matching RRs are returned. All\r
Dns4GeneralLookUp (\r
IN EFI_DNS4_PROTOCOL *This,\r
IN CHAR8 *QName,\r
- IN UINT16 QType, \r
+ IN UINT16 QType,\r
IN UINT16 QClass,\r
IN EFI_DNS4_COMPLETION_TOKEN *Token\r
);\r
This function is used to retrieve DNS mode data for this DNS instance.\r
\r
@param[in] This Pointer to EFI_DNS6_PROTOCOL instance.\r
- @param[out] DnsModeData Pointer to the caller-allocated storage for the \r
+ @param[out] DnsModeData Pointer to the caller-allocated storage for the\r
EFI_DNS6_MODE_DATA data.\r
\r
@retval EFI_SUCCESS The operation completed successfully.\r
EFI DNSv6 Protocol driver instance. Reset the DNS instance if DnsConfigData is NULL.\r
\r
@param[in] This Pointer to EFI_DNS6_PROTOCOL instance.\r
- @param[in] DnsConfigData Pointer to the configuration data structure. All associated \r
+ @param[in] DnsConfigData Pointer to the configuration data structure. All associated\r
storage to be allocated and released by caller.\r
\r
@retval EFI_SUCCESS The operation completed successfully.\r
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred. The\r
EFI DNSv6 Protocol instance is not configured.\r
@retval EFI_UNSUPPORTED The designated protocol is not supported.\r
- @retval EFI_ALREADY_STARTED Second call to Configure() with DnsConfigData. To \r
- reconfigure the instance the caller must call Configure() with \r
+ @retval EFI_ALREADY_STARTED Second call to Configure() with DnsConfigData. To\r
+ reconfigure the instance the caller must call Configure() with\r
NULL first to return driver to unconfigured state.\r
**/\r
EFI_STATUS\r
Dns6GeneralLookUp (\r
IN EFI_DNS6_PROTOCOL *This,\r
IN CHAR8 *QName,\r
- IN UINT16 QType, \r
+ IN UINT16 QType,\r
IN UINT16 QClass,\r
IN EFI_DNS6_COMPLETION_TOKEN *Token\r
);\r