> I need to get a list of the local ip's ( including loopbacks etc) in my > program. In windows I call functions in IPHLPAPI.DLL to accomplish this. > > I could call ifconfig and grap the potput a filter that down, but that to > me is an ugly aproach. There must be a native programming way to do this > right?
Yes, it exists, you can get by special ioctl query. Before a two weeks I have exactly same problem as you have now, so I have solution for you. ;-) See http://synapse.ararat.cz/files/contrib/ipget.zip Here you can found freepascal unit with one function what returning list of all actual local IP addresses in comma-delimited string. It working fine on i386 Linux and it maybe working on all Linux/unix platforms. For other platforms you maybe must use correct constatnt values for SIOCGIFCONF. Maybe freepascal defining this constant too with correct value for supported platforms. If yes, use freepascals constant instead. -- Lukas Gebauer. E-mail: [EMAIL PROTECTED] WEB: http://www.ararat.cz/synapse - Synapse Delphi and Kylix TCP/IP Library ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ synalist-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/synalist-public
