vendor/bundle/ruby/2.7.0/gems/dnsruby-1.61.5/lib/dnsruby/recursor.rb
# This method is much like the normal query() method except it disables
# the recurse flag in the packet and explicitly performs the recursion.
# 
#   packet = res.query( "www.netscape.com.", "A")
#   packet = res.query( "www.netscape.com.", "A", "IN", true) # no validation
# 
# The Recursor maintains a cache of known nameservers.
# DNSSEC validation is performed unless true is passed as the fourth parameter.
This method is much like the normal query() method except it disables
the recurse flag in the packet and explicitly performs the recursion.



The Recursor maintains a cache of known nameservers.
DNSSEC validation is performed unless true is passed as the fourth parameter.
This method is much like the normal query () method except it disables the recurse flag in the packet and explicitly performs the recursion . The Recursor maintains a cache of known nameservers . DNSSEC validation is performed unless true is passed as the fourth parameter .
def query(name, type=Types.A, klass=Classes.IN, no_validation = false)
      @@mutex.synchronize {
        self.hints=(Hash.new) unless @@hints
      }
      @resolver.recurse=(0)
      @@mutex.synchronize {
        if (!@@zones_cache)
          Recursor.clear_caches(@resolver)
        end
      }
      known_zone, known_authorities = get_closest_known_zone_authorities_for(name) 
      ret =  _dorecursion( name, type, klass, known_zone, known_authorities, 0, no_validation)
      Dnssec.validate(ret) if !no_validation
      return ret
    end
def query ( name , type = Types . A , klass = Classes . IN , no_validation = false ) @@mutex . synchronize { self . hints = ( Hash . new ) unless @@hints } @resolver . recurse = ( 0 ) @@mutex . synchronize { if ( ! @@zones_cache ) Recursor . clear_caches ( @resolver ) end } known_zone , known_authorities = get_closest_known_zone_authorities_for ( name ) ret = _dorecursion ( name , type , klass , known_zone , known_authorities , 0 , no_validation ) Dnssec . validate ( ret ) if ! no_validation return ret end
This method is much like the normal query() method except it disables
the recurse flag in the packet and explicitly performs the recursion.
This method is much like the normal query () method except it disables the recurse flag in the packet and explicitly performs the recursion .
#  @TODO@ PROVIDE AN ASYNCHRONOUS SEND WHICH RETURNS MESSAGE WITH ERROR!!! #  Make sure the hint servers are initialized. #  Make sure the authority cache is clean. #  It is only used to store A and AAAA records of #  the suposedly authoritative name servers. #  TTLs are respected #  So we have normal hashes, but the array of addresses at the end is now an AddressCache #  which respects the ttls of the A/AAAA records #  Now see if we already know the zone in question #  Otherwise, see if we know any of its parents (will know at least ".") # ".", @hints if nothing else #  Seed name servers with the closest known authority #       ret =  _dorecursion( name, type, klass, ".", @hints, 0) #       print "\n\nRESPONSE:\n#{ret}\n"
name
<not_specific>
type
<not_specific>
klass
<not_specific>
no_validation
<not_specific>