Lines Matching defs:client

30 	ns_lwdclient_t *client;
46 client = event->ev_arg;
47 cm = client->clientmgr;
48 INSIST(client->byaddr == (dns_byaddr_t *)event->ev_sender);
51 gnba = &client->gnba;
58 dns_byaddr_destroy(&client->byaddr);
62 if (client->na.family != AF_INET6 ||
63 (client->options & DNS_BYADDROPT_IPV6INT) != 0) {
71 ns_lwdclient_errorpktsend(client, lwresult);
79 client->options |= DNS_BYADDROPT_IPV6INT;
81 start_byaddr(client);
89 b = client->recv_buffer;
91 result = dns_name_totext(name, ISC_TRUE, &client->recv_buffer);
95 (int)(client->recv_buffer.used - b.used),
99 gnba->realnamelen = client->recv_buffer.used - b.used;
106 client->recv_buffer.used - b.used;
111 dns_byaddr_destroy(&client->byaddr);
117 client->pkt.recvlength = LWRES_RECVLENGTH;
118 client->pkt.authtype = 0; /* XXXMLG */
119 client->pkt.authlength = 0;
120 client->pkt.result = LWRES_R_SUCCESS;
123 gnba, &client->pkt, &lwb);
129 client->sendbuf = r.base;
130 client->sendlength = r.length;
131 result = ns_lwdclient_sendreply(client, &r);
135 NS_LWDCLIENT_SETSEND(client);
140 if (client->byaddr != NULL)
141 dns_byaddr_destroy(&client->byaddr);
151 start_byaddr(ns_lwdclient_t *client) {
155 cm = client->clientmgr;
157 INSIST(client->byaddr == NULL);
159 result = dns_byaddr_create(cm->mctx, &client->na, cm->view,
160 client->options, cm->task, byaddr_done,
161 client, &client->byaddr);
163 ns_lwdclient_errorpktsend(client, LWRES_R_FAILURE);
169 init_gnba(ns_lwdclient_t *client) {
177 client->aliases[i] = NULL;
178 client->aliaslen[i] = 0;
181 client->addrs[i].family = 0;
182 client->addrs[i].length = 0;
183 memset(client->addrs[i].address, 0, LWRES_ADDR_MAXLEN);
184 LWRES_LINK_INIT(&client->addrs[i], link);
187 client->gnba.naliases = 0;
188 client->gnba.realname = NULL;
189 client->gnba.aliases = client->aliases;
190 client->gnba.realnamelen = 0;
191 client->gnba.aliaslen = client->aliaslen;
192 client->gnba.base = NULL;
193 client->gnba.baselen = 0;
194 isc_buffer_init(&client->recv_buffer, client->buffer, LWRES_RECVLENGTH);
198 ns_lwdclient_processgnba(ns_lwdclient_t *client, lwres_buffer_t *b) {
204 REQUIRE(NS_LWDCLIENT_ISRECVDONE(client));
205 INSIST(client->byaddr == NULL);
207 cm = client->clientmgr;
211 b, &client->pkt, &req);
215 client->options = 0;
217 client->na.family = AF_INET;
220 memmove(&client->na.type.in, req->addr.address, 4);
222 client->na.family = AF_INET6;
225 memmove(&client->na.type.in6, req->addr.address, 16);
229 isc_sockaddr_fromnetaddr(&sa, &client->na, 53);
231 ns_lwdclient_log(50, "client %p looking for addrtype %08x",
232 client, req->addr.family);
243 init_gnba(client);
244 client->options = 0;
249 start_byaddr(client);
260 ns_lwdclient_errorpktsend(client, LWRES_R_FAILURE);