GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  NET::RNDC (3)

.ds Aq ’

NAME

Net::RNDC - Speak the BIND Remote Name Daemon Control (RNDC) V1 protocol

CONTENTS

VERSION

version 0.003

SYNOPSIS

Simple 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;
    }
  }



DESCRIPTION

This 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.

    Constructor

new



  Net::RNDC->new(%args);



Optional Arguments:
o <B>keyB> - The Base64 encoded HMAC-MD5 private key to use.
o <B>hostB> - The hostname/IP of the remote server to connect to. If IO::Socket::INET6 is installed, IPv6 support will be enabled.
o <B>portB> - The port to connect to. Defaults to 953.

    Methods

do



  $rndc->do($command);

  $rndc->do($commands, %args);



Connects to the remote nameserver configured in new or passed in to <B>B>%args<B>B> and sends the specified command.

Returns 1 on success, 0 on failure.

Arguments:
o <B>B>$command<B>B> - The RNDC command to run. For example: status.
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 ALSO

Net::RNDC::Session - Manage the 4-packet RNDC session

Net::RNDC::Packet - Low level RNDC packet manipulation.

AUTHOR

Matthew Horsfall (alh) <WolfSage@gmail.com>

LICENSE

You may distribute this code under the same terms as Perl itself.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 NET::RNDC (3) 2013-01-08

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.