_crle.h revision 587032cf0967234b39ccb50adca936a367841063
/*
* 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 __CRLE_H
#define __CRLE_H
#pragma ident "%Z%%M% %I% %E% SMI"
#include <gelf.h>
#include <sgs.h>
#include <rtc.h>
#include <machdep.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Hash table support routines.
*/
typedef enum {
} Hash_type;
/*
* object. This descriptor identifies the object (file or directory), whether
* it has an alternate, or represents a non-existent object.
*/
struct hash_obj {
char *o_alter; /* any alternate path */
char *o_path; /* the objects real path */
/* consistency checks */
};
/*
* Each element of a hash table is maintained as a hash entry. Each element
* points to a unique hash object. Many elements can point to the same hash
* object (as is the case with linked files). Elements on the string table
* hash lists identify their directory id, either the directory itself, or the
* files that belong to the directory. These directory and file entries are
* what will be converted into object descriptors in the final cache file.
*/
struct hash_ent {
int e_off; /* offset of file in dirname */
};
/*
* Each hash table is maintained as a hash table descriptor. Each dev has a
* hash table of inodes, and all directory and file entries are also maintained
* on the string table hash table.
*/
struct hash_tbl {
int t_size; /* no. of buckets */
};
/*
* Environment variable support.
*/
typedef struct {
const char *e_str; /* complete environment string */
} Env_desc;
/*
*/
typedef struct {
const char *f_str; /* filtee string and its associated */
} Flt_desc;
/*
* Global data for final configuration files construction.
*/
typedef struct crle_desc {
char *c_name; /* calling program */
char *c_tempname; /* temporary file, file descriptor */
int c_tempfd; /* mmapped address and size */
char *c_confil; /* configuration file */
char *c_objdir; /* current object directory for */
/* dldump(3dl) */
char *c_audit; /* audit library name */
int c_dlflags; /* current dldump(3dl) flags */
int c_strbkts; /* internal hash table initialization */
int c_inobkts; /* parameters */
const char *c_app; /* specific application */
char *c_edlibpath; /* ELF default library path */
char *c_adlibpath; /* AOUT default library path */
char *c_eslibpath; /* ELF secure library path */
char *c_aslibpath; /* AOUT secure library path */
} Crle_desc;
/* different filesystems */
/*
* Return type code returned by inspectconfig()
*/
typedef enum {
INSCFG_RET_OK = 0, /* Config file is OK */
} INSCFG_RET;
/*
* Local functions.
*/
extern int updateconfig(Crle_desc *);
#ifdef __cplusplus
}
#endif
#endif /* __CRLE_H */