NAME

Zonemaster - A tool to check the quality of a DNS zone

SYNOPSIS

my @results = Zonemaster->test_zone('iis.se')

METHODS

test_zone($name)

Runs all available tests and returns a list of Zonemaster::Logger::Entry objects.

test_module($module, $name)

Runs all available tests for the zone with the given name in the specified module.

test_method($module, $method, @arguments)

Run one particular test method in one particular module. The requested module must be in the list of active loaded modules (that is, not the Basic module and not a module disabled by the current policy), and the method must be listed in the metadata the module exports. If those requirements are fulfilled, the method will be called with the provided arguments.

zone($name)

Returns a Zonemaster::Zone object for the given name.

ns($name, $address)

Returns a Zonemaster::Nameserver object for the given name and address.

config()

Returns the global Zonemaster::Config object.

logger()

Returns the global Zonemaster::Logger object.

all_tags()

Returns a list of all the tags that can be logged for all avilable test modules.

all_methods()

Returns a hash, where the keys are test module names and the values are lists with the names of the test methods in that module.

recurse($name, $type, $class)

Does a recursive lookup for the given name, type and class, and returns the resulting packet (if any). Simply calls Zonemaster::Recursor::recurse() on a globally stored object.

save_cache($filename)

After running the tests, save the accumulated cache to a file with the given name.

preload_cache($filename)

Before running the tests, load the cache with information from a file with the given name. This file must have the same format as is produced by save_cache().

add_fake_delegation($domain, $data)

This method adds some fake delegation information to the system. The arguments are a domain name, and a reference to a hash with delegation information. The keys in the hash must be nameserver names, and the values references to lists of IP addresses for the corresponding nameserver.

Example:

Zonemaster->add_fake_delegation(
    'lysator.liu.se' => {
        'ns.nic.se'  => [ '212.247.7.228',  '2a00:801:f0:53::53' ],
        'i.ns.se'    => [ '194.146.106.22', '2001:67c:1010:5::53' ],
        'ns3.nic.se' => [ '212.247.8.152',  '2a00:801:f0:211::152' ]
    }
);
add_fake_ds($domain, $data)

This method adds fake DS records to the system. The arguments are a domain name, and a reference to a list of references to hashes. The hashes in turn must have the keys keytag, algorithm, type and digest, with the values holding the corresponding data. The digest data should be a single unbroken string of hexadecimal digits.

Example:

Zonemaster->add_fake_ds(
   'nic.se' => [
      { keytag => 16696, algorithm => 5, type => 2, digest => '40079DDF8D09E7F10BB248A69B6630478A28EF969DDE399F95BC3B39F8CBACD7' },
      { keytag => 16696, algorithm => 5, type => 1, digest => 'EF5D421412A5EAF1230071AFFD4F585E3B2B1A60' },
   ]
);

AUTHOR

Calle Dybedahl, <calle at init.se>