Date: Wed, 25 Dec 1996 10:10:38 -0800 (PST) From: Bill Paul <wpaul> To: CVS-committers, cvs-all, cvs-usrsbin Subject: cvs commit: src/usr.sbin/ypserv yp_dnslookup.c yp_extern.h yp_main.c yp_server.c Message-ID: <199612251810.KAA17783@freefall.freebsd.org>
index | next in thread | raw e-mail
wpaul 96/12/25 10:10:37
Modified: usr.sbin/ypserv yp_dnslookup.c yp_extern.h yp_main.c
yp_server.c
Log:
More async resolver refinements:
- yp_main.c: Always add the resolver socket to the set of fds
monitored by select(). It can happen that pending == 0 but we
still have some data in the socket buffer from an old query.
This way, the data will be flushed in a timely manner.
- yp_extern.h: remove proto for yp_dns_pending() since we don't need
it anynmore.
- yp_server.c: call yp_async_lookup_name()/yp_async_lookup_addr()
functions with the svc_req pointer as an arg instead of the xprt.
(The svc_req struct includes a pointer to the transport handle,
and it also has the service version number which the async DNS
code will need. (see below))
- yp_dnslookup.c:
o Nuke yp_dns_pending() since we don't need it anymore.
o In yp_run_dnsq(), swallow up and ignore replies if no requests
are pending or the ID doesn't match any of the IDs in the queue.
o In yp_send_dns_reply(), we assume that we will always be
replying to an NIS v2 client. While this will probably always
be the case, we do support the v1 'match' procedure, and it
has a different result struct than v2. For completeness,
support replying to both NIS v1 and v2 clients.
o Update the queue entry structure to include a member to
keep track of the NIS version number.
o Have yp_async_lookup_name/addr() extract the version number
from the svc_req structure and save it with the queue entry
for yp_send_dns_reply() to inspect later.
o Add some comments.
Revision Changes Path
1.6 +106 -43 src/usr.sbin/ypserv/yp_dnslookup.c
1.9 +3 -4 src/usr.sbin/ypserv/yp_extern.h
1.10 +3 -4 src/usr.sbin/ypserv/yp_main.c
1.16 +3 -3 src/usr.sbin/ypserv/yp_server.c
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199612251810.KAA17783>
