nis_tags.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 (c) 1988-2001 Sun Microsystems Inc
* All Rights Reserved.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
*
* This module contains the library functions that manipulate the
* server state and statistics. It also includes the implementations
* nis_getservlist and nis_freeservlist
*/
#include <string.h>
#include <malloc.h>
#include "nis_clnt.h"
#include "nis_local.h"
/*
* nis_freeservlist(list)
*
* This function will free all of the memory allocated (or partially
* allocated) for a nis server list.
*/
void
{
nis_server **list;
if (! list)
return;
}
/*
* nis_getservlist(name)
*
* This function will return list of servers for the indicated domain.
* the first server in the list is the master for that domain, subsequent
* servers are replicas. The results of this call should be freed with
* a call to nis_freeservlist().
*/
nis_server **
{
nis_server **res;
int ns; /* Number of servers */
int nep; /* Number of endpoints */
int i, k;
if (err != NIS_SUCCESS) {
return (NULL);
}
if (! res) {
return (NULL);
}
for (i = 0; i < ns; i++) {
if (! res[i]) {
return (NULL);
}
return (NULL);
}
return (NULL);
}
}
return (NULL);
}
for (k = 0; k < nep; k++) {
return (NULL);
}
return (NULL);
}
return (NULL);
}
}
}
return (res);
}
/*
* nis_tagproc(server, proc, tags, num);
*
* This internal function can call either of the tag list functions.
* Both nis_status and nis_servstate call it with a different procedure
* number.
*/
static nis_error
int ntags, /* The number available */
{
if (err == NIS_SUCCESS)
else
return (err);
}
/*
* nis_status(server, tags, num);
*
* This function is used to retrieve statistics from the NIS server.
* The variable 'server' contains a pointer to a struct nis_server
* which has the name of the server one wishes to gather statistics
* from.
*/
{
}
/*
* nis_servstate(server, tags, num);
*
* This function is used to set state variables on a particular server
* The variable 'server' contains a pointer to a struct nis_server
* which has the name of the server one wishes to gather statistics
* from.
*/
{
}
/*
* nis_freetags()
*
* This function frees up memory associated with the result of a tag
* based call. It must be called to free a taglist returned by nis_stats
* or nis_servstate;
*/
void
{
int i;
if (! tags)
return;
for (i = 0; i < ntags; i++) {
}
}