Perform any valid resource record inquiry for a given name. See Details.

gdns_query(
  gctx = NULL,
  name,
  rr_type = "txt",
  rr_class = 1L,
  include_reporting = FALSE
)

Arguments

gctx

gdns resolver context created with gdns_resolver(). If NULL a temporary context will be created but is not ideal since there is overhead associated with context creation and garbage collection.

name

an entity to query for

rr_type

what resource record type do you want to queyr for? See Details.

include_reporting

if TRUE include debugging information for queries such as the length of time it takes for each query. Default: FALSE

Details

This returns a fairly complex result object but that is the nature of DNS queries. You're likely going to want what is in $replies_tree$answer but the rest of the structure contains lovely metadata about the query and remote query environment. There will eventually be "as data frame"-ish helpers for this object.

Valid values for rr_type:

  • a

  • a6

  • aaaa

  • afsdb

  • any

  • apl

  • atma

  • avc

  • axfr

  • caa

  • cdnskey

  • cds

  • cert

  • cname

  • csync

  • dhcid

  • dlv

  • dname

  • dnskey

  • doa

  • ds

  • eid

  • eui48

  • eui64

  • gid

  • gpos

  • hinfo

  • hip

  • ipseckey

  • isdn

  • ixfr

  • key

  • kx

  • l32

  • l64

  • loc

  • lp

  • maila

  • mailb

  • mb

  • md

  • mf

  • mg

  • minfo

  • mr

  • mx

  • naptr

  • nid

  • nimloc

  • ninfo

  • ns

  • nsap

  • nsap_ptr

  • nsec

  • nsec3

  • nsec3param

  • null

  • nxt

  • openpgpkey

  • opt

  • ptr

  • px

  • rkey

  • rp

  • rrsig

  • rt

  • sig

  • sink

  • smimea

  • soa

  • spf

  • srv

  • sshfp

  • ta

  • talink

  • tkey

  • tlsa

  • tsig

  • txt

  • uid

  • uinfo

  • unspec

  • uri

  • wks

  • x25

  • zonemd

Note

Local hosts files are ignored when using this getdns API endpoint

References

https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml

See also

Other query functions: gdns_context(), gdns_get_address()

Examples

x <- gdns_resolver()
gdns_query(x, "example.com")