713 if (use_cache) /*如果用cache的主机名,并且LH_REFRECH不为1*/
714 {
715 if (!(flags & LH_REFRESH))
716 {
717 al = cache_query (host); /*这是在hash_table中查这个主机的名字,前面说过将名字相同的存储到一个链表中*/
718 if (al)
719 return al; /*返回这个地址*/
720 }
721 else
722 cache_remove (host); /*否则,就删除这个host名*/
723 }
复制代码
=============>
77 struct address_list {
78 int count; /* number of adrresses ,地址的个数*/
79 ip_address *addresses; /* pointer to the string of addresses指向地址类型的字符串 */
80
81 int faulty; /* number of addresses known not to work. 不工作的地址*/
82 bool connected; /* whether we were able to connect to
83 one of the addresses in the list,
84 at least once. 是否能够连接表中的地址*/
85
86 int refcount; /* reference count; when it drops to
87 0, the entry is freed. 引用此地址的计数,当到0时,就释放了*/
88 };
复制代码
1、_________----------->
The inet_addr() function converts the Internet host address cp
from numbers-and-dots notation into binary data in network byte order.
If the input is invalid, INADDR_NONE (usually -1) is returned. This is
an obsolete interface to inet_aton(), described immediately above; it is
obsolete because -1 is a valid address (255.255.255.255), and
inet_aton() provides a cleaner way to indicate error return