On 4 March 2017 at 09:40, Hari Balaraman hari.balaraman@icloud.com wrote:
Hi All,
I was wondering if there is a way to figure out the IP addresses of various network interfaces on a host machine. I've looked at some traffic on the list from a few years ago (6-7 years ago) that appeared to indicate there was no way to do this. As far as I could tell, there was a workaround using (running regularly) shell script that would write interface information to a file that could then be scooped up by the image.
I was wondering if things have changed.
I'd like an application to be aware of and be able to provide the IP address and port it is listening on for requests from the outside world (not localhost.)
Thanks in advance.
Kind regards,
Hari
I'm unaware of any Squeak library doing this, but sounds like you want an FFI interface to the iphlpapi DLL, on a Windows box. That will let you iterate over interfaces, addresses of interfaces, and so on. It's in Delphi, but you can see the APIs can be used here: https://github.com/frankshearar/SipStack/blob/master/src/IdNetworking.pas
frank