/*
* 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.
*/
#ifndef _NSCD_DB_H
#define _NSCD_DB_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#include <nss_dbdefs.h> /* nssuint_t */
#include "nscd_common.h"
/* make a pointer 8-byte aligned, or an integer a multiple of 8 */
/*
* type of nscd data
*/
#define NSCD_DATA_UNKNOWN 0
/*
* database operation options
*/
typedef enum {
/*
* This structure defines an instance of the
* nscd database entry.
*/
typedef struct nscd_db_entry {
int type;
int id_num;
int num_data;
int num_array;
char *name;
void **data_array;
/*
* sequence number attached to nscd data
*/
/*
* The nscd_access_s datatype represents a nscd
* access data structure. It is an opaque structure.
*/
struct nscd_access_s;
struct nscd_acc_data_s;
/*
* The nscd_db_t datatype represents a nscd
* database. It is also an opaque structure.
*/
struct nscd_db_s;
/*
* four sizes for a nscd database:
* large, medium, small, tiny
*/
/*
* options for _nscd_alloc()
*/
/*
* prototypes
*/
void
void
void
void
void
void
int type,
void (*data_free)(
int option);
void *ptr,
int type,
rwlock_t *
void *ptr,
void
void *ptr,
int size);
void
int type,
const char *name,
int dataSize,
int num_data,
int num_array);
const nscd_db_entry_t *
int type,
const char *str,
int id_num);
const char *str,
int type,
const char *str,
int id_num);
void *
void
#ifdef __cplusplus
}
#endif
#endif /* _NSCD_DB_H */