reg_main.h

Go to the documentation of this file.
00001 /************************************ */
00002 /* Rule Set Based Access Control      */
00003 /* Author and (c) 1999-2005: Amon Ott */
00004 /* REG - Module Registration          */
00005 /* Internal declarations and types    */
00006 /* Last modified: 22/Jul/2005         */
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       spinlock_t                     lock;
00050       int                            readers;
00051       u_int                          count;
00052     };
00053 
00054 struct rsbac_reg_sc_list_head_t
00055     {
00056       struct rsbac_reg_sc_list_item_t * head;
00057       struct rsbac_reg_sc_list_item_t * tail;
00058       struct rsbac_reg_sc_list_item_t * curr;
00059       spinlock_t                        lock;
00060       int                               readers;
00061       u_int                             count;
00062     };
00063 
00064 #endif /* __KERNEL__ */
00065 
00066 /***************************************************/
00067 /*                   Prototypes                    */
00068 /***************************************************/
00069 
00070 #endif

Generated on Sun May 21 14:30:49 2006 for RSBAC by  doxygen 1.4.2