\VlanMacHistory
Vlan MAC history class
Synopsis
class VlanMacHistory
{
- // constants
- const MODULE = "vlan_mac_history";
- const MODULE_URL = "?module=vlan_mac_history";
- const DB_NAME = "vlan_mac_history";
- const FLAGPREFIX = 'exports/ONLINEVLANS';
- // members
- protected array $AllSwitches = ;
- protected array $AllSwitchModels = ;
- protected array $allTerminators = ;
- protected array $allVlanHosts = ;
- protected array $altCfg = ;
- public array $allHistory = ;
- // methods
- public void __construct()
- protected void LoadTerminators()
- protected void LoadAlter()
- protected void LoadVlanHosts()
- protected void LoadAllSwitches()
- protected void LoadAllSwitchModels()
- protected void LoadVlanMacHistory()
- protected string GetTerminatorSnmpTemplate()
- protected string GetOnlineDetectOid()
- public string GetUserVlanOnline()
- public void WriteVlanMacData()
- protected void WriteHistory()
- protected string dec2mac()
- public void RenderHistory()
Constants
Name | Value |
---|---|
MODULE | "vlan_mac_history" |
MODULE_URL | "?module=vlan_mac_history" |
DB_NAME | "vlan_mac_history" |
FLAGPREFIX | 'exports/ONLINEVLANS' |
Members
protected
- $AllSwitchModels
—
array
Contains all available switch models data - $AllSwitches
—
array
Contains all available switches data - $allTerminators
—
array
Contains all vlan terminators data - $allVlanHosts
—
array
Contains all vlan hosts data - $altCfg
—
array
Contains system alter config as key=>value
public
- $allHistory
—
array
Contains all vlan and mac history
Methods
protected
- GetOnlineDetectOid() — Read online detect oid from snmp template
- GetTerminatorSnmpTemplate() — Find vlan terminators snmp template
- LoadAllSwitchModels() — Function for getting all switch models and place them to $AllSwitchModels
- LoadAllSwitches() — Function for getting all switches and place them to $AllSwitches
- LoadAlter() — load alter.ini config
- LoadTerminators() — load all data from `vlan_terminators` to $allTerminators
- LoadVlanHosts() — load all data from vlanhosts to $allVlanHosts
- LoadVlanMacHistory() — load all from `vlan_mac_history` to $allHistory
- WriteHistory() — Get parsed snmp data about vlan, mac and time when device was assigned IP address and write it to DB
- dec2mac() — Converts decimal (delimiter is dot) MAC to heximal (delimiter is semicolon)
public
- __construct()
- GetUserVlanOnline() — Check weather user online
- RenderHistory() — Gether web form and return in in table view
- WriteVlanMacData() — Parse snmp reply and pass it to function which writes data to DB