/*
* 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
*/
/*
*/
/*
* Just in case we're not in a build environment, make sure that
* TEXT_DOMAIN gets set to something.
*/
#if !defined(TEXT_DOMAIN)
#endif
#include <meta.h>
#include <metad.h>
#include <sdssc.h>
typedef struct {
char *cc_node;
char *cc_priv_ip;
typedef struct client_header {
/*
* This structure is used to pass data from meta_client_create to
* client_create_helper via meta_client_create_retry.
*/
typedef struct clnt_data {
} clnt_data_t;
static void
char *node,
char *priv_ip,
)
{
int i;
int j = 0;
return;
}
if (*cachep) {
return;
}
} else {
i = 0;
}
if ((++i % MALLOC_BLK_SIZE) == 0) {
(i + MALLOC_BLK_SIZE) * sizeof (**cachep));
for (j = i; j < (i + MALLOC_BLK_SIZE); j++)
}
}
static void
{
}
}
static void
{
int i;
if (*cachep) {
client_cache_t *p = (*cachep)[i];
Free(p->cc_priv_ip);
rel_clntp(p);
Free(p);
}
}
}
/*
* Set the timeout value for this client handle.
*/
int
char *hostname,
long time_out,
)
{
return (0);
}
/*
* client_create_vers_retry is the helper function to be passed to
* meta_client_create_retry to do the actual work of creating the client
* when version selection is necessary.
*/
/* ARGSUSED */
static CLIENT *
void *ignore,
)
{
}
/*
* client_create_helper is the helper function to be passed to
* meta_client_create_retry when plain vanilla client create is desired.
*/
static CLIENT *
{
}
/*
* meta_client_create_retry is a general function to assist in creating RPC
* clients. This function handles retrying if the attempt to create a
* client fails. meta_client_create_retry itself does not actually create
* the client. Instead it calls the helper function, func, to do that job.
*
* With the help of func, meta_client_create_retry will create an RPC
* connection allowing up to tout seconds to complete the task. If the
* connection creation fails for RPC_RPCBFAILURE, RPC_CANTRECV or
* RPC_PROGNOTREGISTERED and tout seconds have not passed,
* meta_client_create_retry will try again. The reason retries are
* important is that when the inet daemon is being refreshed, it can take
* 15-20 seconds for it to start responding again.
*
* Arguments:
*
* hostname - Name of remote host
*
* func - Pointer to the helper function, that will
* actually try to create the client.
*
* data - Private data to be passed on to func.
* meta_client_create_retry treats this as an opaque
* pointer.
*
* tout - Number of seconds to allow for the connection
* attempt.
*
* ep - Standard SVM error pointer. May be NULL.
*/
CLIENT *
char *hostname,
void *data,
)
{
static int debug_set = 0;
char *d;
if (debug_set == 0) {
d = getenv("MD_DEBUG");
if (d == NULL) {
debug = 0;
} else {
}
debug_set = 1;
}
}
return (clnt);
}
/* Use remaining time as the timeout value. */
break;
if (debug) {
clnt_pcreateerror("meta_client_create_retry");
}
/* If error might be fixed in time, sleep & try again */
(void) sleep(2);
"gettimeofday()");
}
return (clnt);
}
} else {
/* Not a recoverable error. */
break;
}
}
"meta_client_create_retry");
}
return (clnt);
}
/*
* meta_client_create is intended to be used within SVM as a replacement
* for calls to clnt_create. meta_client_create invokes the retry
* mechanism of meta_client_create_retry.
*/
CLIENT *
char *nettype)
{
}
/*
* create and return RPC connection
*/
CLIENT *
char *hostname,
long time_out,
)
{
int i;
long delta;
return (NULL);
}
if (client_header.ch_cache) {
continue;
if (delta > CC_TTL_MAX) {
continue;
}
ep) != 0) {
(void) mutex_unlock(
return (NULL);
}
return (clntp);
}
}
}
/*
* Before trying to create the client, make sure that the core SVM
* services are enabled by the Service Management Facility. We
* don't want to suffer the 60 second timeout if the services are
* not even enabled. This call actually only verifies that they
* are enabled on this host no matter which host the caller wants
* to connect to. Nonetheless, if the services are not enabled on
* the local host, our RPC stuff is not going to work as expected.
*/
return (NULL);
}
/*
* Copy at most MD_MAX_MNNODENAME octets from the passed hostname.
* This is limited by RFC1035. We truncate at this amount.
*/
/*
* If we are in cluster mode, lets use the private interconnect
* hostnames to establish the rpc connections.
*/
if (sdssc_bind_library() != SDSSC_NOT_BOUND) {
/*
* inet_ntoa() returns pointer to a string in the
* base 256 notation d.d.d.d (IPv4) and so
* host_priv[18] should be sufficient enough to
* hold it.
*/
}
}
}
/*
* Try to create a version 2 client handle by default.
* If this fails (i.e. client is version 1), try to
* create a version 1 client handle.
*/
/* open connection */
return (NULL);
} else {
}
return (NULL);
return (clntp);
}
/*
* metarpcclose - is a place holder so that when using
* metarpcopen, it does not appear that
* we have dangling opens. We can at some
* later decrement open counts here too, if needed.
*/
/*ARGSUSED*/
void
{
}
void
metarpccloseall(void)
{
}