[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: How to get current IP adress ?
From:       Russell Steffen <rsteffen () bayarea ! net>
Date:       1999-10-03 20:51:55
[Download RAW message or body]

On Sun, 3 Oct 1999, Uwe Thiem wrote:

> On Sun, 3 Oct 1999, Markus Goetz wrote:
> 
> > >> Hi,
> > >> 
> > >> how can i get the current ip adress of the user when he is online ?
> > >
> > >Not sure what you mean. The IP address the ppp device gets when pppd
> > >connects? You can parse the output of "ifconfig".
> > 
> > Yes, like the ip i get when i look at ppp0 at ifconfig. But a more portable
> > posibility !
> 
> What's unportable with ifconfig?

ifconfig on different platforms has very different looking output. There
may not be a completley portable way to get the IP address of an
interface, bit must every platform I've ever used has had an ioctl() (or
similar) interface to get that kind of information.

Russ
-- 
Russ Steffen
rsteffen@ia.net

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic