First I define a struct hostent pointer as this struct hostent *phost; char szhostname[128]; then get the host IP address, gethostname( szhostname,128 );//get host name printf( szhostname ); phost = gethostbyname( szhostname );//get host IP finally, store the host IP address into struct_in variable addr. ( ( sockaddr_in* ) &addr )->sin_addr.S_un.S_addr = htonl((unsigned int)((unsigned char*)phost->h_addr_list[0]));//get the host IP address Is this ...