Next Topic

Previous Topic

Book Contents

Query

bool Query(string sDomainName,int iRecordType,bool bBypassCache=false);

Return values

Non zero if the function is successful; otherwise 0.

Parameters

  • sDomainName - Domain to query
  • iRecordType - One of the record types listed in the remarks section.
  • bBypassCache - Default false, if set to true the query will bypass the local resolver and ask the DNS server directly.

Remarks

The function sends a query to the DNS server. The result can be extracted with one or more calls to the Next() function.

The following record types can be queried:

  • LuaDNS_TYPE_PTR
  • LuaDNS_TYPE_TEXT
  • LuaDNS_TYPE_SOA
  • LuaDNS_TYPE_CNAME
  • LuaDNS_TYPE_MX
  • LuaDNS_TYPE_NS

DNS record types reference can be found at: http://www.iana.org/assignments/dns-parameters