MODULE
IpAccounting ();
DESCRIPTION
"IP Address traffic Statistics";
BEGIN
ALL-DEV BY DEV
{
DEFINE actCheckPointVar
INT;
actCheckPointVar = POLL
(actCheckPoint);
SET (actCheckPoint
actCheckPointVar);
SET-INDEX lipCkAccountingTable (ckactSrc
[ckactSrc, IP; ckactDst, IP]) BY-INDEX;
WITH-INDEX lipCkAccountingTable
{
POLL
(ckactPkts; ckactBytes);
};
};
END
MODULE
MacTables ();
DESCRIPTION
"MAC Address traffic Statistics";
BEGIN
ALL-DEV BY DEV
{
SET-INDEX cipMacTable
(cipMacAddress [ifIndex, INT;
cipMacDirection,
INT;
cipMacAddress, MAC]) BY-INDEX;
WITH-INDEX cipMacTable
{
DEFINE
ifDescr DB DISPL;
DEFINE
ifIndex DB INT;
POLL (DEV, ifDescr,
ifIndex);
};
};
END
MODULE
IpAccountingStats ();
DESCRIPTION
"IP Address traffic Statistics";
BEGIN
ALL-DEV BY DEV
{
WITH-INDEX lipCkAccountingTable
{
#####################################
###########Defining the First-Run Variables:
#####################################
DEFINE ckactPktsT1 MAP INT;
DEFINE ckactBytesT1 MAP INT;
DEFINE ckactPkts DB INT;
DEFINE ckactBytes DB INT;
#####################################
###########Populating the First-Run values:
#####################################
ckactPktsT1
= ckactPkts;
ckactBytesT1
= ckactBytes;
#####################################
######Cleaning up the database from the excess
######transient First-Run values:
#####################################
RMV (ckactPkts; ckactBytes);
#####################################
###########Populating the Database with the
###########Second-Run values:
#####################################
MODULE-CALL
IpAccounting
();
#####################################
###########Defining the Second-Run Variables:
#####################################
DEFINE ckactPktsT2 MAP INT;
DEFINE ckactBytesT2 MAP INT;
#####################################
###########Populating the Variables with the
###########Second-Run values:
#####################################
ckactPktsT2
= ckactPkts;
ckactBytesT2
= ckactBytes;
#####################################
#######Defining and calculating Variables for
#######Populating the relevant database values:
#####################################
CounterData( DeltackactPkts,
ckactPktsT1,
ckactPktsT2);
CounterData( DeltackactBytes,
ckactBytesT1,
ckactBytesT2);
};
};
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