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.GetNetworkFromIP - Get the network of an IP address from the LoriotPro directory

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

net,mask = lp.GetNetworkFromIP(ip);

Description

Return the network number and mask of an IP address of the directory. If multiple networks exist with similar addresses it return the most similar one.

This is not the network container under where you can define host but the physical network.

Parameters

ip - The IP address

Return Values

Nil if the network is associated

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.GetNetworkFromIP("82.65.181.65");

if net~= nil then
lp.Trace(net,mask);
end





www.loriotpro.com