Developer

API Reference

IDNS_AddQuestion()

Brew Release
Brew MP 1.0.2
See Also
Error Codes IDNS
Description
This function adds a question to the set of question records in the request. It should not be called after IDNS_Start().
It can be called multiple times to construct a request message consisting of multiple question records.
Parameters
  • pIDNS
    []:
    The interface pointer.
  • nType
    []:
    DNS question type.
  • nClass
    []:
    DNS class.
  • pszDomain
    []:
    A zero-terminated string representing a domain name in dotted notation (for example, "example.com"). Single dot terminators (e.g. "example.com.") are acceptable and treated identically to domain names without a terminating dot. (Domain search paths and relative domain names are not supported.)
Interface
Prototype
int IDNS_AddQuestion(IDNS *pIDNS, AEEDNSQType nType, AEEDNSClass nClass, const char *pszDomain);
Return
AEE_SUCCESS: The question was appended to the request message.
All other values indicate failure, in which case the DNS request is unmodified. In this context, the following error codes have special meaning:
AEE_EFAILED: The new question would make the DNS message exceed the maximum size (512 bytes for DNS over UDP). AEE_EBADPARM: The domain name is mal-formed. AEE_NET_EINVAL: IDNS is not in the proper state for questions to be added. Questions cannot be added after Start() has been called.
Other errors might be returned; the caller should verify that IDNS_AddQuestion() succeeded.
Side Effect
None.
Comment
All domains are treated as fully-qualified domains by IDNS. There is no domain suffix search list; suffixes are never attached to the provided domain string.
Colon (:), slash (/) and comma (,) characters do not delimit the domain name as in IAddrInfo.
When constructing a question record, IDNS does not use the compressed form of domain names.
  • Follow