[lazarus] IP Address

Andrew Bednarz bed42 at primus.com.au
Sun May 14 23:27:33 EDT 2000

On Mon, 15 May 2000, Shane Miller wrote:

> I know IP addresses aren't assigned to the PC.  I was asking it as a general
> question.  I didn't think I needed to get that specific.
> Here is the question restated:
> How do I get the IP address(es) of the network card(s) on a linux box?  I
> don't want to use localhost because that IP address isn't usable outside
> that PC.  In windows I do a gethostname then a GetHostByName which returns a
> record containing the IP addresses.

	"/sbin/route" should do it (parse the output)
or the "/proc/net/route" file contains the info too.

   Now mailing straight from a linux desktop to you

More information about the Lazarus mailing list