lp.GetNextNetwork
- Get the next network container

LoriotPro has extended the LUA sripting language by providing its own LUA libraries. The new functions provided are dedicated to the creation of monitoring and SNMP automation application.

Syntax

next_net,next_mask = lp.GetNextNetwork(net,mask);

Description

The lp.GetNextNetwork LUA function gets the next network in the directory tree following the
current selected host. This function allows you to browse the directory for
networks in a program loop for example.

Warning: this function return network in their order in memory
but not from the top of the directory tree.

Parameters

next_net - The network under its IP format
next_mask - The mask under its IP format

Return Values

Nil if no other network behind
next_net - The network under its IP format
next_mask - The mask under its IP format

Example

lp_value = 0;
lp_buffer ="error";

net,mask=lp.GetFirstNetwork();

if net ~=nil then
a=1;
lp.Trace(net,mask);
while a==1 do
net,mask=lp.GetNextNetwork(net,mask);
if net==nil then a=0 end;
lp.Trace(net,mask);
end
end