Network Component  Version 7.19.0
MDK Middleware for IPv4 and IPv6 Networking
NetDNS: DNS Client

Events generated by the Network - DNS Client functions. More...

Functions

__STATIC_INLINE void EvrNetDNS_InitClient (uint32_t num_entries)
 Event on DNS client initialize (Op) More...
 
__STATIC_INLINE void EvrNetDNS_GetSocketFailed (void)
 Event on DNS client failed to allocate UDP socket (Error) More...
 
__STATIC_INLINE void EvrNetDNS_ChangeDnsServer (int32_t server)
 Event on DNS client change active DNS server (Error) More...
 
__STATIC_INLINE void EvrNetDNS_ClientStopTimeoutExpired (void)
 Event on DNS client stop operation timeout expired (Error) More...
 
__STATIC_INLINE void EvrNetDNS_ReceiveFrame (const void *net_addr, uint32_t length)
 Event on DNS client receive frame from the server (Op) More...
 
__STATIC_INLINE void EvrNetDNS_WrongServerPort (uint16_t udp_port)
 Event on DNS client wrong server port (Error) More...
 
__STATIC_INLINE void EvrNetDNS_FrameTooShort (uint32_t length, uint32_t min_length)
 Event on DNS client receive frame is too short (Error) More...
 
__STATIC_INLINE void EvrNetDNS_WrongServerAddress (void)
 Event on DNS client wrong DNS server address received (Error) More...
 
__STATIC_INLINE void EvrNetDNS_ShowFrameHeader (const void *dns_header)
 Event on DNS client display send/receive frame header (Detail) More...
 
__STATIC_INLINE void EvrNetDNS_WrongTransactionId (uint16_t tid, uint16_t tid_valid)
 Event on DNS client wrong transaction identifier (TID) received (Error) More...
 
__STATIC_INLINE void EvrNetDNS_DnsRequestReceived (void)
 Event on DNS client received a DNS request (Error) More...
 
__STATIC_INLINE void EvrNetDNS_OpcodeNotQuery (void)
 Event on DNS client OPCODE in a response is not QUERY (Error) More...
 
__STATIC_INLINE void EvrNetDNS_MessageTruncated (void)
 Event on DNS client truncated response message received (Op) More...
 
__STATIC_INLINE void EvrNetDNS_NoSuchNameFound (void)
 Event on DNS client no such name found message received (Op) More...
 
__STATIC_INLINE void EvrNetDNS_RcodeAndRecursion (void)
 Event on DNS client RCODE not zero and recursion available received (Error) More...
 
__STATIC_INLINE void EvrNetDNS_MoreAnswersReceived (void)
 Event on DNS client more than one answer received (Error) More...
 
__STATIC_INLINE void EvrNetDNS_QnameNotTheSame (void)
 Event on DNS client QNAME in a response not the same as requested (Error) More...
 
__STATIC_INLINE void EvrNetDNS_QtypeNotTheSame (void)
 Event on DNS client QTYPE in a response not the same as requested (Error) More...
 
__STATIC_INLINE void EvrNetDNS_QclassNotInet (void)
 Event on DNS client QCLASS in a response is not CLASS_INET (Error) More...
 
__STATIC_INLINE void EvrNetDNS_GotHostAddress (const void *net_addr, uint32_t ttl)
 Event on DNS client receive resolved IP address (Op) More...
 
__STATIC_INLINE void EvrNetDNS_GotAuthorityAddress (const void *net_addr)
 Event on DNS client receive IP address of the authority (Op) More...
 
__STATIC_INLINE void EvrNetDNS_RecordTypeNotSupported (uint16_t rr_type)
 Event on DNS client can not handle resource record type (Error) More...
 
__STATIC_INLINE void EvrNetDNS_Resolve (const char *host_name, uint32_t length)
 Event on DNS client resolve host requested (Op) More...
 
__STATIC_INLINE void EvrNetDNS_ResolveInvalidParameter (void)
 Event on DNS client invalid parameter for resolve request (Error) More...
 
__STATIC_INLINE void EvrNetDNS_ResolveClientBusy (void)
 Event on DNS client resolve request failed, client busy (Error) More...
 
__STATIC_INLINE void EvrNetDNS_ResolvedAddress (const void *net_addr)
 Event on DNS client resolved IP address internally (Op) More...
 
__STATIC_INLINE void EvrNetDNS_ResolveDnsServerUnknown (void)
 Event on DNS client resolve failed, DNS server unknown (Error) More...
 
__STATIC_INLINE void EvrNetDNS_SendRequest (const void *net_addr)
 Event on DNS client send resolve request to the server (Op) More...
 
__STATIC_INLINE void EvrNetDNS_ClearCache (uint32_t deleted, uint32_t available)
 Event on DNS client clear cache requested (API) More...
 
__STATIC_INLINE void EvrNetDNS_ClearCacheClientBusy (void)
 Event on DNS client clear cache request failed, client busy (Error) More...
 
__STATIC_INLINE void EvrNetDNS_UninitClient (void)
 Event on DNS client de-initialize (Op) More...
 

Description

Events generated by the Network - DNS Client functions.

The DNS client functions generate events that make it easier to troubleshoot errors, and allow the user to understand how the DNS client works.

Function Documentation

◆ EvrNetDNS_ChangeDnsServer()

__STATIC_INLINE void EvrNetDNS_ChangeDnsServer ( int32_t  server)

Event on DNS client change active DNS server (Error)

Parameters
serverDNS server to use
  • 0: primary
  • 1: secondary

The event ChangeDnsServer is created when the DNS client has changed the active DNS server to a secondary or primary DNS server. This happened because the currently active DNS server was not responding to DNS client requests.

Value in the Event Recorder shows:

  • dns: changed DNS server.

◆ EvrNetDNS_ClearCache()

__STATIC_INLINE void EvrNetDNS_ClearCache ( uint32_t  deleted,
uint32_t  available 
)

Event on DNS client clear cache requested (API)

Parameters
deletednumber of entries deleted from cache
availablenumber of entries available in cache

The event ClearCache is created when the function netDNSc_ClearCache is executed.

Value in the Event Recorder shows:

  • deleted: number of deleted cache entries.
  • max: maximum number of DNS cache entries.

◆ EvrNetDNS_ClearCacheClientBusy()

__STATIC_INLINE void EvrNetDNS_ClearCacheClientBusy ( void  )

Event on DNS client clear cache request failed, client busy (Error)

The event ClearCacheClientBusy is created when the function netDNSc_ClearCache is executed, and the DNS client is still busy resolving the host name.

Value in the Event Recorder shows:

  • error

◆ EvrNetDNS_ClientStopTimeoutExpired()

__STATIC_INLINE void EvrNetDNS_ClientStopTimeoutExpired ( void  )

Event on DNS client stop operation timeout expired (Error)

The event ClientStopTimeoutExpired is created when the DNS operation has expired but is not completed. The DNS client session is then terminated.

Value in the Event Recorder shows:

  • error

◆ EvrNetDNS_DnsRequestReceived()

__STATIC_INLINE void EvrNetDNS_DnsRequestReceived ( void  )

Event on DNS client received a DNS request (Error)

The event DnsRequestReceived is created when the network library receives a DNS request. The DNS client can not handle DNS requests, so the frame is discarded.

Value in the Event Recorder shows:

  • error

◆ EvrNetDNS_FrameTooShort()

__STATIC_INLINE void EvrNetDNS_FrameTooShort ( uint32_t  length,
uint32_t  min_length 
)

Event on DNS client receive frame is too short (Error)

Parameters
lengthframe length in bytes
min_lengthminimum length of the frame

The event FrameTooShort is created when the network library receives the DNS frame that is too short. The frame is discarded.

Value in the Event Recorder shows:

  • len: length of the received frame in bytes.
  • min: minimum valid frame length in bytes.

◆ EvrNetDNS_GetSocketFailed()

__STATIC_INLINE void EvrNetDNS_GetSocketFailed ( void  )

Event on DNS client failed to allocate UDP socket (Error)

The event GetSocketFailed is created when the DNS client is initialized, that is, when the function netInitialize is executed, and the service could not assign the UDP socket. To resolve this error, you must increase the number of available UDP sockets in the UDP socket configuration.

Value in the Event Recorder shows:

  • error

◆ EvrNetDNS_GotAuthorityAddress()

__STATIC_INLINE void EvrNetDNS_GotAuthorityAddress ( const void *  net_addr)

Event on DNS client receive IP address of the authority (Op)

Parameters
net_addrpointer to net address of the authority

The event GotAuthorityAddress is created when the network library receives the DNS response with the IP address of the authoritative DNS server.

Value in the Event Recorder shows:

  • ip: address of the authoritative DNS server.

◆ EvrNetDNS_GotHostAddress()

__STATIC_INLINE void EvrNetDNS_GotHostAddress ( const void *  net_addr,
uint32_t  ttl 
)

Event on DNS client receive resolved IP address (Op)

Parameters
net_addrpointer to network address of the host
ttladdress expiration timeout

The event GotHostAddress is created when the network library receives a DNS response with the IP address of the requested host resolved.

Value in the Event Recorder shows:

  • ip: host address.
  • ttl: address expiration timeout in seconds.

◆ EvrNetDNS_InitClient()

__STATIC_INLINE void EvrNetDNS_InitClient ( uint32_t  num_entries)

Event on DNS client initialize (Op)

Parameters
num_entriesnumber of entries available in cache

The event InitClient is created when the DNS client is initialized, that is, when the function netInitialize is executed.

Value in the Event Recorder shows:

  • entries: number of entries available in DNS cache table.

◆ EvrNetDNS_MessageTruncated()

__STATIC_INLINE void EvrNetDNS_MessageTruncated ( void  )

Event on DNS client truncated response message received (Op)

The event MessageTruncated is created when the network library receives a truncated DNS response. The message is accepted.

◆ EvrNetDNS_MoreAnswersReceived()

__STATIC_INLINE void EvrNetDNS_MoreAnswersReceived ( void  )

Event on DNS client more than one answer received (Error)

The event MoreAnswersReceived is created when the network library receives a DNS response that contains multiple answers. The frame is discarded.

Value in the Event Recorder shows:

  • error

◆ EvrNetDNS_NoSuchNameFound()

__STATIC_INLINE void EvrNetDNS_NoSuchNameFound ( void  )

Event on DNS client no such name found message received (Op)

The event NoSuchNameFound is created when the network library receives a DNS response message stating that the requested name can not be found in the DNS database. This means that the host name does not exist.

◆ EvrNetDNS_OpcodeNotQuery()

__STATIC_INLINE void EvrNetDNS_OpcodeNotQuery ( void  )

Event on DNS client OPCODE in a response is not QUERY (Error)

The event OpcodeNotQuery is created when the network library receives a DNS response in which the opcode is not a Query. The frame is discarded.

Value in the Event Recorder shows:

  • error

◆ EvrNetDNS_QclassNotInet()

__STATIC_INLINE void EvrNetDNS_QclassNotInet ( void  )

Event on DNS client QCLASS in a response is not CLASS_INET (Error)

The event QclassNotInet is created when the network library receives a DNS response with the DNS class that is not Internet. The frame is discarded.

Value in the Event Recorder shows:

  • error

◆ EvrNetDNS_QnameNotTheSame()

__STATIC_INLINE void EvrNetDNS_QnameNotTheSame ( void  )

Event on DNS client QNAME in a response not the same as requested (Error)

The event QnameNotTheSame is created when the network library receives a DNS response with a host name that is not the same as the requested host name. The frame is discarded.

Value in the Event Recorder shows:

  • error

◆ EvrNetDNS_QtypeNotTheSame()

__STATIC_INLINE void EvrNetDNS_QtypeNotTheSame ( void  )

Event on DNS client QTYPE in a response not the same as requested (Error)

The event QtypeNotTheSame is created when the network library receives a DNS response with a DNS type that is not the same as the DNS type in the request. The frame is discarded.

Value in the Event Recorder shows:

  • error

◆ EvrNetDNS_RcodeAndRecursion()

__STATIC_INLINE void EvrNetDNS_RcodeAndRecursion ( void  )

Event on DNS client RCODE not zero and recursion available received (Error)

The event RcodeAndRecursion is created when the network library receives a DNS response with non-zero rcode and the recursion is available. This is undefined state so the frame is discarded.

Value in the Event Recorder shows:

  • error

◆ EvrNetDNS_ReceiveFrame()

__STATIC_INLINE void EvrNetDNS_ReceiveFrame ( const void *  net_addr,
uint32_t  length 
)

Event on DNS client receive frame from the server (Op)

Parameters
net_addrpointer to NET_ADDR address of the server
lengthframe length in bytes
Remarks
Port member is undefined and reused for the length parameter.

The event ReceiveFrame is created when the network library receives the DNS frame.

Value in the Event Recorder shows:

  • ip: address of the DNS server sending the message.
  • len: length of the received frame in bytes.

◆ EvrNetDNS_RecordTypeNotSupported()

__STATIC_INLINE void EvrNetDNS_RecordTypeNotSupported ( uint16_t  rr_type)

Event on DNS client can not handle resource record type (Error)

Parameters
rr_typerecource record type

The event RecordTypeNotSupported is created when the network library receives a DNS response that contains a resource record type that is not supported in the DNS client. Such a resource record is ignored.

Value in the Event Recorder shows:

  • rr_type: received resource record type.

◆ EvrNetDNS_Resolve()

__STATIC_INLINE void EvrNetDNS_Resolve ( const char *  host_name,
uint32_t  length 
)

Event on DNS client resolve host requested (Op)

Parameters
host_namename of the host to resolve
lengthlength of the host_name string

The event Resolve is created when the DNS client started the name resolution process, due to a call to the netDNSc_GetHostByName or netDNSc_GetHostByNameX function.

Value in the Event Recorder shows:

  • name: name of the host to be resolved.

◆ EvrNetDNS_ResolveClientBusy()

__STATIC_INLINE void EvrNetDNS_ResolveClientBusy ( void  )

Event on DNS client resolve request failed, client busy (Error)

The event ResolveClientBusy is created when the function netDNSc_GetHostByName or netDNSc_GetHostByNameX is executed, and the DNS client is still busy resolving the host name.

Value in the Event Recorder shows:

  • error

◆ EvrNetDNS_ResolvedAddress()

__STATIC_INLINE void EvrNetDNS_ResolvedAddress ( const void *  net_addr)

Event on DNS client resolved IP address internally (Op)

Parameters
net_addrpointer to NET_ADDR address structure

The event ResolvedAddress is created when the DNS client has resolved the requested host name internally. The host name was an ascii address, such as "192.168.0.100" or the local host name.

Value in the Event Recorder shows:

  • ip: resolved address of the host.

◆ EvrNetDNS_ResolveDnsServerUnknown()

__STATIC_INLINE void EvrNetDNS_ResolveDnsServerUnknown ( void  )

Event on DNS client resolve failed, DNS server unknown (Error)

The event ResolveDnsServerUnknown is created when the function netDNSc_GetHostByName or netDNSc_GetHostByNameX is executed, and the DNS server address is unknown.

Value in the Event Recorder shows:

  • error

◆ EvrNetDNS_ResolveInvalidParameter()

__STATIC_INLINE void EvrNetDNS_ResolveInvalidParameter ( void  )

Event on DNS client invalid parameter for resolve request (Error)

The event ResolveInvalidParameter is created when the DNS client can not start the name resolution process because the function netDNSc_GetHostByName or netDNSc_GetHostByNameX is called with an invalid input parameter.

Value in the Event Recorder shows:

  • error

◆ EvrNetDNS_SendRequest()

__STATIC_INLINE void EvrNetDNS_SendRequest ( const void *  net_addr)

Event on DNS client send resolve request to the server (Op)

Parameters
net_addrpointer to NET_ADDR address structure

The event SendRequest is created when the network library wants to send the DNS request message to DNS server.

Value in the Event Recorder shows:

  • server: address of the DNS server.
  • port: port number of the DNS server.

◆ EvrNetDNS_ShowFrameHeader()

__STATIC_INLINE void EvrNetDNS_ShowFrameHeader ( const void *  dns_header)

Event on DNS client display send/receive frame header (Detail)

Parameters
dns_headerpointer to DNS frame header of 12 bytes
  • TID (2 bytes)
  • Flags (2 bytes)
  • QDCOUNT (2 bytes)
  • ANCOUNT (2 bytes)
  • NSCOUNT (2 bytes)
  • ARCOUNT (2 bytes)

The event ShowFrameHeader is created when the network library wants to display detailed information about the DNS header.

Value in the Event Recorder shows:

  • tid: transaction identification number.
  • flags: frame flags.
  • qd: question count.
  • an: answer resource record count.
  • ns: authority resource record count.
  • ar: additional resource record count.

◆ EvrNetDNS_UninitClient()

__STATIC_INLINE void EvrNetDNS_UninitClient ( void  )

Event on DNS client de-initialize (Op)

The event UninitClient is created when the function netUninitialize is executed.

Value in the Event Recorder shows:

  • dns

◆ EvrNetDNS_WrongServerAddress()

__STATIC_INLINE void EvrNetDNS_WrongServerAddress ( void  )

Event on DNS client wrong DNS server address received (Error)

The event WrongServerAddress is created when the network library receives the DNS frame from an invalid DNS server. The frame is discarded.

Value in the Event Recorder shows:

  • error

◆ EvrNetDNS_WrongServerPort()

__STATIC_INLINE void EvrNetDNS_WrongServerPort ( uint16_t  udp_port)

Event on DNS client wrong server port (Error)

Parameters
udp_portwrong UDP port number

The event WrongServerPort is created when the network library receives the DNS frame from invalid UDP server source port. The frame is discarded.

Value in the Event Recorder shows:

  • port: UDP source port of the server.

◆ EvrNetDNS_WrongTransactionId()

__STATIC_INLINE void EvrNetDNS_WrongTransactionId ( uint16_t  tid,
uint16_t  tid_valid 
)

Event on DNS client wrong transaction identifier (TID) received (Error)

Parameters
tidreceived transaction identifier
tid_validvalid transaction identifier

The event WrongTransactionId is created when the network library receives the DNS response frame, but the received transaction identification (TID) is not identical to the transaction identifier of our DNS request. The frame is therefore discarded.

Value in the Event Recorder shows:

  • tid: received transaction identifier.
  • valid: expected transaction identifier.