/*********************************/
/* Rule Set Based Access Control */
/* Author and (c) 1999: Amon Ott */
/* Data structures / CWI         */
/* Last modified: 08.Feb.99      */
/*********************************/

#ifndef __RSBAC_CWI_DATA_STRUC_H
#define __RSBAC_CWI_DATA_STRUC_H

#include <linux/types.h>
#include <linux/fs.h>
#include <linux/wait.h>
#include <rsbac/aci.h>
/***************************************************************************/
/* 'Double dynamic' data structures for CWI model                          */

/* First, CWI data structures are defined.                                 */
/* We use a list of relations, each containing a transaction procedure     */
/* and two sublists for cdis that can be worked on simultanously and       */
/* processes currently according to this rule.                             */
/* There can be different rules for the same TP.                           */

struct rsbac_cwi_cdi_t
    {
      struct rsbac_fs_file_t     cdi;
      struct rsbac_cwi_cdi_t   * next;
    };

struct rsbac_cwi_proc_t
    {
      rsbac_pid_t                pid;
      struct rsbac_cwi_proc_t  * next;
    };

struct rsbac_cwi_relation_t
    {
      struct rsbac_fs_file_t     tp;
      struct rsbac_cwi_cdi_t   * cdi_head;
      struct rsbac_cwi_proc_t  * proc_head;
      struct rsbac_cwi_tp_t    * next;
    };

#endif
