dazuko_freebsd5.h

Go to the documentation of this file.
00001 /* Dazuko FreeBSD5. Allow FreeBSD5 file access control for 3rd-party applications.
00002    Written by John Ogness <jogness@antivir.de>
00003 
00004    Copyright (c) 2004 H+BEDV Datentechnik GmbH
00005    All rights reserved.
00006 
00007    Redistribution and use in source and binary forms, with or without
00008    modification, are permitted provided that the following conditions
00009    are met:
00010 
00011    1. Redistributions of source code must retain the above copyright notice,
00012    this list of conditions and the following disclaimer.
00013 
00014    2. Redistributions in binary form must reproduce the above copyright notice,
00015    this list of conditions and the following disclaimer in the documentation
00016    and/or other materials provided with the distribution.
00017 
00018    3. Neither the name of Dazuko nor the names of its contributors may be used
00019    to endorse or promote products derived from this software without specific
00020    prior written permission.
00021 
00022    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00023    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00024    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00025    ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
00026    LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
00027    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
00028    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00029    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00030    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00031    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00032    POSSIBILITY OF SUCH DAMAGE.
00033 */
00034 
00035 #ifndef DAZUKO_FREEBSD5_H
00036 #define DAZUKO_FREEBSD5_H
00037 
00038 #include <sys/param.h>
00039 #include <sys/libkern.h>
00040 #include <sys/lock.h>
00041 #include <sys/lockmgr.h>
00042 #include <sys/mutex.h>
00043 #include <machine/stdarg.h>
00044 
00045 
00046 #define inline          __inline
00047 #define DEVICE_NAME     "dazuko"
00048 
00049 #define XP_ERROR_PERMISSION     EPERM;
00050 #define XP_ERROR_INTERRUPT      EINTR;
00051 #define XP_ERROR_BUSY           EBUSY;
00052 #define XP_ERROR_FAULT          EFAULT;
00053 #define XP_ERROR_INVALID        EINVAL;
00054 
00055 
00056 struct xp_daemon_id
00057 {
00058         int     pid;
00059 };
00060 
00061 struct xp_file
00062 {
00063         struct file     *file;
00064 };
00065 
00066 struct xp_mutex
00067 {
00068         struct mtx      lock;
00069 };
00070 
00071 struct xp_atomic
00072 {
00073         int     value;
00074 };
00075 
00076 struct xp_file_struct
00077 {
00078         const char      *user_filename;
00079         struct thread   *t;
00080 };
00081 
00082 struct xp_queue
00083 {
00084         struct xp_mutex mutex;
00085 };
00086 
00087 struct xp_rwlock
00088 {
00089         struct lock     lock;
00090 };
00091 
00092 #endif

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