main.c --------------------------------------------------------  #include <sys/types.h>        #include <sys/socket.h&
原创 2013-01-29 15:31:03
946阅读
描述 此函数遍历主机文件中的条目。它在列表context中返回以下内容-($name,$aliases,$addrtype,$length,...
原创 2023-08-09 11:00:31
44阅读
1、原理:查询 /etc/hosts 等文件及 DNS or NIS 服务器The  domain  name  queries carried out by gethostbyname() and getho
原创 2023-09-17 08:42:49
162阅读
描述 此函数告诉系统您不再希望使用gethostent从hosts文件读取条目。 语法 以下是此函数的简单语法- en...
原创 2023-08-07 14:01:26
83阅读
描述 该函数应在首次调用gethostent之前调用。 STAYOPEN参数是可选的,在大多数系统上未使用。 当gethost...
原创 2023-08-15 11:00:25
100阅读
2. 端口绑定和域名解析 2.1 端口绑定:SO_REUSEADDR选项 2.2 域名解析 (1)域名解析过程 (2)域名解析函数 头文件 #include <netdb.h> 函数 struct hostent* gethostent(void); struct hostent* gethostb
转载 2017-04-06 14:22:00
154阅读
2评论