DNS::TinyDNS::dnscache - Perl extension for manipulating dnscache from djbdns
use DNS::TinyDNS; # First create the object my $dnscache = DNS::TinyDNS->new(type => 'dnscache', dir => '/service/dnscachex'); # Manage the allowed ips to use this cache my @ips=$dnscache->list_ips; $dnscache->add_ip('10.0.0.1'); $dnscache->del_ip('10.0.0'); # Manage root servers my @root_servers=$dnscache->list_servers; $dnscache->add_server('10.0.0.1'); $dnscache->del_server('10.0.0.1'); # Manage the enviroment $dnscache->set_env( cachesize => 100000, ip => '10.0.0.1'); my ($cache,$ip) = $dnscache->get_env( 'cachesize', 'ip' );
This module will allow you to manipulate djbdns dnscache files.
Returns a list/reference of all the ips/nets allowed to use this cache server
# Returns a list my @ips = $dnscache->list_ips; # Returns an array ref my $ips = $dnscache->list_ips;
Adds an ips/nets to use this cache server
$dnscache->add_ip('10.0.0');
This let all 10.0.0.0/24 to use this dnsserver.
Remove an ips/nets of the list of allowed ips
$dnscache->del_ip('10.0.0');
This deletes All entries of 10.0.0.0/24 allowed to use this dnscache.
All entries
Returns a list/reference of the root servers
# Returns a list my @root_servers = $dnscache->list_servers; # Returns an array ref my $root_servers = $dnscache->list_servers;
Add a root server
$dnscache->add_server('10.0.0.1') or warn "Cant add server";
Deletes a root server
$dnscache->del_server('10.0.0.1') or warn "Cant del server";
You can set/get this vars:
IP IPSEND CACHESIZE DATALIMIT ROOT
For further information about every var, consult djbdns cache documentation at http://cr.yp.to/
http://cr.yp.to/
Anarion: anarion@7a69ezine.org
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
DNS::TinyDNS. DNS::TinyDNS::dnsserver.
12 POD Errors
The following errors were encountered while parsing the POD:
You forgot a '=back' before '=head2'
=back without =over
To install DNS::TinyDNS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DNS::TinyDNS
CPAN shell
perl -MCPAN -e shell install DNS::TinyDNS
For more information on module installation, please visit the detailed CPAN module installation guide.