reg_main.h

Go to the documentation of this file.
00001 /************************************ */
00002 /* Rule Set Based Access Control      */
00003 /* Author and (c) 1999-2001: Amon Ott */
00004 /* REG - Module Registration          */
00005 /* Internal declarations and types    */
00006 /* Last modified: 19/Feb/2001         */
00007 /************************************ */
00008 
00009 #ifndef __RSBAC_REG_MAIN_H
00010 #define __RSBAC_REG_MAIN_H
00011 
00012 #include <rsbac/types.h>
00013 #include <rsbac/debug.h>
00014 #include <rsbac/reg.h>
00015 
00016 #define RSBAC_REG_PROC_NAME "reg_entries"
00017 
00018 /***************************************************/
00019 /*                   Types                         */
00020 /***************************************************/
00021 
00022 #ifdef __KERNEL__
00023 
00024 /* Since all registrations will be organized in double linked lists, we must  */
00025 /* have list items and a list head.                                        */
00026 
00027 struct rsbac_reg_list_item_t
00028     {
00029       struct rsbac_reg_entry_t       entry;
00030       struct rsbac_reg_list_item_t * prev;
00031       struct rsbac_reg_list_item_t * next;
00032     };
00033     
00034 struct rsbac_reg_sc_list_item_t
00035     {
00036       struct rsbac_reg_syscall_entry_t  entry;
00037       struct rsbac_reg_sc_list_item_t * prev;
00038       struct rsbac_reg_sc_list_item_t * next;
00039     };
00040     
00041 /* To provide consistency we use spinlocks for all list accesses. The     */
00042 /* 'curr' entry is used to avoid repeated lookups for the same item.       */    
00043     
00044 struct rsbac_reg_list_head_t
00045     {
00046       struct rsbac_reg_list_item_t * head;
00047       struct rsbac_reg_list_item_t * tail;
00048       struct rsbac_reg_list_item_t * curr;
00049       rwlock_t                       lock;
00050       u_int                          count;
00051     };
00052 
00053 struct rsbac_reg_sc_list_head_t
00054     {
00055       struct rsbac_reg_sc_list_item_t * head;
00056       struct rsbac_reg_sc_list_item_t * tail;
00057       struct rsbac_reg_sc_list_item_t * curr;
00058       rwlock_t                       lock;
00059       u_int                          count;
00060     };
00061 
00062 #endif /* __KERNEL__ */
00063 
00064 /***************************************************/
00065 /*                   Prototypes                    */
00066 /***************************************************/
00067 
00068 #endif

Generated on Fri Jun 17 09:45:18 2005 for RSBAC by  doxygen 1.4.2