Đang chuẩn bị liên kết để tải về tài liệu:
DNS and BIND 5th Edition_9

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Tham khảo tài liệu 'dns and bind 5th edition_9', công nghệ thông tin, hệ điều hành phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | DNS BIND datalen The size of the data buffer. If data is NULL then datalen is zero. newrr A buffer used for the dynamic update code covered in Chapter 10 Advanced Features and Security . Unless you are playing with this feature it is always NULL. buf A buffer in which resmkquery makes the query packet. It should be PACKETSZ or larger just like the answer buffer in ressearch and resquery. buflen The size of the buf buffer e.g. PACKETSZ . resmkquery returns the size of the query packet or -1 if there was an error. int res_send const u_char msg int msglen u_char answer int anslen ressend implements the retry algorithm. It sends the query packet msg in a UDP packet but it can also send it over a TCP stream. The response packet is stored in answer. This routine of all the resolver routines is the only one to use black magic unless you know all about connected datagram sockets . You ve seen these arguments before in the other resolver routines msg The buffer containing the DNS query packet msglen The size of the msg answer The buffer in which to store the DNS response packet anslen The size of the answer buffer ressend returns the size of the response or -1 if there was an error. If this routine returns -1 and errno is ECONNREFUSED then there is no name server running on the target name server host. You can look at errno to see if it is ECONNREFUSED after calling res search or res_ query. res search calls res query which calls ressend. If you want to check errno after calling res query then clear errno first. That way you know the current call to res send was the one that set errno. However you 14.2.4 The Resolver Library Routines 425 DNS BIND don t have to clear errno before calling ressearch. ressearch clears errno itself before calling resquery. int res_init void resinit reads resolv.conf and initializes a data structure called res more about that later . All of the previously discussed routines will call resinit if they detect that it hasn t been called previously. .