NAME Net::ISC::DHCPd - Interacts with ISC DHCPd SYNOPSIS my $dhcpd = Net::ISC::DHCPd->new( -config => { file => "path/to/config" }, -leases => { file => "path/to/leases" }, ); See tests for more documentation. OBJECT ATTRIBUTES config $config_obj = $self->config Default: Net::ISC::DHCPd::Config. leases $leases_obj = $self->leases Default: Net::ISC::DHCPd::Leases. binary $path_to_binary = $self->binary Default: "dhcpd3" pidfile $self->pidfile($path_to_pidfile) $path_to_pidfile = $self->pidfile Default: /var/run/dhcp3-server/dhcpd.pid process $proc_obj = $self->process The object holding the dhcpd process. process_class $classname = $self->process_class The class that should spawn the process object. Needs to support the minimum api of Net::ISC::DHCPd::Process. errstr $string = $self->errstr Holds the last know errorr. METHODS BUILD Takes extra '-foo' arguments to "new()" and appends the values to the appropriate attribute. Example: $self = $class->new( -config => { file => "/foo/bar.conf", }, ); Will result in: $self = $class->new; $self->config->file("/foo/bar.conf"); start $bool = $self->start($args) Will start the dhcpd server, as long as there is no existing process. $args: { user || getpwuid $< group || getgrgid $< interfaces || "" } Returns: 1 => OK 0 => Already running undef => Failed. Check errstr() TODO: Enable it to start the server as a differnet user/group. stop $bool = $self->stop Return: 1: OK undef: Failed. Check errstr() restart $bool = $self->restart; Return: 1 => OK undef => Failed. Check errstr() status $string = $self->status Returns the status of the DHCPd server: stopped running test $bool = $self->test("config") $bool = $self->test("leases") Will test either config or leases file. 1: OK undef: Failed. Check errstr() AUTHOR Jan Henning Thorsen