Retrieve a description of the connection open through the network interface
Device (from impOS™ 42)
Table — connection configuration information
This is draft documentation which covers impOS™ functionality that, though currently in internal development, has been made available to a number of customers for testing purposes only. Both the functionality described here and the documentation itself are subject to change, including breaking changes, and may differ significantly from their final release versions.
This method returns a table which details the interface’s currently open connection. This table currently contains a single key, ipv4, whose value is itself a table containing the following primary keys:
|address||String||The imp’s IP address, eg.
|broadcast||String||The network router’s broadcast IP address eg.
|dhcpserver||String||The DHCP server’s IP address, or absent if the imp has a static IP address|
|dnsserver||Array||One or two DNS server addresses each in
|gateway||String||The network’s gateway IP address eg.
|netmask||String||The network’s mask eg.
|proxy||Table||A proxy server’s details (see below), or absent if no proxy has been set (with imp.setproxy())|
|server||Table||The imp server’s connection details (see below)|
The ipv4 table’s proxy key’s value, if present, is itself a table with the following keys:
|address||String||The proxy’s IP address, eg.
|port||Integer||The proxy’s port, eg. 80|
|type||Integer||The proxy type (see imp.setproxy())|
|user||String||The proxy username, when configured|
The ipv4 table’s server key’s value is a table with the following keys:
|errorpolicy||Integer||SUSPEND_ON_ERROR or RETURN_ON_ERROR|
|port||Integer||The server’s port, eg. 31314|
|tcpsendwindow||Integer||TCP window size in bytes|
|tcptimeout||Float||Timeout in seconds|
|tcpwaitfor||Integer||WAIT_TIL_SENT or WAIT_FOR_ACK|
Note This information mirrors the ipv4 table included in the data returned by imp.net.info().