Skip to main content

Module query

Module query 

Source
Expand description

dns query — direct DNS lookups (dig-style).

Resolves a name via the system resolver by default, or via a configured [[servers]] entry (--server <ID> + one or more of --dns/--dot/--doh/--doq or --all), or via an ad-hoc resolver (--at <ADDR> or dig-style @ADDR positional).

Output is dig-flavoured: a header line starting with @, a blank line, then a column-aligned table of answers (one block per transport when fanning out). --short emits answers only; --json emits a stable JSON shape.

Structs§

QueryArgs
QueryOutcome
Result of execute_query — everything needed to render output or shape a JSON response for the MCP tool.
QueryResultBlock
Per-transport outcome for one block within a single dns query invocation. The renderer turns these into header+rows / short lines / JSON entries.

Enums§

QueryStatus
TargetKind

Constants§

TRANSPORT_PRECEDENCE
Order in which transports render and run when fanning out. Matches the precedence used to pick a single transport when none is requested (DoH first, DoQ last because it’s an opt-in build).

Functions§

execute_query
Programmatic entry point — runs a query and returns the per- transport results without printing anything. Shared between the CLI runner and the MCP dns_resolve tool so behaviour stays in parity by construction.
run_query
Entry point for the dns query subcommand.