[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: Finding (dynamic/static/whatever) current IP address ?

On Mon, Dec 25, 2000 at 09:30:31AM -0800, shantanu_gwl@xxxxxxxxxxxx wrote:
> Hi all,
> Can anyone please guide as how to find the current IP address of my
> machine programmatically, like WINIPCFG in Win98 ? Any straight-forward
> way to code this in Java ?

# ifconfig -a
# ifconfig eth0

Note that "programmatically" typically means using a library call. I'm
not sure if you mean that. If you do, there is a socket ioctl which 
does that - refer to Stevens or your man pages.