2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 2N/A * Use is subject to license terms. 2N/A#
pragma ident "%Z%%M% %I% %E% SMI" 2N/A * gethostbyname_r() is defined in this file. It is implemented on top of 2N/A * _get_hostserv_inetnetdir_byname() which is also used to implement 2N/A * netdir_getbyname() for inet family transports. In turn the common code 2N/A * uses the name service switch policy for "hosts" and "services" unless 2N/A * the administrator chooses to bypass the name service switch by 2N/A * specifying third-party supplied nametoaddr libs for inet transports 2N/A * gethostbyaddr_r() is similarly related to _get_hostserv_inetnetdir_byaddr() 2N/A * and netdir_getbyaddr(); 2N/A * gethostent_r(), sethostent() and endhostent() are *not* implemented on top 2N/A * of the common interface; they go straight to the switch and are 2N/A * There is absolutely no data sharing, not even the stayopen flag or 2N/A * enumeration state, between gethostbyYY_r() and gethostent_r(); 2N/A * h_errno POLICY: The frontends expect the name service 2N/A * backends to modify the h_errno in "arg"; _switch_gethostbyYY_r() 2N/A * will copy that over onto user's h_errnop pointer. This h_errno is 2N/A * never used for "switching" -- status from nss_search serves 2N/A * the purpose. There is no explicit zeroing in the case of success. 2N/A * We pass in nconf and let the implementation of the long-named func 2N/A * decide whether to use the switch based on nc_nlookups. 2N/A * We pass in nconf and let the implementation of this long-named func 2N/A * decide whether to use the switch based on nc_nlookups.