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*47589Sbostic static char sccsid[] = "@(#)sethostent.c 6.9 (Berkeley) 03/19/91"; 1033677Sbostic #endif /* LIBC_SCCS and not lint */ 1124656Sbloom 12*47589Sbostic #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 1924669Sbloom sethostent(stayopen) 2024669Sbloom { 2127033Skjd if (stayopen) 2227033Skjd _res.options |= RES_STAYOPEN | RES_USEVC; 2324669Sbloom } 2424656Sbloom 2546604Sbostic void 2627033Skjd endhostent() 2727033Skjd { 2827033Skjd _res.options &= ~(RES_STAYOPEN | RES_USEVC); 2927033Skjd _res_close(); 3027033Skjd } 31