char hostname[50];
gethostname(hostname,50);
phost = gethostbyname(hostname);
iplist = phost->h_addr_list;inet_ntoa( * (struct in_addr * ) * iplist)
就是这句:inet_ntoa( * (struct in_addr * ) * iplist)