| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Hi there!
I have a little question for you all. I try to get the local IP of my
system. I came to this solution:
char name[32];
hostent* host;
gethostname(name, 32);
host = gethostbyname(name);
while(host->h_addr_list[i] != NULL) //display IPs here.
Works great but only for 127.0.0.1, not my other 192.168.0.10 IP.
Is there a way to bypass that? Find the IP and go to sleep?;)
| References: | |
| >Localhost IP (From: "Julien Guimont" <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.