1.从点分十进制的IP地址转换成sockaddr_in
struct sockaddr_in ina; ina.sin_addr.s_addr=inet_addr(”164.112.175.124”);
2.sockaddr_in转换成IP地址字符串
inet_ntoa(ina.sin_addr)