Platforms to show: All Mac Windows Linux Cross-Platform

DNSLookupMBS.FormatIP(ip as string) as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Network MBS Network Plugin 10.4 Yes Yes Yes Yes No
Function: Formats an IP from binary representation into string representation.
Example:
dim s as string = DNSLookupMBS.ParseIPv4("65.66.67.68")

MsgBox s // in binary representation of that IP

dim t as string = DNSLookupMBS.FormatIP(s)

MsgBox t
Notes:
Formats both IPv4 and IPv6 IP addresses in binary representation into human readable text.
On Windows IPv6 is only supported on Windows Vista and newer.
Returns empty string on failure.

Feedback, Comments & Corrections

DNSLookupMBS.LookupHostbyAddress(HostAddressBinary as string) as DNSLookupMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Network MBS Network Plugin 11.3 Yes Yes Yes Yes No
Function: Queries the DNS server for information about a host IP address.
Example:
dim l as DNSLookupMBS
dim a as string

a = DNSLookupMBS.ParseIPv4("17.254.0.91")

// try it...
l = DNSLookupMBS.LookupHostbyAddress(a)

// success...
MsgBox l.Name
Notes:
The address must be a 4 byte IP address like the ones returned by DNSLookupMBS.Address.
Returns nil on any error.

Feedback, Comments & Corrections

DNSLookupMBS.LookupHostbyAddressMT(HostAddressBinary as string) as DNSLookupMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Network MBS Network Plugin 11.3 Yes Yes Yes Yes No
Function: Queries the DNS server for information about a host IP address.
Example:
dim l as DNSLookupMBS
dim a as string

a = DNSLookupMBS.ParseIPv4("17.254.0.91")

// try it...
l = DNSLookupMBS.LookupHostbyAddressMT(a)

// success...
MsgBox l.Name
Notes:
Same as LookupHostbyAddress, but with additional multithreading.

The address must be a 4 byte IP address like the ones returned by DNSLookupMBS.Address.
Returns nil on any error.

The work is performed on a preemptive thread, so this function does not block the application and can yield time to other Xojo threads. Must be called in a Xojo thread to enjoy benefits. If called in main thread will block, but keep other background threads running.

Feedback, Comments & Corrections

DNSLookupMBS.LookupHostbyName(HostName as string) as DNSLookupMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Network MBS Network Plugin 11.3 Yes Yes Yes Yes No
Function: Queries the DNS server for information about a host name.
Example:
dim s as DNSLookupMBS = DNSLookupMBS.LookupHostbyName("www.monkeybreadsoftware.de")

dim c as Integer = s.AddressesCount-1
for i as Integer = 0 to c
dim ss as string = s.Addresses(i)
print str(s.FormatIP(ss))
next
Notes:
Will fail if you pass an IP as an host. (e.g. 10.20.30.40)
Returns nil on any error.

See also:

Feedback, Comments & Corrections

DNSLookupMBS.LookupHostbyName(HostName as string, AddressType as Integer) as DNSLookupMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Network MBS Network Plugin 11.3 Yes Yes Yes Yes No
Function: Queries the DNS server for information about a host name.
Example:
dim s as DNSLookupMBS = DNSLookupMBS.LookupHostbyName("ipv6.google.com", DNSLookupMBS.AddressTypeIPv6)

if s<>nil then
dim c as Integer = s.AddressesCount-1
for i as Integer = 0 to c
dim ss as string = s.Addresses(i)
print str(s.FormatIP(ss))
next
end if

s = DNSLookupMBS.LookupHostbyName("www.six.heise.de", DNSLookupMBS.AddressTypeIPv6)

if s<>nil then
dim c as Integer = s.AddressesCount-1
for i as Integer = 0 to c
dim ss as string = s.Addresses(i)
print str(s.FormatIP(ss))
next
end if
Notes:
Will fail if you pass an IP as an host. (e.g. 10.20.30.40)
Returns nil on any error.

IPv6 on Windows does not work with this method.

See also:

Feedback, Comments & Corrections

DNSLookupMBS.LookupHostbyNameMT(HostName as string) as DNSLookupMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Network MBS Network Plugin 11.3 Yes Yes Yes Yes No
Function: Queries the DNS server for information about a host name.
Example:
dim s as DNSLookupMBS = DNSLookupMBS.LookupHostbyNameMT("www.monkeybreadsoftware.de")

dim c as Integer = s.AddressesCount-1
for i as Integer = 0 to c
dim ss as string = s.Addresses(i)
print str(s.FormatIP(ss))
next
Notes:
Same as LookupHostbyName, but with additional multithreading.

Will fail if you pass an IP as an host. (e.g. 10.20.30.40)
Returns nil on any error.

The work is performed on a preemptive thread, so this function does not block the application and can yield time to other Xojo threads. Must be called in a Xojo thread to enjoy benefits. If called in main thread will block, but keep other background threads running.

See also:

Feedback, Comments & Corrections

DNSLookupMBS.LookupHostbyNameMT(HostName as string, AddressType as Integer) as DNSLookupMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Network MBS Network Plugin 11.3 Yes Yes Yes Yes No
Function: Queries the DNS server for information about a host name.
Example:
dim s as DNSLookupMBS = DNSLookupMBS.LookupHostbyNameMT("ipv6.google.com", DNSLookupMBS.AddressTypeIPv6)

if s<>nil then
dim c as Integer = s.AddressesCount-1
for i as Integer = 0 to c
dim ss as string = s.Addresses(i)
print str(s.FormatIP(ss))
next
end if

s = DNSLookupMBS.LookupHostbyNameMT("www.six.heise.de", DNSLookupMBS.AddressTypeIPv6)

if s<>nil then
dim c as Integer = s.AddressesCount-1
for i as Integer = 0 to c
dim ss as string = s.Addresses(i)
print str(s.FormatIP(ss))
next
end if
Notes:
Same as LookupHostbyName, but with additional multithreading.

Will fail if you pass an IP as an host. (e.g. 10.20.30.40)
Returns nil on any error.

IPv6 on Windows does not work with this method.

The work is performed on a preemptive thread, so this function does not block the application and can yield time to other Xojo threads. Must be called in a Xojo thread to enjoy benefits. If called in main thread will block, but keep other background threads running.

See also:

Feedback, Comments & Corrections

DNSLookupMBS.ParseIPv4(ip as string) as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Network MBS Network Plugin 10.4 Yes Yes Yes Yes No
Function: Parses an IP address in IPv4 format.
Example:
dim s as string = DNSLookupMBS.ParseIPv4("65.66.67.68")

MsgBox s // in binary representation of that IP

dim t as string = DNSLookupMBS.FormatIP(s)

MsgBox t
Notes:
Returns empty string on failure.
Works only for IPv4 strings.

Feedback, Comments & Corrections

DNSLookupMBS.ParseIPv6(ip as string) as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Network MBS Network Plugin 10.4 Yes Yes Yes Yes No
Function: Parses an IP address in IPv6 format.
Example:
dim s as string = DNSLookupMBS.ParseIPv6("2001:0db8:85a3:08d3:1319:8a2e:0370:7344")

MsgBox s // in binary representation of that IP

dim t as string = DNSLookupMBS.FormatIP(s)

MsgBox t
Notes:
Returns empty string on failure.
Works only for IPv6 strings.

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS Network Plugin.

The biggest plugin in space...




Links
MBS FileMaker Plugins