|
NAMENet::RNDC - Speak the BIND Remote Name Daemon Control (RNDC) V1 protocolVERSIONversion 0.003SYNOPSISSimple synchronous command/response:use Net::RNDC; my $rndc = Net::RNDC->new( host => '127.0.0.1', port => 953, # Defaults to 953 key => 'abcd', ); if (!$rndc->do('status')) { die "RNDC failed: " . $rndc->error; } print $rndc->response; All arguments to new() are allowed in do: my $rndc = Net::RNDC->new(); my $key = 'abcd'; for my $s (qw(127.0.0.1 127.0.0.2)) { if (!$rndc->do('status', key => $key, host => $s)) { my $err = $rndc->error; } else { my $resp = $rndc->response; } } DESCRIPTIONThis package provides a synchronous, easy to use interface to the RNDC V1 protocol. For more mid-level control, see Net::RNDC::Session, and for absolute control, Net::RNDC::Packet.ConstructornewNet::RNDC->new(%args); Optional Arguments:
Methodsdo$rndc->do($command); $rndc->do($commands, %args); Connects to the remote nameserver configured in "new" or passed in to %args and sends the specified command. Returns 1 on success, 0 on failure. Arguments:
Optional Arguments - See "new" above. error $rndc->error; Returns the last string error from a call to "do", if any. Only set if "do" returns 0. response $rndc->response; Returns the last string response from a call to "do", if any. Only set if "do" returns 1. SEE ALSONet::RNDC::Session - Manage the 4-packet RNDC sessionNet::RNDC::Packet - Low level RNDC packet manipulation. AUTHORMatthew Horsfall (alh) <WolfSage@gmail.com>LICENSEYou may distribute this code under the same terms as Perl itself.
Visit the GSP FreeBSD Man Page Interface. |