diff options
author | wpaul <wpaul@FreeBSD.org> | 1996-12-25 18:10:35 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 1996-12-25 18:10:35 +0000 |
commit | 9595ea6d1eb97fa3074c2f7c8e7b86d793ca6f8b (patch) | |
tree | 6077b7732802a3647746e612ca585a0ce843b915 /usr.sbin/ypserv/yp_extern.h | |
parent | 59eadfda914b1a76f8105d01e61675cc806a5646 (diff) | |
download | FreeBSD-src-9595ea6d1eb97fa3074c2f7c8e7b86d793ca6f8b.zip FreeBSD-src-9595ea6d1eb97fa3074c2f7c8e7b86d793ca6f8b.tar.gz |
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.
Diffstat (limited to 'usr.sbin/ypserv/yp_extern.h')
-rw-r--r-- | usr.sbin/ypserv/yp_extern.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.sbin/ypserv/yp_extern.h b/usr.sbin/ypserv/yp_extern.h index fc3e6dd..0fb7ab2 100644 --- a/usr.sbin/ypserv/yp_extern.h +++ b/usr.sbin/ypserv/yp_extern.h @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: yp_extern.h,v 1.3 1996/12/22 15:53:55 wpaul Exp $ + * $Id: yp_extern.h,v 1.4 1996/12/24 07:52:52 wpaul Exp $ */ #include <stdio.h> #include <string.h> @@ -106,8 +106,7 @@ extern unsigned long svcudp_get_xid __P(( SVCXPRT * )); #endif extern int yp_init_resolver __P(( void )); -extern int yp_dnsq_pending __P(( void )); extern void yp_run_dnsq __P(( void )); extern void yp_prune_dnsq __P(( void )); -extern ypstat yp_async_lookup_name __P(( SVCXPRT *, char * )); -extern ypstat yp_async_lookup_addr __P(( SVCXPRT *, char * )); +extern ypstat yp_async_lookup_name __P(( struct svc_req *, char * )); +extern ypstat yp_async_lookup_addr __P(( struct svc_req *, char * )); |