Erik Pihl Østlyngen

NAME

DNS::LDNS::Resolver - DNS resolver

SYNOPSIS

  use DNS::LDNS ':all'

  my r = new DNS::LDNS::Resolver(filename => '/my/resolv.conf')
  my r = new DNS::LDNS::Resolver(file => \*FILE)
  my r = new DNS::LDNS::Resolver

  bool = r->dnssec
  r->set_dnssec(bool)

  bool = r->dnssec_cd        # Resolver sets the CD bit
  r->set_dnssec_cd(bool)

  port = r->port
  r->set_port(port)

  bool = r->recursive
  r->set_recursive(bool)

  bool = r->debug
  r->set_debug(bool)

  count = r->retry
  r->set_retry(count)

  count = r->retrans
  r->set_retrans(count)

  bool = r->fallback          # Resolver truncation fallback mechanism
  r->set_fallback(bool)

  bool = r->ip6
  r->set_ip6(bool)

  size = r->edns_udp_size
  r->set_edns_udp_size(size)

  bool = r->usevc             # Use virtual circuit (TCP)
  r->set_usevc(bool)

  r->fail
  r->set_fail

  r->defnames
  r->set_defnames

  r->dnsrch
  r->set_dnsrch

  r->igntc
  r->set_igntc

  bool = r->random            # randomize nameserver before usage
  r->set_random(bool)

  rrlist = r->dnssec_anchors  # list of trusted DNSSEC anchors
  r->push_dnssec_anchor(rr)
  r->set_dnssec_anchors(rrlist)

  rdata = r->domain           # Domain to add to relative queries
  r->set_domain(rdata)

  @rdata = r->nameservers
  count = r->nameserver_count
  r->push_nameserver(rdata)
  rdata = r->pop_nameserver
  r->nameservers_randomize

  str = r->tsig_keyname
  r->set_tsig_keyname(str)

  str = r->tsig_algorithm
  r->set_tsig_algorithm(str)

  str = r->tsig_keydata
  r->set_tsig_keydata(str)

  count = r->searchlist_count
  r->push_searchlist(rdata)
  @rdata = r->searchlist

  @times = r->rtt              # Round trip times
  r->set_rtt(@rtt)
  time = r->nameserver_rtt(pos)
  r->set_nameserver_rtt(pos, time)

  (sec, usec) = r->timeout
  r->set_timeout(sec, usec)

  # DNSSec validation
  rrlist = r->fetch_valid_domain_keys(domain, keys)
  rrlist = r->fetch_valid_domain_keys_time(domain, keys, checktime)
  rrlist = r->validate_domain_ds(domain, keys)
  rrlist = r->validate_domain_ds_time(domain, keys, checktime)
  rrlist = r->validate_domain_dnskey(domain, keys)
  rrlist = r->validate_domain_dnskey_time(domain, keys, checktime)
  status = r->verify_trusted(rrset, rrsigs, validation_keys)
  status = r->verify_trusted_time(rrset, rrsigs, checktime, validation_keys)
  bool = r->trusted_key(keys, trusted_keys)
  chain = r->build_data_chain(qflags, dataset, pkt, orig_rr)

  # Query
  pkt = r->query(rdata, type, class, flags)
  pkt = r->search(rdata, type, class, flags)
  query = r->prepare_query_pkt(rdata, type, class, flags)
  answer = r->send(rdata, type, class, flags)
  answer = r->send_pkt(query)
  rrlist = r->get_rr_list_addr_by_name(name, class, flags)
  rrlist = r->get_rr_list_name_by_addr(addr, class, flags)

SEE ALSO

http://www.nlnetlabs.nl/projects/ldns

AUTHOR

Erik Pihl Ostlyngen, <erik.ostlyngen@uninett.no>

COPYRIGHT AND LICENSE

Copyright (C) 2013 by UNINETT Norid AS

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.2 or, at your option, any later version of Perl 5 you may have available.




Hosting generously
sponsored by Bytemark