API Reference | developer.brewmp.com API Reference | developer.brewmp.com


API Reference


Brew Release
Brew MP 1.0.2
See Also
This function converts a DNS representation of a domain name into a zero-terminated string with dot (that is, period, or ".") delimiters.
The IDNS interface pointer.
A pointer to the start of the domain name. This pointer must point into the DNS response data as described by an AEEDNSItem record. This can be used to decode pbyDomain values, or to decode values within the pbyData[] array.
A pointer to value to hold the number of bytes occupied by the domain name (in the source byte array, not in the resulting string). In the case of a mal-formed domain name, *pcb will be set to zero. If pcb==NULL, it will be ignored.
  • char *IDNS_ParseDomain(IDNS *pIDNS, const byte *pbyDomain, int *pcb);
  • This function returns a zero-terminated string giving the host name, or NULL on failure.
    Domain names are returned in dotted notation, with no terminating dot character at the end.
    Failure could be due to an allocation failure or a mal-formed domain name; *pcb can be used to distinguish between the two.
Side Effect
  • None.
Returned strings do not include terminating dots, which usually indicate fully qualified domain names, because all domains are treated as fully qualified by IDNS. An empty domain is returned as an empty string ("") instead of a single dot (".").