DNSServiceQueryRecord, how to get Ptr to DNS header

Hi,

We are using the DNSServiceQueryRecord API to get SRV, AAAA and A records. We wish to use the System resolver but would like to parse the response data with an existing cross platform library. The problem seems to be the callback only returns a pointer to the RDATA field of the answer record not to the beginning of the header.


dnsQueryRecordCallback (DNSServiceRef sdRef, DNSServiceFlags flags,
uint32t interfaceIndex,
DNSServiceErrorType errorCode,
const char *fullname,
uint16
t rrtype,
uint16t rrclass,
uint16
t rdlen,
const void *rdata,
uint32_t ttl,
void *context)

Is there any API that we can use to get a pointer to the start of the DNS header
Post not yet marked as solved Up vote post of tech74 Down vote post of tech74
480 views