bind client.c

整体功能分析

client.c 主要是负责DNS 服务器与用户接口的设置,可以分成三个模块:
1.数据包传送模块
2.用户的创建模块
3.用户管理器的创建模块
用户的创建模块是为用户管理器的创建模块建立的,对于同一用户,他每次建立连接,只要连接不断开和超时,他的用户创建模块不会被再次激发。因此,这两个模块仅是一次性的,在用户创建以后再发送数据包,它们将不会有任何影响。数据包传送模块则是关于数据传输的,每次传送数据包它都会参与其中。
client.h说明

/* This module defines two objects, ns_client_t and ns_clientmgr_t.
 *
 * An ns_client_t object handles incoming DNS requests from clients
 * on a given network interface.
 *
 * Each ns_client_t object can handle only one TCP connection or UDP
 * request at a time.  Therefore, several ns_client_t objects are
 * typically created to serve each network interface, e.g., one
 * for handling TCP requests and a few (one per CPU) for handling
 * UDP requests.
 *
 * Incoming requests are classified as queries, zone transfer
 * requests, update requests, notify requests, etc, and handed off
 * to the appropriate request handler.  When the request has been
 * fully handled (which can be much later), the ns_client_t must be
 * notified of this by calling one of the following functions
 * exactly once in the context of its task:
 * \code
 *   ns_client_send()   (sending a non-error<
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值