xref: /csrg-svn/lib/libc/net/sethostent.c (revision 61151)
124656Sbloom /*
2*61151Sbostic  * Copyright (c) 1985, 1993
3*61151Sbostic  *	The Regents of the University of California.  All rights reserved.
433677Sbostic  *
542628Sbostic  * %sccs.include.redist.c%
624656Sbloom  */
724656Sbloom 
826636Sdonn #if defined(LIBC_SCCS) && !defined(lint)
9*61151Sbostic static char sccsid[] = "@(#)sethostent.c	8.1 (Berkeley) 06/04/93";
1033677Sbostic #endif /* LIBC_SCCS and not lint */
1124656Sbloom 
1247589Sbostic #include <sys/param.h>
1346604Sbostic #include <netinet/in.h>
1427033Skjd #include <arpa/nameser.h>
1546604Sbostic #include <netdb.h>
1627033Skjd #include <resolv.h>
1724656Sbloom 
1846604Sbostic void
sethostent(stayopen)1924669Sbloom sethostent(stayopen)
2024669Sbloom {
2127033Skjd 	if (stayopen)
2227033Skjd 		_res.options |= RES_STAYOPEN | RES_USEVC;
2324669Sbloom }
2424656Sbloom 
2546604Sbostic void
endhostent()2627033Skjd endhostent()
2727033Skjd {
2827033Skjd 	_res.options &= ~(RES_STAYOPEN | RES_USEVC);
2927033Skjd 	_res_close();
3027033Skjd }
31