NetworkPkg/DnsDxe/DnsImpl.h File Reference


Data Structures

struct  DNS4_CACHE
struct  DNS6_CACHE
struct  DNS4_SERVER_IP
struct  DNS6_SERVER_IP
struct  DNS4_TOKEN_ENTRY
struct  DNS6_TOKEN_ENTRY
union  _DNS_FLAGS
struct  DNS_HEADER
struct  DNS_QUERY_SECTION
struct  DNS_ANSWER_SECTION

Defines

#define DNS_VERSION   0x00000000
#define DNS_SERVER_PORT   53
#define DNS_PROTOCOL_UDP   EFI_IP_PROTO_UDP
#define DNS_PROTOCOL_TCP   EFI_IP_PROTO_TCP
#define DNS_STATE_UNCONFIGED   0
#define DNS_STATE_CONFIGED   1
#define DNS_STATE_DESTROY   2
#define DNS_DEFAULT_TIMEOUT   2
#define DNS_DEFAULT_RETRY   3
#define DNS_DEFAULT_BLKSIZE   512
#define DNS_TIME_TO_GETMAP   5
#define DNS_FLAGS_QR_QUERY   0
#define DNS_FLAGS_QR_RESPONSE   1
#define DNS_FLAGS_OPCODE_STANDARD   0
#define DNS_FLAGS_OPCODE_INVERSE   1
#define DNS_FLAGS_OPCODE_SERVER_STATE   2
#define DNS_FLAGS_RCODE_NO_ERROR   0
#define DNS_FLAGS_RCODE_NAME_ERROR   3
#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"

Typedefs

typedef union _DNS_FLAGS DNS_FLAGS

Functions

EFI_STATUS Dns4RemoveTokenEntry (IN NET_MAP *TokenMap, IN DNS4_TOKEN_ENTRY *TokenEntry)
EFI_STATUS Dns6RemoveTokenEntry (IN NET_MAP *TokenMap, IN DNS6_TOKEN_ENTRY *TokenEntry)
EFI_STATUS EFIAPI Dns4CancelTokens (IN NET_MAP *Map, IN NET_MAP_ITEM *Item, IN VOID *Arg)
EFI_STATUS EFIAPI Dns6CancelTokens (IN NET_MAP *Map, IN NET_MAP_ITEM *Item, IN VOID *Arg)
EFI_STATUS EFIAPI GetDns4TokenEntry (IN NET_MAP *TokensMap, IN EFI_DNS4_COMPLETION_TOKEN *Token, OUT DNS4_TOKEN_ENTRY **TokenEntry)
EFI_STATUS EFIAPI GetDns6TokenEntry (IN NET_MAP *TokensMap, IN EFI_DNS6_COMPLETION_TOKEN *Token, OUT DNS6_TOKEN_ENTRY **TokenEntry)
EFI_STATUS Dns4InstanceCancelToken (IN DNS_INSTANCE *Instance, IN EFI_DNS4_COMPLETION_TOKEN *Token)
EFI_STATUS Dns6InstanceCancelToken (IN DNS_INSTANCE *Instance, IN EFI_DNS6_COMPLETION_TOKEN *Token)
VOID Dns4CleanConfigure (IN OUT EFI_DNS4_CONFIG_DATA *Config)
VOID Dns6CleanConfigure (IN OUT EFI_DNS6_CONFIG_DATA *Config)
EFI_STATUS Dns4CopyConfigure (OUT EFI_DNS4_CONFIG_DATA *Dst, IN EFI_DNS4_CONFIG_DATA *Src)
EFI_STATUS Dns6CopyConfigure (OUT EFI_DNS6_CONFIG_DATA *Dst, IN EFI_DNS6_CONFIG_DATA *Src)
VOID EFIAPI DnsDummyExtFree (IN VOID *Arg)
BOOLEAN Dns4GetMapping (IN DNS_INSTANCE *Instance, IN UDP_IO *UdpIo, IN EFI_UDP4_CONFIG_DATA *UdpCfgData)
BOOLEAN Dns6GetMapping (IN DNS_INSTANCE *Instance, IN UDP_IO *UdpIo, IN EFI_UDP6_CONFIG_DATA *UdpCfgData)
EFI_STATUS Dns4ConfigUdp (IN DNS_INSTANCE *Instance, IN UDP_IO *UdpIo)
EFI_STATUS Dns6ConfigUdp (IN DNS_INSTANCE *Instance, IN UDP_IO *UdpIo)
EFI_STATUS EFIAPI UpdateDns4Cache (IN LIST_ENTRY *Dns4CacheList, IN BOOLEAN DeleteFlag, IN BOOLEAN Override, IN EFI_DNS4_CACHE_ENTRY DnsCacheEntry)
EFI_STATUS EFIAPI UpdateDns6Cache (IN LIST_ENTRY *Dns6CacheList, IN BOOLEAN DeleteFlag, IN BOOLEAN Override, IN EFI_DNS6_CACHE_ENTRY DnsCacheEntry)
EFI_STATUS EFIAPI AddDns4ServerIp (IN LIST_ENTRY *Dns4ServerList, IN EFI_IPv4_ADDRESS ServerIp)
EFI_STATUS EFIAPI AddDns6ServerIp (IN LIST_ENTRY *Dns6ServerList, IN EFI_IPv6_ADDRESS ServerIp)
BOOLEAN IsValidDnsResponse (IN NET_MAP *TokensMap, IN UINT16 Identification, IN UINT16 Type, OUT NET_MAP_ITEM **Item)
EFI_STATUS ParseDnsResponse (IN OUT DNS_INSTANCE *Instance, IN UINT8 *RxString, OUT BOOLEAN *Completed)
VOID EFIAPI DnsOnPacketReceived (NET_BUF *Packet, UDP_END_POINT *EndPoint, EFI_STATUS IoStatus, VOID *Context)
VOID EFIAPI DnsOnPacketSent (NET_BUF *Packet, UDP_END_POINT *EndPoint, EFI_STATUS IoStatus, VOID *Context)
EFI_STATUS DoDnsQuery (IN DNS_INSTANCE *Instance, IN NET_BUF *Packet)
EFI_STATUS ConstructDNSQueryIp (IN DNS_INSTANCE *Instance, IN CHAR16 *HostName, IN UINT16 Type, OUT NET_BUF **Packet)
EFI_STATUS DnsRetransmit (IN DNS_INSTANCE *Instance, IN NET_BUF *Packet)
VOID EFIAPI DnsOnTimerRetransmit (IN EFI_EVENT Event, IN VOID *Context)
VOID EFIAPI DnsOnTimerUpdate (IN EFI_EVENT Event, IN VOID *Context)
EFI_STATUS EFIAPI Dns4GetModeData (IN EFI_DNS4_PROTOCOL *This, OUT EFI_DNS4_MODE_DATA *DnsModeData)
EFI_STATUS EFIAPI Dns4Configure (IN EFI_DNS4_PROTOCOL *This, IN EFI_DNS4_CONFIG_DATA *DnsConfigData)
EFI_STATUS EFIAPI Dns4HostNameToIp (IN EFI_DNS4_PROTOCOL *This, IN CHAR16 *HostName, IN EFI_DNS4_COMPLETION_TOKEN *Token)
EFI_STATUS EFIAPI Dns4IpToHostName (IN EFI_DNS4_PROTOCOL *This, IN EFI_IPv4_ADDRESS IpAddress, IN EFI_DNS4_COMPLETION_TOKEN *Token)
EFI_STATUS EFIAPI Dns4GeneralLookUp (IN EFI_DNS4_PROTOCOL *This, IN CHAR8 *QName, IN UINT16 QType, IN UINT16 QClass, IN EFI_DNS4_COMPLETION_TOKEN *Token)
EFI_STATUS EFIAPI Dns4UpdateDnsCache (IN EFI_DNS4_PROTOCOL *This, IN BOOLEAN DeleteFlag, IN BOOLEAN Override, IN EFI_DNS4_CACHE_ENTRY DnsCacheEntry)
EFI_STATUS EFIAPI Dns4Poll (IN EFI_DNS4_PROTOCOL *This)
EFI_STATUS EFIAPI Dns4Cancel (IN EFI_DNS4_PROTOCOL *This, IN EFI_DNS4_COMPLETION_TOKEN *Token)
EFI_STATUS EFIAPI Dns6GetModeData (IN EFI_DNS6_PROTOCOL *This, OUT EFI_DNS6_MODE_DATA *DnsModeData)
EFI_STATUS EFIAPI Dns6Configure (IN EFI_DNS6_PROTOCOL *This, IN EFI_DNS6_CONFIG_DATA *DnsConfigData)
EFI_STATUS EFIAPI Dns6HostNameToIp (IN EFI_DNS6_PROTOCOL *This, IN CHAR16 *HostName, IN EFI_DNS6_COMPLETION_TOKEN *Token)
EFI_STATUS EFIAPI Dns6IpToHostName (IN EFI_DNS6_PROTOCOL *This, IN EFI_IPv6_ADDRESS IpAddress, IN EFI_DNS6_COMPLETION_TOKEN *Token)
EFI_STATUS EFIAPI Dns6GeneralLookUp (IN EFI_DNS6_PROTOCOL *This, IN CHAR8 *QName, IN UINT16 QType, IN UINT16 QClass, IN EFI_DNS6_COMPLETION_TOKEN *Token)
EFI_STATUS EFIAPI Dns6UpdateDnsCache (IN EFI_DNS6_PROTOCOL *This, IN BOOLEAN DeleteFlag, IN BOOLEAN Override, IN EFI_DNS6_CACHE_ENTRY DnsCacheEntry)
EFI_STATUS EFIAPI Dns6Poll (IN EFI_DNS6_PROTOCOL *This)
EFI_STATUS EFIAPI Dns6Cancel (IN EFI_DNS6_PROTOCOL *This, IN EFI_DNS6_COMPLETION_TOKEN *Token)

Variables

EFI_COMPONENT_NAME_PROTOCOL gDnsComponentName
EFI_COMPONENT_NAME2_PROTOCOL gDnsComponentName2
EFI_UNICODE_STRING_TABLE * gDnsControllerNameTable
EFI_DRIVER_BINDING_PROTOCOL gDns4DriverBinding
EFI_SERVICE_BINDING_PROTOCOL mDns4ServiceBinding
EFI_DNS4_PROTOCOL mDns4Protocol
EFI_DRIVER_BINDING_PROTOCOL gDns6DriverBinding
EFI_SERVICE_BINDING_PROTOCOL mDns6ServiceBinding
EFI_DNS6_PROTOCOL mDns6Protocol

Detailed Description

DnsDxe support functions implementation.

Copyright (c) 2015, 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 http://opensource.org/licenses/bsd-license.php

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.


Define Documentation

#define DNS4_DOMAIN   L"in-addr.arpa"

#define DNS6_DOMAIN   L"IP6.ARPA"

#define DNS_CLASS_INET   1

#define DNS_DEFAULT_BLKSIZE   512

Referenced by ConstructDNSQueryIp().

#define DNS_DEFAULT_RETRY   3

#define DNS_DEFAULT_TIMEOUT   2

#define DNS_FLAGS_OPCODE_INVERSE   1

#define DNS_FLAGS_OPCODE_SERVER_STATE   2

#define DNS_FLAGS_OPCODE_STANDARD   0

Referenced by ConstructDNSQueryIp().

#define DNS_FLAGS_QR_QUERY   0

Referenced by ConstructDNSQueryIp().

#define DNS_FLAGS_QR_RESPONSE   1

Referenced by ParseDnsResponse().

#define DNS_FLAGS_RCODE_NAME_ERROR   3

#define DNS_FLAGS_RCODE_NO_ERROR   0

Referenced by ParseDnsResponse().

#define DNS_PROTOCOL_TCP   EFI_IP_PROTO_TCP

#define DNS_PROTOCOL_UDP   EFI_IP_PROTO_UDP

Referenced by Dns4Configure(), and Dns6Configure().

#define DNS_SERVER_PORT   53

Referenced by Dns4ConfigUdp(), and Dns6ConfigUdp().

#define DNS_STATE_CONFIGED   1

#define DNS_STATE_DESTROY   2

Referenced by Dns4Poll(), and Dns6Poll().

#define DNS_STATE_UNCONFIGED   0

#define DNS_TIME_TO_GETMAP   5

#define DNS_TYPE_A   1

#define DNS_TYPE_AAAA   28

#define DNS_TYPE_ANY   255

#define DNS_TYPE_AXFR   252

#define DNS_TYPE_CNAME   5

#define DNS_TYPE_HINFO   13

#define DNS_TYPE_MX   15

#define DNS_TYPE_NS   2

#define DNS_TYPE_PTR   12

#define DNS_TYPE_SRV_RR   33

#define DNS_VERSION   0x00000000


Typedef Documentation

typedef union _DNS_FLAGS DNS_FLAGS


Function Documentation

EFI_STATUS EFIAPI AddDns4ServerIp ( IN LIST_ENTRY *  Dns4ServerList,
IN EFI_IPv4_ADDRESS  ServerIp 
)

Add Dns4 ServerIp to common list of addresses of all configured DNSv4 server.

Parameters:
Dns4ServerList Common list of addresses of all configured DNSv4 server.
ServerIp DNS server Ip.
Return values:
EFI_SUCCESS Add Dns4 ServerIp to common list successfully.
Others Failed to add Dns4 ServerIp to common list.

References DNS4_SERVER_IP::AllServerLink, and DNS4_SERVER_IP::Dns4ServerIp.

Referenced by Dns4Configure().

EFI_STATUS EFIAPI AddDns6ServerIp ( IN LIST_ENTRY *  Dns6ServerList,
IN EFI_IPv6_ADDRESS  ServerIp 
)

Add Dns6 ServerIp to common list of addresses of all configured DNSv6 server.

Parameters:
Dns6ServerList Common list of addresses of all configured DNSv6 server.
ServerIp DNS server Ip.
Return values:
EFI_SUCCESS Add Dns6 ServerIp to common list successfully.
Others Failed to add Dns6 ServerIp to common list.

References DNS6_SERVER_IP::AllServerLink, and DNS6_SERVER_IP::Dns6ServerIp.

Referenced by Dns6Configure().

EFI_STATUS ConstructDNSQueryIp ( IN DNS_INSTANCE Instance,
IN CHAR16 *  HostName,
IN UINT16  Type,
OUT NET_BUF **  Packet 
)

Construct the Packet to query Ip.

Parameters:
Instance The DNS instance
HostName Queried HostName
Type DNS query Type
Packet The packet for querying Ip
Return values:
EFI_SUCCESS The packet is constructed.
Others Failed to construct the Packet.

1 for header, 1 for tail.

References DNS_HEADER::AditionalNum, DNS_HEADER::AnswersNum, DNS_HEADER::AuthorityNum, _DNS_FLAGS::Bits, DNS_QUERY_SECTION::Class, DNS_CLASS_INET, DNS_DEFAULT_BLKSIZE, DNS_FLAGS_OPCODE_STANDARD, DNS_FLAGS_QR_QUERY, DnsDummyExtFree(), DNS_HEADER::Flags, DNS_HEADER::Identification, _DNS_FLAGS::OpCode, _DNS_FLAGS::QR, DNS_HEADER::QuestionsNum, _DNS_FLAGS::RD, DNS_QUERY_SECTION::Type, and _DNS_FLAGS::Uint16.

Referenced by Dns4HostNameToIp(), and Dns6HostNameToIp().

EFI_STATUS EFIAPI Dns4Cancel ( IN EFI_DNS4_PROTOCOL *  This,
IN EFI_DNS4_COMPLETION_TOKEN *  Token 
)

This function is used to abort a pending resolution request. After calling this function, Token.Status will be set to EFI_ABORTED and then Token.

Parameters:
[in] This Pointer to EFI_DNS4_PROTOCOL instance.
[in] Token Pointer to a token that has been issued by EFI_DNS4_PROTOCOL.HostNameToIp(), EFI_DNS4_PROTOCOL.IpToHostName() or EFI_DNS4_PROTOCOL.GeneralLookup(). If NULL, all pending tokens are aborted.
Return values:
EFI_SUCCESS Incoming or outgoing data was processed.
EFI_INVALID_PARAMETER This is NULL.
EFI_NOT_STARTED This EFI DNS Protocol instance has not been started.
EFI_NOT_FOUND When Token is not NULL, and the asynchronous DNS operation was not found in the transmit queue. It was either completed or was not issued by HostNameToIp(), IpToHostName() or GeneralLookup().

References Dns4InstanceCancelToken(), DNS_INSTANCE_FROM_THIS_PROTOCOL4, DNS_STATE_UNCONFIGED, and _DNS_INSTANCE::State.

EFI_STATUS EFIAPI Dns4CancelTokens ( IN NET_MAP *  Map,
IN NET_MAP_ITEM *  Item,
IN VOID *  Arg 
)

This function cancle the token specified by Arg in the Map.

Parameters:
[in] Map Pointer to the NET_MAP.
[in] Item Pointer to the NET_MAP_ITEM.
[in] Arg Pointer to the token to be cancelled. If NULL, all the tokens in this Map will be cancelled. This parameter is optional and may be NULL.
Return values:
EFI_SUCCESS The token is cancelled if Arg is NULL, or the token is not the same as that in the Item, if Arg is not NULL.
EFI_ABORTED Arg is not NULL, and the token specified by Arg is cancelled.

References Dns4RemoveTokenEntry(), and DNS4_TOKEN_ENTRY::Token.

Referenced by Dns4InstanceCancelToken().

VOID Dns4CleanConfigure ( IN OUT EFI_DNS4_CONFIG_DATA *  Config  ) 

Free the resource related to the configure parameters.

Parameters:
Config The DNS configure data

Referenced by Dns4CopyConfigure().

EFI_STATUS Dns4ConfigUdp ( IN DNS_INSTANCE Instance,
IN UDP_IO *  UdpIo 
)

Configure the UDP.

Parameters:
Instance The DNS session
UdpIo The UDP_IO instance
Return values:
EFI_SUCCESS The UDP is successfully configured for the session.

References Dns4GetMapping(), and DNS_SERVER_PORT.

Referenced by Dns4Configure().

EFI_STATUS EFIAPI Dns4Configure ( IN EFI_DNS4_PROTOCOL *  This,
IN EFI_DNS4_CONFIG_DATA *  DnsConfigData 
)

This function is used to configure DNS configuration data for this DNS instance.

Parameters:
[in] This Pointer to EFI_DNS4_PROTOCOL instance.
[in] DnsConfigData Pointer to caller-allocated buffer containing EFI_DNS4_CONFIG_DATA structure. If NULL, the driver will reinitialize the protocol instance to the unconfigured state.
Return values:
EFI_SUCCESS The operation completed successfully.
EFI_UNSUPPORTED The designated protocol is not supported.
EFI_OUT_OF_RESOURCES Failed to allocate needed resources.
EFI_INVALID_PARAMETER This is NULL. The StationIp address provided in DnsConfigData is not a valid unicast. DnsServerList is NULL while DnsServerListCount is not equal to Zero. DnsServerListCount is Zero while DnsServerListCount is not equal to NULL.
EFI_DEVICE_ERROR An unexpected system or network error occurred. The EFI DNSv4 Protocol instance is not configured.

References AddDns4ServerIp(), _DNS_INSTANCE::Dns4CfgData, Dns4ConfigUdp(), Dns4CopyConfigure(), Dns4InstanceCancelToken(), _DNS_DRIVER_DATA::Dns4ServerList, _DNS_INSTANCE::Dns4TxTokens, DNS_INSTANCE_FROM_THIS_PROTOCOL4, DNS_PROTOCOL_UDP, DNS_STATE_CONFIGED, DNS_STATE_UNCONFIGED, GetDns4ServerFromDhcp4(), _DNS_INSTANCE::MaxRetry, mDriverData, _DNS_INSTANCE::SessionDnsServer, _DNS_INSTANCE::State, and _DNS_INSTANCE::UdpIo.

EFI_STATUS Dns4CopyConfigure ( OUT EFI_DNS4_CONFIG_DATA *  Dst,
IN EFI_DNS4_CONFIG_DATA *  Src 
)

Allocate memory for configure parameter such as timeout value for Dst, then copy the configure parameter from Src to Dst.

Parameters:
[out] Dst The destination DHCP configure data.
[in] Src The source DHCP configure data.
Return values:
EFI_OUT_OF_RESOURCES Failed to allocate memory.
EFI_SUCCESS The configure is copied.

References Dns4CleanConfigure().

Referenced by Dns4Configure(), and Dns4GetModeData().

EFI_STATUS EFIAPI Dns4GeneralLookUp ( IN EFI_DNS4_PROTOCOL *  This,
IN CHAR8 *  QName,
IN UINT16  QType,
IN UINT16  QClass,
IN EFI_DNS4_COMPLETION_TOKEN *  Token 
)

This function retrieves arbitrary information from the DNS. The caller supplies a QNAME, QTYPE, and QCLASS, and all of the matching RRs are returned. All RR content (e.g., Ttl) was returned. The caller need parse the returned RR to get required information. This function is optional.

Parameters:
[in] This Pointer to EFI_DNS4_PROTOCOL instance.
[in] QName Pointer to Query Name.
[in] QType Query Type.
[in] QClass Query Name.
[in] Token Point to the caller-allocated completion token to retrieve arbitrary information.
Return values:
EFI_SUCCESS The operation completed successfully.
EFI_OUT_OF_RESOURCES Failed to allocate needed resources.
EFI_INVALID_PARAMETER This is NULL. Token is NULL. Token.Event is NULL. QName is NULL.
EFI_NO_MAPPING There's no source address is available for use.
EFI_ALREADY_STARTED This Token is being used in another DNS session.
EFI_UNSUPPORTED This function is not supported. Or the requested QType is not supported

BOOLEAN Dns4GetMapping ( IN DNS_INSTANCE Instance,
IN UDP_IO *  UdpIo,
IN EFI_UDP4_CONFIG_DATA *  UdpCfgData 
)

Poll the UDP to get the IP4 default address, which may be retrieved by DHCP.

The default time out value is 5 seconds. If IP has retrieved the default address, the UDP is reconfigured.

Parameters:
Instance The DNS instance
UdpIo The UDP_IO to poll
UdpCfgData The UDP configure data to reconfigure the UDP_IO
Return values:
TRUE The default address is retrieved and UDP is reconfigured.
FALSE Some error occured.

References DNS_TIME_TO_GETMAP, and _DNS_SERVICE::TimerToGetMap.

Referenced by Dns4ConfigUdp().

EFI_STATUS EFIAPI Dns4GetModeData ( IN EFI_DNS4_PROTOCOL *  This,
OUT EFI_DNS4_MODE_DATA *  DnsModeData 
)

This function is used to retrieve DNS mode data for this DNS instance.

Parameters:
[in] This Pointer to EFI_DNS4_PROTOCOL instance.
[out] DnsModeData Pointer to the caller-allocated storage for the EFI_DNS4_MODE_DATA structure.
Return values:
EFI_SUCCESS The operation completed successfully.
EFI_NOT_STARTED When DnsConfigData is queried, no configuration data is available because this instance has not been configured.
EFI_OUT_OF_RESOURCES Failed to allocate needed resources.
EFI_INVALID_PARAMETER This is NULL or DnsModeData is NULL.

References _DNS_DRIVER_DATA::Dns4CacheList, _DNS_INSTANCE::Dns4CfgData, Dns4CopyConfigure(), DNS4_SERVER_IP::Dns4ServerIp, _DNS_DRIVER_DATA::Dns4ServerList, DNS_INSTANCE_FROM_THIS_PROTOCOL4, DNS_STATE_UNCONFIGED, DNS4_CACHE::DnsCache, mDriverData, and _DNS_INSTANCE::State.

EFI_STATUS EFIAPI Dns4HostNameToIp ( IN EFI_DNS4_PROTOCOL *  This,
IN CHAR16 *  HostName,
IN EFI_DNS4_COMPLETION_TOKEN *  Token 
)

The function is used to translate the host name to host IP address. A type A query is used to get the one or more IP addresses for this host.

Parameters:
[in] This Pointer to EFI_DNS4_PROTOCOL instance.
[in] HostName Pointer to caller-supplied buffer containing Host name to be translated. This buffer contains 16 bit characters but these are translated to ASCII for use with DNSv4 server and there is no requirement for driver to support non-ASCII Unicode characters.
[in] Token Pointer to the caller-allocated completion token to return at the completion of the process to translate host name to host address.
Return values:
EFI_SUCCESS The operation completed successfully.
EFI_OUT_OF_RESOURCES Failed to allocate needed resources.
EFI_INVALID_PARAMETER This is NULL. Token is NULL. Token.Event is.NULL HostName is NULL
EFI_NO_MAPPING There's no source address is available for use.
EFI_NOT_STARTED This instance has not been started.

References ConstructDNSQueryIp(), _DNS_DRIVER_DATA::Dns4CacheList, _DNS_INSTANCE::Dns4CfgData, _DNS_INSTANCE::Dns4TxTokens, DNS_DEFAULT_RETRY, DNS_DEFAULT_TIMEOUT, DNS_INSTANCE_FROM_THIS_PROTOCOL4, DNS_STATE_CONFIGED, DNS_TYPE_A, DNS4_CACHE::DnsCache, DoDnsQuery(), _DNS_INSTANCE::MaxRetry, mDriverData, DNS4_TOKEN_ENTRY::PacketToLive, DNS4_TOKEN_ENTRY::QueryHostName, _DNS_INSTANCE::State, and DNS4_TOKEN_ENTRY::Token.

EFI_STATUS Dns4InstanceCancelToken ( IN DNS_INSTANCE Instance,
IN EFI_DNS4_COMPLETION_TOKEN *  Token 
)

Cancel DNS4 tokens from the DNS4 instance.

Parameters:
[in] Instance Pointer to the DNS instance context data.
[in] Token Pointer to the token to be canceled. If NULL, all tokens in this instance will be cancelled. This parameter is optional and may be NULL.
Return values:
EFI_SUCCESS The Token is cancelled.
EFI_NOT_FOUND The Token is not found.

References Dns4CancelTokens(), and GetDns4TokenEntry().

Referenced by Dns4Cancel(), Dns4Configure(), and DnsDestroyInstance().

EFI_STATUS EFIAPI Dns4IpToHostName ( IN EFI_DNS4_PROTOCOL *  This,
IN EFI_IPv4_ADDRESS  IpAddress,
IN EFI_DNS4_COMPLETION_TOKEN *  Token 
)

The function is used to translate the host address to host name. A type PTR query is used to get the primary name of the host.

Parameters:
[in] This Pointer to EFI_DNS4_PROTOCOL instance.
[in] IpAddress IP address.
[in] Token Pointer to the caller-allocated completion used token to translate host address to host name.
Return values:
EFI_SUCCESS The operation completed successfully.
EFI_OUT_OF_RESOURCES Failed to allocate needed resources.
EFI_INVALID_PARAMETER This is NULL. Token is NULL. Token.Event is NULL. IpAddress is not valid IP address.
EFI_NO_MAPPING There's no source address is available for use.
EFI_NOT_STARTED This instance has not been started.
EFI_UNSUPPORTED This function is not supported.

EFI_STATUS EFIAPI Dns4Poll ( IN EFI_DNS4_PROTOCOL *  This  ) 

This function can be used by network drivers and applications to increase the rate that data packets are moved between the communications device and the transmit and receive queues. In some systems, the periodic timer event in the managed network driver may not poll the underlying communications device fast enough to transmit and/or receive all data packets without missing incoming packets or dropping outgoing packets.

Parameters:
[in] This Pointer to EFI_DNS4_PROTOCOL instance.
Return values:
EFI_SUCCESS Incoming or outgoing data was processed.
EFI_INVALID_PARAMETER This is NULL.
EFI_NOT_STARTED This EFI DNS Protocol instance has not been started.
EFI_DEVICE_ERROR An unexpected system or network error occurred.
EFI_TIMEOUT Data was dropped out of the transmit and/or receive queue. Consider increasing the polling rate.

References DNS_INSTANCE_FROM_THIS_PROTOCOL4, DNS_STATE_DESTROY, DNS_STATE_UNCONFIGED, _DNS_INSTANCE::State, and _DNS_INSTANCE::UdpIo.

EFI_STATUS Dns4RemoveTokenEntry ( IN NET_MAP *  TokenMap,
IN DNS4_TOKEN_ENTRY TokenEntry 
)

Remove TokenEntry from TokenMap.

Parameters:
[in] TokenMap All DNSv4 Token entrys.
[in] TokenEntry TokenEntry need to be removed.
Return values:
EFI_SUCCESS Remove TokenEntry from TokenMap sucessfully.
EFI_NOT_FOUND TokenEntry is not found in TokenMap.

Referenced by Dns4CancelTokens(), DnsOnTimerRetransmit(), and ParseDnsResponse().

EFI_STATUS EFIAPI Dns4UpdateDnsCache ( IN EFI_DNS4_PROTOCOL *  This,
IN BOOLEAN  DeleteFlag,
IN BOOLEAN  Override,
IN EFI_DNS4_CACHE_ENTRY  DnsCacheEntry 
)

This function is used to add/delete/modify DNS cache entry. DNS cache can be normally dynamically updated after the DNS resolve succeeds. This function provided capability to manually add/delete/modify the DNS cache.

Parameters:
[in] This Pointer to EFI_DNS4_PROTOCOL instance.
[in] DeleteFlag If FALSE, this function is to add one entry to the DNS Cache. If TRUE, this function will delete matching DNS Cache entry.
[in] Override If TRUE, the matching DNS cache entry will be overwritten with the supplied parameter. If FALSE, EFI_ACCESS_DENIED will be returned if the entry to be added is already exists.
[in] DnsCacheEntry Pointer to DNS Cache entry.
Return values:
EFI_SUCCESS The operation completed successfully.
EFI_INVALID_PARAMETER This is NULL. DnsCacheEntry.HostName is NULL. DnsCacheEntry.IpAddress is NULL. DnsCacheEntry.Timeout is zero.
EFI_ACCESS_DENIED The DNS cache entry already exists and Override is not TRUE.

References _DNS_DRIVER_DATA::Dns4CacheList, mDriverData, and UpdateDns4Cache().

EFI_STATUS EFIAPI Dns6Cancel ( IN EFI_DNS6_PROTOCOL *  This,
IN EFI_DNS6_COMPLETION_TOKEN *  Token 
)

This function is used to abort a pending resolution request. After calling this function, Token.Status will be set to EFI_ABORTED and then Token.

Parameters:
[in] This Pointer to EFI_DNS6_PROTOCOL instance.
[in] Token Pointer to a token that has been issued by EFI_DNS6_PROTOCOL.HostNameToIp(), EFI_DNS6_PROTOCOL.IpToHostName() or EFI_DNS6_PROTOCOL.GeneralLookup(). If NULL, all pending tokens are aborted.
Return values:
EFI_SUCCESS Incoming or outgoing data was processed.
EFI_INVALID_PARAMETER This is NULL.
EFI_NOT_STARTED This EFI DNS Protocol instance has not been started.
EFI_NOT_FOUND When Token is not NULL, and the asynchronous DNS operation was not found in the transmit queue. It was either completed or was not issued by HostNameToIp(), IpToHostName() or GeneralLookup().

References Dns6InstanceCancelToken(), DNS_INSTANCE_FROM_THIS_PROTOCOL6, DNS_STATE_UNCONFIGED, and _DNS_INSTANCE::State.

EFI_STATUS EFIAPI Dns6CancelTokens ( IN NET_MAP *  Map,
IN NET_MAP_ITEM *  Item,
IN VOID *  Arg 
)

This function cancle the token specified by Arg in the Map.

Parameters:
[in] Map Pointer to the NET_MAP.
[in] Item Pointer to the NET_MAP_ITEM.
[in] Arg Pointer to the token to be cancelled. If NULL, all the tokens in this Map will be cancelled. This parameter is optional and may be NULL.
Return values:
EFI_SUCCESS The token is cancelled if Arg is NULL, or the token is not the same as that in the Item, if Arg is not NULL.
EFI_ABORTED Arg is not NULL, and the token specified by Arg is cancelled.

References Dns6RemoveTokenEntry(), and DNS6_TOKEN_ENTRY::Token.

Referenced by Dns6InstanceCancelToken().

VOID Dns6CleanConfigure ( IN OUT EFI_DNS6_CONFIG_DATA *  Config  ) 

Free the resource related to the configure parameters.

Parameters:
Config The DNS configure data

Referenced by Dns6CopyConfigure().

EFI_STATUS Dns6ConfigUdp ( IN DNS_INSTANCE Instance,
IN UDP_IO *  UdpIo 
)

Configure the UDP.

Parameters:
Instance The DNS session
UdpIo The UDP_IO instance
Return values:
EFI_SUCCESS The UDP is successfully configured for the session.

References Dns6GetMapping(), and DNS_SERVER_PORT.

Referenced by Dns6Configure().

EFI_STATUS EFIAPI Dns6Configure ( IN EFI_DNS6_PROTOCOL *  This,
IN EFI_DNS6_CONFIG_DATA *  DnsConfigData 
)

The function is used to set and change the configuration data for this EFI DNSv6 Protocol driver instance. Reset the DNS instance if DnsConfigData is NULL.

Parameters:
[in] This Pointer to EFI_DNS6_PROTOCOL instance.
[in] DnsConfigData Pointer to the configuration data structure. All associated storage to be allocated and released by caller.
Return values:
EFI_SUCCESS The operation completed successfully.
EFI_UNSUPPORTED The designated protocol is not supported.
EFI_OUT_OF_RESOURCES Failed to allocate needed resources.
EFI_INVALID_PARAMETER This is NULL. The StationIp address provided in DnsConfigData is not a valid unicast. DnsServerList is NULL while DnsServerListCount is not equal to Zero. DnsServerListCount is Zero while DnsServerList is not equal to NULL.
EFI_DEVICE_ERROR An unexpected system or network error occurred. The EFI DNSv6 Protocol instance is not configured.

References AddDns6ServerIp(), _DNS_SERVICE::ControllerHandle, _DNS_INSTANCE::Dns6CfgData, Dns6ConfigUdp(), Dns6CopyConfigure(), Dns6InstanceCancelToken(), _DNS_DRIVER_DATA::Dns6ServerList, _DNS_INSTANCE::Dns6TxTokens, DNS_INSTANCE_FROM_THIS_PROTOCOL6, DNS_PROTOCOL_UDP, DNS_STATE_CONFIGED, DNS_STATE_UNCONFIGED, GetDns6ServerFromDhcp6(), _DNS_SERVICE::ImageHandle, _DNS_INSTANCE::MaxRetry, mDriverData, _DNS_INSTANCE::Service, _DNS_INSTANCE::SessionDnsServer, _DNS_INSTANCE::State, and _DNS_INSTANCE::UdpIo.

EFI_STATUS Dns6CopyConfigure ( OUT EFI_DNS6_CONFIG_DATA *  Dst,
IN EFI_DNS6_CONFIG_DATA *  Src 
)

Allocate memory for configure parameter such as timeout value for Dst, then copy the configure parameter from Src to Dst.

Parameters:
[out] Dst The destination DHCP configure data.
[in] Src The source DHCP configure data.
Return values:
EFI_OUT_OF_RESOURCES Failed to allocate memory.
EFI_SUCCESS The configure is copied.

References Dns6CleanConfigure().

Referenced by Dns6Configure(), and Dns6GetModeData().

EFI_STATUS EFIAPI Dns6GeneralLookUp ( IN EFI_DNS6_PROTOCOL *  This,
IN CHAR8 *  QName,
IN UINT16  QType,
IN UINT16  QClass,
IN EFI_DNS6_COMPLETION_TOKEN *  Token 
)

This function retrieves arbitrary information from the DNS. The caller supplies a QNAME, QTYPE, and QCLASS, and all of the matching RRs are returned. All RR content (e.g., Ttl) was returned. The caller need parse the returned RR to get required information. This function is optional.

Parameters:
[in] This Pointer to EFI_DNS6_PROTOCOL instance.
[in] QName Pointer to Query Name.
[in] QType Query Type.
[in] QClass Query Name.
[in] Token Point to the caller-allocated completion token to retrieve arbitrary information.
Return values:
EFI_SUCCESS The operation completed successfully.
EFI_OUT_OF_RESOURCES Failed to allocate needed resources.
EFI_INVALID_PARAMETER This is NULL. Token is NULL. Token.Event is NULL. QName is NULL.
EFI_NO_MAPPING There's no source address is available for use.
EFI_NOT_STARTED This instance has not been started.
EFI_UNSUPPORTED This function is not supported. Or the requested QType is not supported

BOOLEAN Dns6GetMapping ( IN DNS_INSTANCE Instance,
IN UDP_IO *  UdpIo,
IN EFI_UDP6_CONFIG_DATA *  UdpCfgData 
)

Configure the opened Udp6 instance until the corresponding Ip6 instance has been configured.

Parameters:
Instance The DNS instance
UdpIo The UDP_IO to poll
UdpCfgData The UDP configure data to reconfigure the UDP_IO
Return values:
TRUE Configure the Udp6 instance successfully.
FALSE Some error occured.

References DNS_TIME_TO_GETMAP, and _DNS_SERVICE::TimerToGetMap.

Referenced by Dns6ConfigUdp().

EFI_STATUS EFIAPI Dns6GetModeData ( IN EFI_DNS6_PROTOCOL *  This,
OUT EFI_DNS6_MODE_DATA *  DnsModeData 
)

This function is used to retrieve DNS mode data for this DNS instance.

Parameters:
[in] This Pointer to EFI_DNS6_PROTOCOL instance.
[out] DnsModeData Pointer to the caller-allocated storage for the EFI_DNS6_MODE_DATA structure.
Return values:
EFI_SUCCESS The operation completed successfully.
EFI_NOT_STARTED When DnsConfigData is queried, no configuration data is available because this instance has not been configured.
EFI_OUT_OF_RESOURCES Failed to allocate needed resources.
EFI_INVALID_PARAMETER This is NULL or DnsModeData is NULL.

References _DNS_DRIVER_DATA::Dns6CacheList, _DNS_INSTANCE::Dns6CfgData, Dns6CopyConfigure(), DNS6_SERVER_IP::Dns6ServerIp, _DNS_DRIVER_DATA::Dns6ServerList, DNS_INSTANCE_FROM_THIS_PROTOCOL6, DNS_STATE_UNCONFIGED, DNS6_CACHE::DnsCache, mDriverData, and _DNS_INSTANCE::State.

EFI_STATUS EFIAPI Dns6HostNameToIp ( IN EFI_DNS6_PROTOCOL *  This,
IN CHAR16 *  HostName,
IN EFI_DNS6_COMPLETION_TOKEN *  Token 
)

The function is used to translate the host name to host IP address. A type AAAA query is used to get the one or more IPv6 addresses for this host.

Parameters:
[in] This Pointer to EFI_DNS6_PROTOCOL instance.
[in] HostName Pointer to caller-supplied buffer containing Host name to be translated. This buffer contains 16 bit characters but these are translated to ASCII for use with DNSv4 server and there is no requirement for driver to support non-ASCII Unicode characters.
[in] Token Pointer to the caller-allocated completion token to return at the completion of the process to translate host name to host address.
Return values:
EFI_SUCCESS The operation completed successfully.
EFI_OUT_OF_RESOURCES Failed to allocate needed resources.
EFI_INVALID_PARAMETER This is NULL. Token is NULL. Token.Event is.NULL HostName is NULL
EFI_NO_MAPPING There's no source address is available for use.
EFI_NOT_STARTED This instance has not been started.

References ConstructDNSQueryIp(), _DNS_DRIVER_DATA::Dns6CacheList, _DNS_INSTANCE::Dns6CfgData, _DNS_INSTANCE::Dns6TxTokens, DNS_DEFAULT_RETRY, DNS_DEFAULT_TIMEOUT, DNS_INSTANCE_FROM_THIS_PROTOCOL6, DNS_STATE_CONFIGED, DNS_TYPE_AAAA, DNS6_CACHE::DnsCache, DoDnsQuery(), _DNS_INSTANCE::MaxRetry, mDriverData, DNS6_TOKEN_ENTRY::PacketToLive, DNS6_TOKEN_ENTRY::QueryHostName, _DNS_INSTANCE::State, and DNS6_TOKEN_ENTRY::Token.

EFI_STATUS Dns6InstanceCancelToken ( IN DNS_INSTANCE Instance,
IN EFI_DNS6_COMPLETION_TOKEN *  Token 
)

Cancel DNS6 tokens from the DNS6 instance.

Parameters:
[in] Instance Pointer to the DNS instance context data.
[in] Token Pointer to the token to be canceled. If NULL, all tokens in this instance will be cancelled. This parameter is optional and may be NULL.
Return values:
EFI_SUCCESS The Token is cancelled.
EFI_NOT_FOUND The Token is not found.

References Dns6CancelTokens(), and GetDns6TokenEntry().

Referenced by Dns6Cancel(), Dns6Configure(), and DnsDestroyInstance().

EFI_STATUS EFIAPI Dns6IpToHostName ( IN EFI_DNS6_PROTOCOL *  This,
IN EFI_IPv6_ADDRESS  IpAddress,
IN EFI_DNS6_COMPLETION_TOKEN *  Token 
)

The function is used to translate the host address to host name. A type PTR query is used to get the primary name of the host.

Parameters:
[in] This Pointer to EFI_DNS6_PROTOCOL instance.
[in] IpAddress IP address.
[in] Token Pointer to the caller-allocated completion used token to translate host address to host name.
Return values:
EFI_SUCCESS The operation completed successfully.
EFI_OUT_OF_RESOURCES Failed to allocate needed resources.
EFI_INVALID_PARAMETER This is NULL. Token is NULL. Token.Event is NULL. IpAddress is not valid IP address.
EFI_NO_MAPPING There's no source address is available for use.
EFI_NOT_STARTED This instance has not been started.
EFI_UNSUPPORTED This function is not supported.

EFI_STATUS EFIAPI Dns6Poll ( IN EFI_DNS6_PROTOCOL *  This  ) 

This function can be used by network drivers and applications to increase the rate that data packets are moved between the communications device and the transmit and receive queues. In some systems, the periodic timer event in the managed network driver may not poll the underlying communications device fast enough to transmit and/or receive all data packets without missing incoming packets or dropping outgoing packets.

Parameters:
[in] This Pointer to EFI_DNS6_PROTOCOL instance.
Return values:
EFI_SUCCESS Incoming or outgoing data was processed.
EFI_INVALID_PARAMETER This is NULL.
EFI_NOT_STARTED This EFI DNS Protocol instance has not been started.
EFI_DEVICE_ERROR An unexpected system or network error occurred.
EFI_TIMEOUT Data was dropped out of the transmit and/or receive queue. Consider increasing the polling rate.

References DNS_INSTANCE_FROM_THIS_PROTOCOL6, DNS_STATE_DESTROY, DNS_STATE_UNCONFIGED, _DNS_INSTANCE::State, and _DNS_INSTANCE::UdpIo.

EFI_STATUS Dns6RemoveTokenEntry ( IN NET_MAP *  TokenMap,
IN DNS6_TOKEN_ENTRY TokenEntry 
)

Remove TokenEntry from TokenMap.

Parameters:
[in] TokenMap All DNSv6 Token entrys.
[in] TokenEntry TokenEntry need to be removed.
Return values:
EFI_SUCCESS Remove TokenEntry from TokenMap sucessfully.
EFI_NOT_FOUND TokenEntry is not found in TokenMap.

Referenced by Dns6CancelTokens(), DnsOnTimerRetransmit(), and ParseDnsResponse().

EFI_STATUS EFIAPI Dns6UpdateDnsCache ( IN EFI_DNS6_PROTOCOL *  This,
IN BOOLEAN  DeleteFlag,
IN BOOLEAN  Override,
IN EFI_DNS6_CACHE_ENTRY  DnsCacheEntry 
)

This function is used to add/delete/modify DNS cache entry. DNS cache can be normally dynamically updated after the DNS resolve succeeds. This function provided capability to manually add/delete/modify the DNS cache.

Parameters:
[in] This Pointer to EFI_DNS6_PROTOCOL instance.
[in] DeleteFlag If FALSE, this function is to add one entry to the DNS Cache. If TRUE, this function will delete matching DNS Cache entry.
[in] Override If TRUE, the matching DNS cache entry will be overwritten with the supplied parameter. If FALSE, EFI_ACCESS_DENIED will be returned if the entry to be added is already exists.
[in] DnsCacheEntry Pointer to DNS Cache entry.
Return values:
EFI_SUCCESS The operation completed successfully.
EFI_INVALID_PARAMETER This is NULL. DnsCacheEntry.HostName is NULL. DnsCacheEntry.IpAddress is NULL. DnsCacheEntry.Timeout is zero.
EFI_ACCESS_DENIED The DNS cache entry already exists and Override is not TRUE.

References _DNS_DRIVER_DATA::Dns6CacheList, mDriverData, and UpdateDns6Cache().

VOID EFIAPI DnsDummyExtFree ( IN VOID *  Arg  ) 

Callback of Dns packet. Does nothing.

Parameters:
Arg The context.

Referenced by ConstructDNSQueryIp().

VOID EFIAPI DnsOnPacketReceived ( NET_BUF *  Packet,
UDP_END_POINT *  EndPoint,
EFI_STATUS  IoStatus,
VOID *  Context 
)

Parse response packet.

Parameters:
Packet The packets received.
EndPoint The local/remote UDP access point
IoStatus The status of the UDP receive
Context The opaque parameter to the function.

References DNS_INSTANCE_SIGNATURE, DnsOnPacketReceived(), ParseDnsResponse(), and _DNS_INSTANCE::UdpIo.

Referenced by DnsOnPacketReceived(), and DoDnsQuery().

VOID EFIAPI DnsOnPacketSent ( NET_BUF *  Packet,
UDP_END_POINT *  EndPoint,
EFI_STATUS  IoStatus,
VOID *  Context 
)

Release the net buffer when packet is sent.

Parameters:
Packet The packets received.
EndPoint The local/remote UDP access point
IoStatus The status of the UDP receive
Context The opaque parameter to the function.

References _DNS_INSTANCE::Dns4TxTokens, _DNS_INSTANCE::Dns6TxTokens, DNS_INSTANCE_SIGNATURE, _DNS_SERVICE::IpVersion, DNS6_TOKEN_ENTRY::PacketToLive, DNS4_TOKEN_ENTRY::PacketToLive, _DNS_INSTANCE::Service, DNS6_TOKEN_ENTRY::Token, and DNS4_TOKEN_ENTRY::Token.

Referenced by DnsRetransmit(), and DoDnsQuery().

VOID EFIAPI DnsOnTimerRetransmit ( IN EFI_EVENT  Event,
IN VOID *  Context 
)

The timer ticking function for the DNS service.

Parameters:
Event The ticking event
Context The DNS service instance
The timer ticking function for the DNS services.

Parameters:
Event The ticking event
Context The DNS service instance

References _DNS_SERVICE::Dns4ChildrenList, Dns4RemoveTokenEntry(), _DNS_INSTANCE::Dns4TxTokens, _DNS_SERVICE::Dns6ChildrenList, Dns6RemoveTokenEntry(), _DNS_INSTANCE::Dns6TxTokens, DnsRetransmit(), _DNS_SERVICE::IpVersion, _DNS_INSTANCE::MaxRetry, DNS6_TOKEN_ENTRY::PacketToLive, DNS4_TOKEN_ENTRY::PacketToLive, DNS6_TOKEN_ENTRY::Token, and DNS4_TOKEN_ENTRY::Token.

Referenced by DnsCreateService().

VOID EFIAPI DnsOnTimerUpdate ( IN EFI_EVENT  Event,
IN VOID *  Context 
)

The timer ticking function for the DNS driver.

Parameters:
Event The ticking event
Context NULL

References DNS6_CACHE::AllCacheLink, DNS4_CACHE::AllCacheLink, _DNS_DRIVER_DATA::Dns4CacheList, _DNS_DRIVER_DATA::Dns6CacheList, DNS6_CACHE::DnsCache, DNS4_CACHE::DnsCache, and mDriverData.

Referenced by DnsDriverEntryPoint().

EFI_STATUS DnsRetransmit ( IN DNS_INSTANCE Instance,
IN NET_BUF *  Packet 
)

Retransmit the packet.

Parameters:
Instance The DNS instance
Packet Retransmit the packet
Return values:
EFI_SUCCESS The packet is retransmitted.
Others Failed to retransmit.

References DnsOnPacketSent().

Referenced by DnsOnTimerRetransmit().

EFI_STATUS DoDnsQuery ( IN DNS_INSTANCE Instance,
IN NET_BUF *  Packet 
)

Query request information.

Parameters:
Instance The DNS instance
Packet The packet for querying request information.
Return values:
EFI_SUCCESS Query request information successfully.
Others Failed to query request information.

References DnsOnPacketReceived(), and DnsOnPacketSent().

Referenced by Dns4HostNameToIp(), and Dns6HostNameToIp().

EFI_STATUS EFIAPI GetDns4TokenEntry ( IN NET_MAP *  TokensMap,
IN EFI_DNS4_COMPLETION_TOKEN *  Token,
OUT DNS4_TOKEN_ENTRY **  TokenEntry 
)

Get the TokenEntry from the TokensMap.

Parameters:
[in] TokensMap All DNSv4 Token entrys
[in] Token Pointer to the token to be get.
[out] TokenEntry Pointer to TokenEntry corresponding Token.
Return values:
EFI_SUCCESS Get the TokenEntry from the TokensMap sucessfully.
EFI_NOT_FOUND TokenEntry is not found in TokenMap.

Referenced by Dns4InstanceCancelToken().

EFI_STATUS EFIAPI GetDns6TokenEntry ( IN NET_MAP *  TokensMap,
IN EFI_DNS6_COMPLETION_TOKEN *  Token,
OUT DNS6_TOKEN_ENTRY **  TokenEntry 
)

Get the TokenEntry from the TokensMap.

Parameters:
[in] TokensMap All DNSv6 Token entrys
[in] Token Pointer to the token to be get.
[out] TokenEntry Pointer to TokenEntry corresponding Token.
Return values:
EFI_SUCCESS Get the TokenEntry from the TokensMap sucessfully.
EFI_NOT_FOUND TokenEntry is not found in TokenMap.

Referenced by Dns6InstanceCancelToken().

BOOLEAN IsValidDnsResponse ( IN NET_MAP *  TokensMap,
IN UINT16  Identification,
IN UINT16  Type,
OUT NET_MAP_ITEM **  Item 
)

Find out whether the response is valid or invalid.

Parameters:
TokensMap All DNS transmittal Tokens entry.
Identification Identification for queried packet.
Type Type for queried packet.
Item Return corresponding Token entry.
Return values:
TRUE The response is valid.
FALSE The response is invalid.

References DNS_HEADER::Identification, and DNS_QUERY_SECTION::Type.

Referenced by ParseDnsResponse().

EFI_STATUS ParseDnsResponse ( IN OUT DNS_INSTANCE Instance,
IN UINT8 *  RxString,
OUT BOOLEAN *  Completed 
)

EFI_STATUS EFIAPI UpdateDns4Cache ( IN LIST_ENTRY *  Dns4CacheList,
IN BOOLEAN  DeleteFlag,
IN BOOLEAN  Override,
IN EFI_DNS4_CACHE_ENTRY  DnsCacheEntry 
)

Update Dns4 cache to shared list of caches of all DNSv4 instances.

Parameters:
Dns4CacheList All Dns4 cache list.
DeleteFlag If FALSE, this function is to add one entry to the DNS Cache. If TRUE, this function will delete matching DNS Cache entry.
Override If TRUE, the matching DNS cache entry will be overwritten with the supplied parameter. If FALSE, EFI_ACCESS_DENIED will be returned if the entry to be added is already exists.
DnsCacheEntry Entry Pointer to DNS Cache entry.
Return values:
EFI_SUCCESS Update Dns4 cache successfully.
Others Failed to update Dns4 cache.

References DNS4_CACHE::AllCacheLink, and DNS4_CACHE::DnsCache.

Referenced by Dns4UpdateDnsCache(), and ParseDnsResponse().

EFI_STATUS EFIAPI UpdateDns6Cache ( IN LIST_ENTRY *  Dns6CacheList,
IN BOOLEAN  DeleteFlag,
IN BOOLEAN  Override,
IN EFI_DNS6_CACHE_ENTRY  DnsCacheEntry 
)

Update Dns6 cache to shared list of caches of all DNSv6 instances.

Parameters:
Dns6CacheList All Dns6 cache list.
DeleteFlag If FALSE, this function is to add one entry to the DNS Cache. If TRUE, this function will delete matching DNS Cache entry.
Override If TRUE, the matching DNS cache entry will be overwritten with the supplied parameter. If FALSE, EFI_ACCESS_DENIED will be returned if the entry to be added is already exists.
DnsCacheEntry Entry Pointer to DNS Cache entry.
Return values:
EFI_SUCCESS Update Dns6 cache successfully.
Others Failed to update Dns6 cache.

References DNS6_CACHE::AllCacheLink, and DNS6_CACHE::DnsCache.

Referenced by Dns6UpdateDnsCache(), and ParseDnsResponse().


Variable Documentation

EFI_DRIVER_BINDING_PROTOCOL gDns4DriverBinding

EFI_DRIVER_BINDING_PROTOCOL gDns6DriverBinding

EFI_COMPONENT_NAME_PROTOCOL gDnsComponentName

EFI_COMPONENT_NAME2_PROTOCOL gDnsComponentName2

Component Name 2 Protocol instance

Referenced by DnsDriverEntryPoint(), UpdateDns4Name(), and UpdateDns6Name().

EFI_UNICODE_STRING_TABLE* gDnsControllerNameTable

EFI_DNS4_PROTOCOL mDns4Protocol

Referenced by DnsCreateInstance().

EFI_SERVICE_BINDING_PROTOCOL mDns4ServiceBinding

Referenced by DnsCreateService().

EFI_DNS6_PROTOCOL mDns6Protocol

Referenced by DnsCreateInstance().

EFI_SERVICE_BINDING_PROTOCOL mDns6ServiceBinding

Referenced by DnsCreateService().


Generated on Mon Sep 28 08:49:05 2015 for NetworkPkg[ALL] by  doxygen 1.5.7.1