Home
Ratchet Library :: API Reference
API  ·  Manual

Module ratchet.dns

Provides a system for querying DNS for information such as A, AAAA, PTR, MX, and TXT records. While there is a class-based system internally, that API is currently hidden by namespace functions that call everything necessary.

Functions

query (data, type) Queries for results for one type of query for the given data.
query_all (data, types) Queries for results for many types of query for the given data.


Functions

query (data, type)
Queries for results for one type of query for the given data. Until the results come in, this function will pause the calling thread. The return value is a table whose contents are defined by the type of query. See manual for complete details.

Parameters

  • data: The hostname, IP, or special-case to query against.
  • type: The type of query, e.g. "a" or "mx".

Return value:

Table with results, or nil followed by an error message.
query_all (data, types)
Queries for results for many types of query for the given data. Until all results come in, this function will pause the calling thread. This call attempts to perform these lookups in parallel, with a file descriptor for each query type. The return value is a table keyed on either the query types or the query type suffixed with "_error". The values will either be a table of results or an error message, respectively. See manual for complete details.

Parameters

  • data: The hostname, IP, or special-case to query against.
  • types: Table with types of queries, e.g. "a" or "mx".

Return value:

Table with results, or nil followed by an error message.