Active MAC Based Traffic Accounting
(SM-SmallSol029)
Solution’s SOSL Based management process script:
The solution defines the following main modules:
MainMacTables:
This is the main module that controls and instantiates the ‘MacTables’, ‘MacStatistics1’, ‘MacStatistics2’ modules.
The details of the Main modules and the transient Service modules are provided below:
MODULE MainMacTables ();
DESCRIPTION "MAC Address traffic Statistics";
BEGIN
POLL-FREQ
{
MODULE-CALL MacTables ();
MODULE-CALL MacStatistics1 ();
WAIT (9000);
MODULE-CALL MacStatistics2 ();
};
END
MODULE MacTables ();
DESCRIPTION "MAC Address traffic Statistics";
BEGIN
ALL-DEV BY DEV
{
SET-INDEX cipMacTable
cipMacAddress [ifIndex, INT;
cipMacDirection, INT;
cipMacAddress, MAC]);
WITH-INDEX cipMacTable
{
POLL (DEV, ifDescr, ifIndex);
};
};
END
MODULE MacStatistics1 ();
DESCRIPTION "MAC Address traffic Statistics";
BEGIN
ALL-DEV BY DEV
{
WITH-INDEX cipMacTable
{
POLL (cipMacSwitchedPkts; cipMacSwitchedBytes);
};
};
END
MODULE MacStatistics2 ();
DESCRIPTION "MAC Address traffic Statistics";
BEGIN
ALL-DEV BY DEV
{
WITH-INDEX cipMacTable
{
#####################################
###########Defining the First-Run Variables:
#####################################
DEFINE cipMacSwitchedPktsT1 MAP INT;
DEFINE cipMacSwitchedBytesT1 MAP INT;
DEFINE cipMacSwitchedPkts DB INT;
DEFINE cipMacSwitchedBytes DB INT;
#####################################
###########Populating the First-Run values:
#####################################
cipMacSwitchedPktsT1 = cipMacSwitchedPkts;
cipMacSwitchedBytesT1 = cipMacSwitchedBytes;
#####################################
######Cleaning up the database from the excess
######transient First-Run values:
#####################################
RMV (cipMacSwitchedPkts; cipMacSwitchedBytes);
#####################################
###########Populating the Database with the
###########Second-Run values:
#####################################
POLL (cipMacSwitchedPkts; cipMacSwitchedBytes);
#####################################
###########Defining the Second-Run Variables:
#####################################
DEFINE cipMacSwitchedPktsT2 MAP INT;
DEFINE cipMacSwitchedBytesT2 MAP INT;
#####################################
###########Populating the Variables with the
###########Second-Run values:
#####################################
cipMacSwitchedPktsT2 = cipMacSwitchedPkts;
cipMacSwitchedBytesT2 = cipMacSwitchedBytes;
#####################################
#######Defining and calculating Variables for
#######Populating the relevant database values:
#####################################
CounterData( DeltaCipMacSwitchedPkts,
cipMacSwitchedPktsT1,
cipMacSwitchedPktsT2);
CounterData( DeltaCipMacSwitchedBytes,
cipMacSwitchedBytesT1,
cipMacSwitchedBytesT2);
};
};
END
|
Previous Page Page 3/5 Next Page |
[Small Solutions], [Professional Solutions], [Security
Solutions], [Development Solutions]
[Home], [About],
[Solutions
Center], [NMS
Market],
[Products & Services],
[Management
Technology], [Technical Support],
[Contact us],
[Site Map]