Re: find ip address



On Tue, 2003-10-28 at 15:03, Stefano Pistelli wrote:
> how can i find ip address of my pc?

You probably won't find that answer here, since that has nothing to do
with GTK or GLib so far as I know, and since GTK runs on several
platforms, unless there is a wrapper function in GLIB to return this
kind of information, there is no one way to tell you.  Also computers
don't have one ip address only.  All modern PCs have a local loopback ip
address, and many of the machines I use have multiple address (one has 7
ip addresses).  Basically you'll have to use your operating system calls
to interrogate the network interfaces in your machine and find out what
IP addrs are bound to them.  Then you'll probably also need to consult
the routing table to determine which of the ip addrs your network
traffic is expected to send and receive on.

Michael


> 
> thx so much
-- 
Michael Torrie <torriem chem byu edu>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]