Chillibear
A place for notes about stuff

IP addresses of the current machine

So how do you get a list of all the IP addresses bound to the local ethernet adapter? Easy use the built in global stack; GStack. All you need to do is add IdStack to your uses clause and your away!

uses
IdStack;

CheckListBox1.Clear;
CheckListBox1.Items := GStack.LocalAddresses;
CheckListBox1.Items.Insert(0, '127.0.0.1');

Note that I’ve added the local loopback address manually.