00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
#ifndef DAZUKO_RSBAC_H
00021
#define DAZUKO_RSBAC_H
00022
00023
#if CONFIG_MODVERSIONS==1
00024
#define MODVERSIONS
00025
#include <linux/modversions.h>
00026
#endif
00027
00028
#include <linux/kernel.h>
00029
#include <linux/version.h>
00030
00031
#ifdef MODULE
00032
#include <linux/module.h>
00033
#endif
00034
00035
#ifndef KERNEL_VERSION
00036 #define KERNEL_VERSION(a,b,c) ((a)*65536+(b)*256+(c))
00037
#endif
00038
00039
#include <linux/slab.h>
00040
#include <asm/atomic.h>
00041
00042
#ifdef CONFIG_SMP
00043
#ifndef __SMP__
00044
#define __SMP__
00045
#endif
00046
#endif
00047
00048
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
00049
#ifdef __SMP__
00050
#include <asm/smplock.h>
00051
#endif
00052
00053
#else
00054
#include <asm/semaphore.h>
00055
#endif
00056
00057
00058 #define DEVICE_NAME "dazuko"
00059
00060 #define XP_ERROR_PERMISSION -EPERM;
00061 #define XP_ERROR_INTERRUPT -EINTR;
00062 #define XP_ERROR_BUSY -EBUSY;
00063 #define XP_ERROR_FAULT -EFAULT;
00064 #define XP_ERROR_INVALID -EINVAL;
00065
00066
00067
struct xp_daemon_id
00068 {
00069 int pid;
00070 struct file *
file;
00071 };
00072
00073
struct xp_file
00074 {
00075 char c;
00076 };
00077
00078
struct xp_mutex
00079 {
00080 struct semaphore mutex;
00081 };
00082
00083
struct xp_atomic
00084 {
00085 atomic_t
atomic;
00086 };
00087
00088
struct xp_file_struct
00089 {
00090 int full_filename_length;
00091 char *
full_filename;
00092 int free_full_filename;
00093 struct dentry *
dentry;
00094 };
00095
00096
struct xp_queue
00097 {
00098
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
00099
wait_queue_head_t queue;
00100
#else
00101 struct wait_queue *
queue;
00102
#endif
00103
};
00104
00105
struct xp_rwlock
00106 {
00107 rwlock_t
rwlock;
00108 };
00109
00110
#endif