[fpc-pascal] Find out local IP adress
Ralf A. Quint
FreeDOS at gmx.net
Sun Mar 22 21:33:55 CET 2009
At 01:21 PM 3/22/2009, David W Noon wrote:
>On Sun, 2009-03-22 at 20:36 +0100, Rainer Stratmann wrote:
> > Am Sonntag, 22. MÃ¤rz 2009 20:24 schrieb Jonas Maebe:
> > > On 22 Mar 2009, at 20:21, Rainer Stratmann wrote:
> > > > May be there exists another way to find out the local IP adress.
> > >
> > > "The" local ip address does not exist. A system can have multiple
> > > network cards, there can be vpn tunnels, NAT gateways to other
> > > networks and virtual machines, ... Which of these local addresses are
> > > you interested in?
> > The IP adress of the network card(s).
>Since the machine can have several NICs, you first need to decide which
I would say that would be pretty easy as well,
use the NIC which has the default gateway (the one with the lowest metric)...
More information about the fpc-pascal