xref: /csrg-svn/lib/libc/net/sethostent.c (revision 46604)
124656Sbloom /*
224656Sbloom  * Copyright (c) 1985 Regents of the University of California.
333677Sbostic  * All rights reserved.
433677Sbostic  *
542628Sbostic  * %sccs.include.redist.c%
624656Sbloom  */
724656Sbloom 
826636Sdonn #if defined(LIBC_SCCS) && !defined(lint)
9*46604Sbostic static char sccsid[] = "@(#)sethostent.c	6.8 (Berkeley) 02/24/91";
1033677Sbostic #endif /* LIBC_SCCS and not lint */
1124656Sbloom 
1227033Skjd #include <sys/types.h>
13*46604Sbostic #include <netinet/in.h>
1427033Skjd #include <arpa/nameser.h>
15*46604Sbostic #include <netdb.h>
1627033Skjd #include <resolv.h>
1724656Sbloom 
18*46604Sbostic void
1924669Sbloom sethostent(stayopen)
2024669Sbloom {
2127033Skjd 	if (stayopen)
2227033Skjd 		_res.options |= RES_STAYOPEN | RES_USEVC;
2324669Sbloom }
2424656Sbloom 
25*46604Sbostic void
2627033Skjd endhostent()
2727033Skjd {
2827033Skjd 	_res.options &= ~(RES_STAYOPEN | RES_USEVC);
2927033Skjd 	_res_close();
3027033Skjd }
31