C code: how get IP adress

Jan 19, 2010 at 5:47pm
Hi all,

can you help me to find a C code that retrieve IP address? I'm not expert programmer about socket and network.
I need simple code that can get the etho address not 127.0.0.1

Thank in advance
Jan 19, 2010 at 7:00pm
If you want to do network programming, you really need to read this book: http://books.google.com/books?id=ptSC4LpwGA0C&printsec=frontcover

Jan 19, 2010 at 9:23pm
Why Unix networking programming?
Jan 19, 2010 at 9:47pm
Because that book is still the definitive reference.
Jan 19, 2010 at 10:01pm
Beej's guide is also very, very useful.
http://beej.us/guide/bgnet (I typed that from memory, so apologies if it's broken).
Last edited on Jan 19, 2010 at 10:01pm
Topic archived. No new replies allowed.