idmap_priv.h revision cd37da7426f0c49c14ad9a8a07638ca971477566
/*
* 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 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Additional API for Identity Mapping Service
*/
#ifndef _IDMAP_PRIV_H
#define _IDMAP_PRIV_H
#pragma ident "%Z%%M% %I% %E% SMI"
#include "idmap.h"
#include "idmap_prot.h"
#ifdef __cplusplus
extern "C" {
#endif
#define IDMAP_MAX_NAME_LEN 512
rc == IDMAP_ERR_DB
/* Direction in which mapping is valid */
#define IDMAP_DIRECTION_BI 0 /* bi-directional */
typedef struct idmap_udt_handle idmap_udt_handle_t;
/* Opaque iterator */
typedef struct idmap_iter idmap_iter_t;
/*
* Update API
*/
/* Create handle for updates */
idmap_udt_handle_t **);
/* Commit */
/* Get index of the failed batch element */
/* Get the rule which caused the batch to failed */
/* Get the rule which caused a conflict */
/* Destroy the update handle */
extern void idmap_udt_destroy(idmap_udt_handle_t *);
/* Add name-based mapping rule */
/* Remove name-based mapping rule */
boolean_t, const char *, const char *, const char *, int);
/* Flush name-based mapping rules */
/*
* Iterator API
*/
boolean_t *, int *);
/* Create a iterator to get name-based mapping rules */
/* Iterate through the name-based mapping rules */
/* Set the number of entries requested per batch */
/* Destroy the iterator */
extern void idmap_iter_destroy(idmap_iter_t *);
/*
* Get mapping
*/
idmap_rid_t *, const char *, const char *, int, int *, int *,
uid_t *, char **, int *);
const char *, int, int, int *, char **, idmap_rid_t *, char **,
char **, int *);
/*
* Miscellaneous
*/
/* string to status */
extern idmap_stat idmap_string2stat(const char *);
/* internal status to protocol status */
/* copy idmap_namerule including strings */
#ifdef __cplusplus
}
#endif
#endif /* _IDMAP_PRIV_H */