/*
* 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 __SHIM_H
#define __SHIM_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* DESCRIPTION: Shim header information not relating to hooks
*
*/
/*
* Structure for holding all the information relating to one map. These will
* probably end up in shared memory so everyone can get at them.
*
* DBM pointers are non NULL only while the file is open.
*/
typedef struct {
/* These are used in all modes */
/*
* Names.
*
* There is some duplication of information here but this enables these
* strings to be worked out once (when the map_ctrl is created) rather
* than many times as it is used.
*/
/* These are used only in N2L mode */
/* Open parameters (in case of reopen ) */
int open_flags;
}map_ctrl;
/*
* Structure for holding unique map IDs.
* Used for locking purposes, in N2L mode only.
*/
typedef struct map_id_elt {
char *map_name;
int map_id;
} map_id_elt_t;
/*
* Success and failure codes the same as used by DBM
*/
typedef int suc_code;
#define SUCCESS 0
/*
* Extern defs for new DBM calls. Must have identical args to traditional
* version.
*/
int store_mode);
/*
* Other externs
*/
extern map_ctrl *create_map_ctrl(char *);
extern void free_map_ctrl(map_ctrl *);
extern void dump_map_ctrl(map_ctrl *);
extern int map_id_list_init();
extern bool_t init_update_lock_map();
/*
* Globals
*/
extern bool_t yptol_mode;
extern bool_t yptol_newlock;
extern bool_t ypxfrd_flag;
extern int yp2ldap;
/*
* String extensions used in N2L
*/
/* Prefix used for N2L map names */
/* Postfix used for TTL DBM files */
/* Postfix for temporary files */
/* File separator character. If this is defined elsewhere can be removed */
/*
* Special keys used in DBM files. No real NIS map can use these keys.
*/
/* Mmaped file used for update flags shared memory */
/* used for map arrays reallocation purposes */
#ifdef __cplusplus
}
#endif
#endif /* __SHIM_H */