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.GetLoriotProID

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

‘ip’ = lp.GetIPAddress('www.name.com');

Description

The lp.GetIPAddress LUA function performs a DNS resolution for the specified name.

Parameters

'www.name.com'          The DNS name

Return Values

‘ip’         The IP adress returned by the DNS server as a character string ‘x.x.x.x’.

nil          Si une erreur est rencontrée

Example

ip = lp.GetIPAddress('www.name.com');

if (ip) then

lp.Print("Found IP : ", ip,"\n");

else

lp.Print("Not Found IP \n");

end

ip = lp.GetIPAddress('www.78612415GJHJ.com'); 

if (ip) then

lp.Print("Found IP : ", ip,"\n");

else

lp.Print("Not Found IP \n");

end

 

DNS resolution in LUA

 

 


www.loriotpro.com