124656Sbloom /* 224656Sbloom * Copyright (c) 1985 Regents of the University of California. 3*33677Sbostic * All rights reserved. 4*33677Sbostic * 5*33677Sbostic * Redistribution and use in source and binary forms are permitted 6*33677Sbostic * provided that this notice is preserved and that due credit is given 7*33677Sbostic * to the University of California at Berkeley. The name of the University 8*33677Sbostic * may not be used to endorse or promote products derived from this 9*33677Sbostic * software without specific prior written permission. This software 10*33677Sbostic * is provided ``as is'' without express or implied warranty. 1124656Sbloom */ 1224656Sbloom 1326636Sdonn #if defined(LIBC_SCCS) && !defined(lint) 14*33677Sbostic static char sccsid[] = "@(#)sethostent.c 6.4 (Berkeley) 03/07/88"; 15*33677Sbostic #endif /* LIBC_SCCS and not lint */ 1624656Sbloom 1727033Skjd #include <sys/types.h> 1827033Skjd #include <arpa/nameser.h> 1927033Skjd #include <netinet/in.h> 2027033Skjd #include <resolv.h> 2124656Sbloom 2224669Sbloom sethostent(stayopen) 2324669Sbloom { 2427033Skjd if (stayopen) 2527033Skjd _res.options |= RES_STAYOPEN | RES_USEVC; 2624669Sbloom } 2724656Sbloom 2827033Skjd endhostent() 2927033Skjd { 3027033Skjd _res.options &= ~(RES_STAYOPEN | RES_USEVC); 3127033Skjd _res_close(); 3227033Skjd } 3324669Sbloom 3424669Sbloom sethostfile(name) 3524669Sbloom char *name; 3624669Sbloom { 3724669Sbloom #ifdef lint 3824669Sbloom name = name; 3924669Sbloom #endif 4024669Sbloom } 41