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

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

value = lp.GetIPDNSName("ip_address")

Description

Perform a reverse DNS resolution. Resilve form IP address to Name

Parameters

ip_address : An IP V4 addresse of the form xxx.xxx.xxx.xxx. To work this function required that the Windows operating system is be set for DNS resolution

Return Values

value : the name retrieved

Return nil if an error occurs

Example

ip=lp.GetIPAddress("www.google.com")
if ip then
dns=lp.GetIPDNSName(ip)
lp.Print(ip," ",dns,"\n");
end

dnsName = lp.GetIPDNSName("8.8.8.8")
if dnsName then
lp.Trace(dnsName)
end



www.loriotpro.com