Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2000-05

IP Address

6 messages · 5 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Andrew Bednarz
to Eric Lai: Has anyone got a the binary of the current version of Lazarus that they could give it to…
Shane Miller wrote 7 lines
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.

Bed Now mailing straight from a linux desktop to you http://www.geocities.com/Hollywood/2430

Reply by email

Shane Miller
to Eric Lai: Has anyone got a the binary of the current version of Lazarus that they could give it to…

That's exactly what I want to do.
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.

Thanks
---------------------------------------
Shane Miller
Take a look at other product/projects of mine below!

Get paid to surf the net!
http://alladvantage.com/go.asp?refid=DEX-870

Get paid to surf the net by clicking here too!!!
http://epipo.com/sine.asp?dex870

Home page : http://www.lakefield.net/~smiller

Auto-IP Publisher : http://www.lakefield.net/~smiller/autoip

Advanced Clipboard : http://www.lakefield.net/~smiller/advclipboard

Lazarus : http://www.lazarus.freepascal.org

Earlier message 25 lines
----- Original Message ----- From: "Sebastian G�nther" To: Sent: Sunday, May 14, 2000 4:23 PM Subject: Re: [lazarus] IP Address > Shane Miller wrote: > > > > What function(s) do I use to get the IP address of the linux box via FPC? > > Why don't you just use 127.0.0.1 (a.k.a. "localhost")? > A Linux _box_ doesn't have a specific IP address, as IP addresses are > assigned to _interfaces_, not to computers! So you would have to get a > list of the local network interfaces together with their IP addresses. > > > - Sebastian > > _________________________________________________________________ > To unsubscribe: mail with > "unsubscribe" as the Subject > archives at http://www.miraclec.com/list_archives/lazarus >

Reply by email

Eric Lai

Has anyone got a the binary of the current version of Lazarus that they could give it to me... I would like to see what it looks like before start developing
________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

Reply by email

Shane Miller
to Eric Lai

What function(s) do I use to get the IP address of the linux box via FPC? ---------------------------------------
Shane Miller
Take a look at other product/projects of mine below!

Get paid to surf the net!
http://alladvantage.com/go.asp?refid=DEX-870

Get paid to surf the net by clicking here too!!!
http://epipo.com/sine.asp?dex870

Home page : http://www.lakefield.net/~smiller

Auto-IP Publisher : http://www.lakefield.net/~smiller/autoip

Advanced Clipboard : http://www.lakefield.net/~smiller/advclipboard

Lazarus : http://www.lazarus.freepascal.org

Earlier message 18 lines
----- Original Message ----- From: "Eric Lai" To: Sent: Saturday, May 13, 2000 8:03 AM Subject: [lazarus] Windows > Has anyone got a the binary of the current version of Lazarus that they > could give it to me... I would like to see what it looks like before start > developing > ________________________________________________________________________ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com > > _________________________________________________________________ > To unsubscribe: mail with > "unsubscribe" as the Subject > archives at http://www.miraclec.com/list_archives/lazarus >

Reply by email

Marc Weustink
to Eric Lai: Has anyone got a the binary of the current version of Lazarus that they could give it to…
Shane Miller wrote 8 lines
That's exactly what I want to do. 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.

In other words:

Is there a TSocket implementation. (the WinSock implementation is only a subset of the unix socket implementation so GetHostByName should be available somewhere)

Marc

Reply by email

Sebastian Günther
to Eric Lai: Has anyone got a the binary of the current version of Lazarus that they could give it to…
Shane Miller wrote
What function(s) do I use to get the IP address of the linux box via FPC?

Why don't you just use 127.0.0.1 (a.k.a. "localhost")? A Linux _box_ doesn't have a specific IP address, as IP addresses are assigned to _interfaces_, not to computers! So you would have to get a list of the local network interfaces together with their IP addresses.

- Sebastian

Reply by email