IP adress in Linux?

This is a discussion on IP adress in Linux? within the Linux Programming forums, part of the Platform Specific Boards category; Well I have 2 questions!
1. How do I find out the IP adress of the PC I'm will run ...

IP adress in Linux?

Well I have 2 questions!
1. How do I find out the IP adress of the PC I'm will run the program I'm trying to write? Can anyone post the code?
2. In windows there are these apps who work in the background in the taskbar, has Linux a smiliar thing, any tutorials?

Alternatively, depending on which windows/desktop environment you're using there are various tools which will display this information. Gnome has Network Tools in the System Tools menu. KDE's Control Center usually displays that information when executed.

Alternatively, depending on which windows/desktop environment you're using there are various tools which will display this information. Gnome has Network Tools in the System Tools menu. KDE's Control Center usually displays that information when executed.

What I think he is trying to get at is how to do it inside a program, which means he should probably learn something about sockets.

Also, in *nix most background programs that run without user input are called Daemons.

My only thought is why did the thread starter ask both of these questions? If we could get some more input it might help us out too.

EDIT: Just check out some of his previous postings, looks like he is trying to send data over the net, just needs to learn how. I would suggest looking into Socket programming, and their are some good libraries out there that help with that. The one I have currenlty been looking into is called ACE You can check it out here.

Wow people I'm really happy about the interest, sorry It took so long! Well what i want to get is a programm that would run as a Daemon, it would get my IP adress periodicly every 2 hours and compare it with the previous recoreded one! If they aren't the same he would send this IP number to a DynDNS service. I know there are probably many of these progs but i wanted to learn something about this topic!

Wow people I'm really happy about the interest, sorry It took so long! Well what i want to get is a programm that would run as a Daemon, it would get my IP adress periodicly every 2 hours and compare it with the previous recoreded one! If they aren't the same he would send this IP number to a DynDNS service. I know there are probably many of these progs but i wanted to learn something about this topic!

Ok, that does help a bit. You also might want to be able to specify which interface to pool when you get into it some more, as some hosts (router maybe) will have more then one interface. I don't have my books with me though to look up how its normally done.