extDnsMessage* ext_dns_message_build_cname_reply ( extDnsCtx ctx,
extDnsMessage message,
const char *  name,
int  ttl 

Allows to build a message reply to the provided message, using as reply to the question the name provided.

ctxThe context where the operation will take place.
messageA DNS message question that will be used to build a reply.
nameA name string value what will be used to complete the ANSWER section of the message. Note the reply created will have IN for the DNS class, and CNAME for the dns type record.
ttlThe ttl to be reported in the reply.
A reference to a newly created message that represents the reply or NULL if the function fails.

References _extDnsHeader::answer_count, _extDnsMessage::answers, _extDnsResourceRecord::class, extDnsClassIN, extDnsResponseNoError, extDnsTypeCNAME, _extDnsMessage::header, _extDnsResourceRecord::name, _extDnsResourceRecord::name_content, _extDnsQuestion::qname, _extDnsMessage::questions, _extDnsResourceRecord::ttl, and _extDnsResourceRecord::type.