Omapi-perl

James J J Hooper jjj.hooper at bristol.ac.uk
Mon Jul 17 11:54:12 UTC 2006


Hi,
  I know this isn't an ISC thing but I'm hoping someone on this list knows 
where I'm going wrong!

I'm trying to get perl to interface with dhcpd via omapi.

Running 'make test' of Omapi-perl ( 
<http://nickg.home.cern.ch/nickg/dhcpd/omapiperl.html> ) with dhcpd 3.0.3 
and I get the following error:

make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-Iblib/lib" "-Iblib/arch" test.pl
1..10
# Running under perl version 5.008005 for linux
# Current time local: Fri Jul 14 17:00:51 2006
# Current time GMT:   Fri Jul 14 16:00:51 2006
# Using Test.pm version 1.25
Loading OMAPI-perl libs....     ok 1
Connection test....             ok 2
Unable to issue a wait (68)
Create_host() test....          not ok 3
# Failed test 3 in test.pl


I think this is due to my key being setup incorrectly. In dhcpd.conf I have:


key fred {
  algorithm hmac-md5.sig-alg.reg.int;
  secret 
"7hl6k1YmcznLsVo7LmPM7i2wH1tb2B1zbb7jV+hy5FioQU15pYo9kXqNdbbVq8EQG5Op2IpVl9f+2l/lJz+0ZQ==";
}
omapi-port 6666;
omapi-key fred;
subnet 192.168.223.0 netmask 255.255.255.0 {
omapi-key fred;
}

In test.pl of Omapi-perl I have:

# don't forget to set these variables
$key = 
decode_base64('7hl6k1YmcznLsVo7LmPM7i2wH1tb2B1zbb7jV+hy5FioQU15pYo9kXqN 
dbbVq8EQG5Op2IpVl9f+2l/lJz+0ZQ==');
$loginkey = 'fred:'.$key;
$servername = '127.0.0.1';
$port = 6666;


Can anyone see the problem?  Alternatively, does anyone know of an 
alternate / better way to get perl to talk omapi?

Thanks,
  James

--
James J J Hooper,
Information Services
University of Bristol
--



More information about the dhcp-users mailing list