PDA

View Full Version : Trivial Networking Question, gethostbyname



lnajt
January 25th, 2009, 07:50 AM
I am writing some code for my Systems class, and I need someway to get my local IP address. Every attempt so far (passing localhost through getaddrinfo) has proved fruitless - I've gotten 127.0.0.1 every time. Should I pass something else, or is there an easier method?

Thanks,

lnajt
January 25th, 2009, 08:17 AM
nvm