#ifndef MPLIB1_BPO_INIT_INTERNAL #define MPLIB1_BPO_INIT_INTERNAL /* ******************************************************************************* * Copyright (c) 1996 Martin Poole * ******************************************************************************* ** ** WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! ** ** Any changes to be made to this file should first be checked with ** mplib1 source control for library integrity. ** ** mplib1 source control can be reached at mplib1@quatermass.co.uk ** * * $Source$ * $Author$ * $Date$ * $Revision$ * Purpose : * ******************************************************************************* * * Change History * * $Log$ * ******************************************************************************* */ #ident "$Header$" #ifdef CXREF #include #include #endif #ifndef MPLIB1_CONFIG #include #endif #ifndef MPLIB1_DL_LIST #include #endif #ifndef MPLIB1_BPO_LOCK #include #endif #ifndef MPLIB1_BPO_LIST #include #endif /* ------------------------------------------------------------------ defines ------------------------------------------------------------------ */ #define SODB_MAGIC 0x536d6567 #define SODB_VERSION_1 1 #define SODB_VERSION_2 2 #define SODB_VERSION_4 4 #define SODB_CURRENT_VERSION SODB_VERSION_4 #define SODB_NAME_SIZE1 512 enum sodb_types { SODB_T_UNKNOWN, SODB_T_MMAP, SODB_T_IPC }; /* ------------------------------------------------------------------ structures ------------------------------------------------------------------ */ struct sodb_resource { bpo_Node_t res_node; off_t res_off; }; struct sodb { int sodb_magic; char sodb_use_name[SODB_NAME_SIZE1]; size_t sodb_size; enum sodb_types sodb_type; int sodb_version; int sodb_flags; struct stat mmap_stat; int mmap_fd; int mmap_prot; int mmap_flags; off_t mmap_off; char mmap_name[SODB_NAME_SIZE1]; key_t ipc_key; char ipc_path[SODB_NAME_SIZE1]; char ipc_tok_id; int ipc_id; struct bpo_pid_lock res_p_lock; bpo_List_t sodb_resource_list; struct sodb_resource sodb_resource; char sodb_res_name[10]; /* this has "SODB Base" copied into it */ off_t shalloc_offset; size_t shalloc_size; }; struct sodb_track { dl_Node_t st_Node; struct sodb *sodbp; int mmap_fd; const char *upper; mode_t access_mode; char fname[1]; }; struct sodb_res_find { struct sodb *sodbp; const char *name; void *ptr; void *obj; int flags; int ierrno; off_t rv; }; /* ------------------------------------------------------------------ function definitions ------------------------------------------------------------------ */ extern void Init_SODB_Resources( struct sodb *sodbp ); #endif /* -- End of File -- */