gethostbyaddr用法

struct in_addr address; 

address.s_addr = inet_addr(argv[1]); 

host = gethostbyaddr((char *)&address, 4, AF_INET);  //得到主机的相关信息

你可能感兴趣的:(职场,休闲)