DNSCheck(3)

NAME
DNSCheck - DNS Check Tools

DESCRIPTION
This module provides the external interface to the actual tests in the DNSCheck system.

METHODS

->new($confighashref);
    "confighashref" is a reference to a hash holding configuration keys. They will be blindly used to create a DNSCheck::Config object, unless one key is "with_config_object". If there is such a key, its value will be used as the DNSCheck::Config object. No check to see if it actually is such an object will be done, so anything that responds to the right methods can be used.

    Providing a pre-created config object can be useful when creating and discarding a large number of DNSCheck objects, since config object creation normally stands for the majority of the time it takes to create such an object. Creating the config object once and then providing it to every DNSCheck may save considerable time in the long run. An example if this use can be found in the "dnscheck-dispatcher" application.

->flush()
    Flush the internal DNS cache.

->logger()
    Return the logger object. It is of type DNSCheck::Logger.

->dns()
    Return the DNS lookup object. It is of type DNSCeck::Lookup::DNS.

->resolver()
    Returns the actual recursing resolver object.

->asn()
    Return the ASN lookup object. It is of type DNSCheck::Lookup::ASN.

->config()
    Return the config object. It will be of type DNSCheck::Config unless something different was given to "new" as described above.

->dbh()
    Return a live database connection (DBI) object, if database access is configured. If not, returns "undef". If a database connection is configured, it should point at a database with the dnscheck schema loaded, or the first sub-module here to try and use the database will throw an exception and cause the script to die.

    This method uses DBI::ping() to determine if a connection is alive or not, so make sure to use a DBI adapter where that isn't a null operation (as it used to be in older versions of DBD::mysql). Also, since the included database schema assumes that the database is MySQL, this method will try to connect to the server five times before it gives up and dies.

->add_fake_glue($zone, $nsname, [$nsip])
    Add an item of "fake" glue data. For the given zone, the provided information will be used instead of what can be found live in DNS (if any). If an IP address is provided, it will be used. If not, an attempt to look up addresses for the name will be made. If that attempt fails, the name will be ignored.

->undelegated_test()
    This method returns true of any "fake" glue information has been provided.

->log_nameserver_times($zone)
    Extracts response timing data for the given zone's nameservers from the resolver object and adds the information as log messages. Has to be called after a test is run, since before there is obviously no data to extract.

->zone()
->host()
->address()
->soa()
->connectivity()
->consistency()
->delegation()
->nameserver()
->dnssec()
->mail()
    These ten methods all return properly configured objects of the respective test classes. For more details on how to use the objects, see the documentation on the modules in question. Generally, though, they have a main entry method called "test" that runs all available tests with the arguments given.

    The objects returned are created on first request and cached for future use. Use the "flush()" method to discard the existing objects, so that new ones will be created on next request.

EXAMPLES
   use DNSCheck;

   my $dc = DNSCheck->new;
   $dc->zone->test("iis.se");
   $dc->logger->dump;

KNOWN PROBLEMS

Limited DNSSEC signature validity span.
    If DNSCheck is run with a perl interpreter that uses 32-bit integers, it will erroneously report DNSSEC signatures with expire dates after 19 Jan 2038 as being invalid.

SEE ALSO
DNSCheck::Config.pm, DNSCheck::Locale.pm, DNSCheck::Logger.pm, DNSCheck::Lookup::ASN.pm, DNSCheck::Lookup::DNS.pm, DNSCheck::Test::Address.pm, DNSCheck::Test::Common.pm, DNSCheck::Test::Connectivity.pm, DNSCheck::Test::Consistency.pm, DNSCheck::Test::Delegation.pm, DNSCheck::Test::DNSSEC.pm, DNSCheck::Test::Host.pm, DNSCheck::Test::Mail.pm, DNSCheck::Test::Nameserver.pm, DNSCheck::Test::SOA.pm, DNSCheck::Test::Zone.pm