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.


net,mask = lp.GetNetworkFromIP(ip);


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.


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


lp_value = 0;
lp_buffer ="error";


if net~= nil then