Use the Network commands to return the full host name and IP address of a specified host, or obtain a table of network interface names and their IP addresses.
Return an object with the name (.name) and addresses (.addresses) of a specified host, where .addresses is a table of strings.
Network.GetHostByName('host')
host : The host name for which to obtain network information.
local ghbn = Network.GetHostByName('localhost') print("GetHostByName("..ghbn.name..")") for _, item in ipairs(ghbn.addresses) do print("-"..item) end
GetHostByName(US-MYCOMPUTER-123.mydomain.com) -127.0.0.1
Return a table of network interface names (.Interface) and the IP address (.Address), MAC address (.MACAddress), broadcast address (.BroadcastAddress), gateway (.Gateway), and netmask (.Netmask) for each.
Network.Interfaces()
local ni = Network.Interfaces() for _, item in ipairs(ni) do print("-"..item.Interface, " = \n IP ", item.Address,"\n MAC",item.MACAddress,"\n Broadcast", item.BroadcastAddress,"\n Gateway",item.Gateway,"\n Netmask",item.Netmask) end
-LAN A = IP 192.0.2.50 MAC 00:01:99:98:A1:A9 Broadcast 192.0.3.200 Gateway 192.0.3.199 Netmask 255.255.255.0
Software and Firmware | Resources | QSC Self Help Portal | Q-SYS Help Feedback
Copyright © 2019 QSC, LLC. Click here for trademark and other legal notices. | Q-SYS 8.1.1