index 7f7ad2297d9f895919b781adfb000248974f69ce..408d80ac667963633d09b2bad95ee6182e84634f 100644 (file)
package ArpHandler;
-use Exporter;
-@ISA = ("Exporter");
-
use strict;
use warnings;
-use GOSA::GosaSupportDaemon;
-use POSIX;
-use Fcntl;
+
use Net::LDAP;
use Net::LDAP::LDIF;
use Net::LDAP::Entry;
use Net::DNS;
use Switch;
use Data::Dumper;
+use GOsaSI::GosaSupportDaemon;
+
+use Exporter;
+use POSIX;
+use Fcntl;
use Socket;
+our @ISA = ("Exporter");
+
# Don't start if some of the modules are missing
my $start_service=1;
my $lookup_vendor=1;
},
);
+# to be removed use only main::read_configfile
#=== FUNCTION ================================================================
# NAME: read_configfile
# PARAMETERS: cfg_file - string -
# Don't start if some of the modules are missing
if(($arp_enabled eq 'true') && $start_service) {
if($lookup_vendor) {
+ # put the file in /etc/gosa/oui.txt or use the native oui.txt from snmp
eval("Net::MAC::Vendor::load_cache('file:///usr/lib/gosa-si/modules/oui.txt')");
if($@) {
&main::daemon_log("Loading OUI cache file failed! MAC Vendor lookup disabled", 1);
my $mac=shift;
my $result={};
- my $ldap_handle = &main::get_ldap_handle();
+ my $ldap_handle = &main::get_ldap_handle();
if(defined($ldap_handle)) {
my $ldap_result= &search_ldap_entry(
$ldap_handle,
if($result->code == 68) { # entry already exists
&main::daemon_log("A WARNING: $dn ".$result->error, 3);
} elsif($result->code == 0) { # everything went fine
- &main::daemon_log("add entry $dn to ldap", 1);
+ &main::daemon_log("A INFO: Add entry $dn to ldap", 5);
} else { # if any other error occur
&main::daemon_log("A ERROR: $dn, ".$result->code.", ".$result->error, 1);
}
} else {
- &main::daemon_log("A Not adding new Entry: LDAP disabled", 6);
+ &main::daemon_log("A INFO: Not adding new Entry: LDAP disabled", 5);
}
return;
}