<?php
require_once('libs/class.debug.php');
class switch_grabber {
private $arp;
private $mac;
private $ip;
private $port;
protected $name;
public $engine;
protected $debug;
function __construct($engine,$options = array()) {
debug::output("Checking: engines/engine.{$engine}.php",@(bool) $options['debug'],true);
if(file_exists("engines/engine.{$engine}.php")) {
debug::output("engine.{$engine}.php exists, including...",@(bool) $options['debug'],true);
require_once("engines/engine.{$engine}.php");
} else {
debug::output("engine.{$engine}.php doesn't exist.",@(bool) $options['debug'],true);
}
$this->engine = new $engine($options);
}
public function debug($tf) {
$this->debug = (bool) $tf;
$this->engine->debug = (bool) $tf;
}
public function connect() {
$call_rtn = call_user_func(array($this->engine,'connect'));
}
public function logon() {
call_user_func(array($this->engine,'logon'));
}
public function disconnect() {
call_user_func(array($this->engine,'disconnect'));
}
public function getMacPortTable() {
$call_rtn = call_user_func(array($this->engine,'_getMacPortTable'));
return $call_rtn;
}
public function getArpTable() {
$call_rtn = call_user_func(array($this->engine,'_getArpTable'));
return $call_rtn;
}
pubic function getInterfaceSettings() {
$call_rtn = call_user_func(array($this->engine,'_getInterfaceSettings'));
}
}
?>