Avisaro Online Documentation - Wiki
Impressum Kontakt Sitemap

RESOLV

Description

RESOLV transforms IP addresses, given in standard dotted format, into 32 bit signed integer values. RESOLV is also able to resolve domain names, if a name server is registered in the IP configuration of the module.  

Example

This little example prints the 32 bit signed integer representations of www.avisaro.com and 192.168.0.1

outmode -2
let a = resolv ("www.avisaro.com")
if a = 0 then
   print "could not resolve domain name"
else
   print a
end if
let a = resolv ("192.168.0.1")
if a = 0 then
   print "could not resolve ip address"
else
   print a
end if

Remarks

Since dotted IP conversion depends only on code, it works always, even the module does not have a network interface. On the other hand, resolving a domain name implies a functional network and, in most cases, internet access.