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