5.2 数据库函数
5.2.1 gethostbyaddr()
简述:
返回对应于给定地址的主机信息。
#include <winsock.h>
struct hostent FAR *PASCAL FAR gethostbyaddr(const char
FAR * addr, int len, int type);
addr:指向网络字节顺序地址的指针。
len: 地址的长度,在PF_INET类型地址中为4。
type:地址类型,应为PF_INET。
注释:
gethostbyaddr()返回对应于给定地址的包含主机名字和地址信息的hostent结构指针。结构的声明如下:
struct hostent {
char FAR * h_name;
char FAR * FAR *&nb