LUALoriotPro WEB site

LoriotPro scripting documentation
Extensions for LUA language

Table of contents Search function

Print the current page Mail this  link UTUBE Channel version française

lp.ClearIPEventCounter

Syntax

value =  lp.ClearIPEventCounter('ip');

Description

The lp.ClearIPEventCounter LUA function performs a reset of the counter of events received by a host.

Parameters

‘ip’            The IP address of the host event counter that should be reset, a character string like : ‘ xxx.xxx.xxx.xxx‘.

Return Values

value                    1 if the operation is successfull.

nil                          an error occurs (address not find in the directory).

Example

The following example perfoms a GetIPInformation to collect the number of event received by a host, displays the value and then clears the counter with the ClearIPEventCounter function.

if lp.GetIPInformation('127.0.0.1','array') then
       lp.Print(array.eventreceived,"\n");
lp.ClearIPEventCounter('127.0.0.1');
lp.GetIPInformation('127.0.0.1','array')
       lp.Print(array.eventreceived,"\n");
end

clear event ip counter

 


www.loriotpro.com