typedef void(* extDnsOnMessageReceived)(extDnsCtx *ctx, extDnsSession *session, const char *source_address, int source_port, extDnsMessage *message, axlPointer data)

Defines the set of handler functions that are called to notify a DNS message received on the provided session.

This handler definition is also used by DNS cache validation.

Parameters
sessionThe DNS session where the message was received. NOTE this parameter may be NULL in the case of a failure during the creation of the listener that will receive the reply (in case of queries).
source_addressThe source address where the message comes from.
source_portThe source port where the message comes from.
messageThe DNS message received. Note that you must not release this reference (by calling to ext_dns_message_unref). This is done automatically by the library once the handler finishes. In the case you want to have a reference to the message after the handler finishes, then acquire them by calling to ext_dns_message_ref. Note that every reference acquired must be released via ext_dns_message_unref. NOTE that this parameter may be NULL in the case of a failure is found during the query process.
dataA user defined pointer that was configured along with the handler.