Fetch All IP AddressesAuthor: Norman Deppenbroek Its very easy to display all the ip-addresses on your machine from within REBOL. First create a block where you want to store the addresses:
We will investigate the 'interfaces on the machine by using 'get-modes. The example below will return an object of all interfaces. In this example we used tcp-port 65432 and we dont need to open the tcp:// port first.
Actualy, we want to have all the addresses of the 'interfaces ( addr ) inside the object, thus we create a 'foreach loop and store its result in our 'addresses block.
Now the 'addresses contains something like:
To print the result on screen you could use a simple
'get-modes can of course also be used on other 'ports beside tcp. |