"Fossies" - the Fresh Open Source Software Archive

Member "cryptofs-0.6.0/src/lufs/proto.h" (1 Oct 2003, 2421 Bytes) of package /linux/misc/old/cryptofs-0.6.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "proto.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2  * proto.h
    3  * Copyright (C) 2002 Florin Malita <mali@go.ro>
    4  *
    5  * This file is part of LUFS, a free userspace filesystem implementation.
    6  * See http://lufs.sourceforge.net/ for updates.
    7  *
    8  * LUFS is free software; you can redistribute it and/or modify
    9  * it under the terms of the GNU General Public License as published by
   10  * the Free Software Foundation; either version 2 of the License, or
   11  * (at your option) any later version.
   12  *
   13  * LUFS is distributed in the hope that it will be useful,
   14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
   15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   16  * GNU General Public License for more details.
   17  *
   18  * You should have received a copy of the GNU General Public License
   19  * along with this program; if not, write to the Free Software
   20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   21  */
   22 
   23 #ifndef _LU_PROTO_H_
   24 #define _LU_PROTO_H_
   25 
   26 #define LU_MAXDATA  4096
   27 
   28 #define PVERSION    0x02
   29 
   30 #define PTYPE_OK    0x00
   31 #define PTYPE_MOUNT 0x01
   32 #define PTYPE_READ  0x02
   33 #define PTYPE_WRITE 0x03
   34 #define PTYPE_READDIR   0x04
   35 #define PTYPE_STAT  0x05
   36 #define PTYPE_UMOUNT    0x06
   37 #define PTYPE_SETATTR   0x07
   38 #define PTYPE_MKDIR 0x08
   39 #define PTYPE_RMDIR 0x09
   40 #define PTYPE_CREATE    0x0A
   41 #define PTYPE_UNLINK    0x0B
   42 #define PTYPE_RENAME    0x0C
   43 #define PTYPE_OPEN  0x0D
   44 #define PTYPE_RELEASE   0x0E
   45 #define PTYPE_READLINK  0x0F
   46 #define PTYPE_LINK  0x10
   47 #define PTYPE_SYMLINK   0x11
   48 
   49 #define PTYPE_MAX   0x11
   50 
   51 
   52 #define PTYPE_ERROR 0x100
   53 
   54 #define PERROR(x)   (-(x & (PTYPE_ERROR - 1)) - 1)
   55 #define PIS_ERROR(x)    (x & PTYPE_ERROR)
   56 
   57 struct lu_msg {
   58     unsigned short  msg_version;
   59     unsigned short  msg_type;
   60     unsigned short  msg_datalen;
   61     unsigned short  msg_pid;
   62 };
   63 
   64 
   65 struct lufs_fattr{
   66     unsigned long   f_ino;
   67     unsigned long   f_mode;
   68     unsigned long   f_nlink;
   69     unsigned long   f_uid;
   70     unsigned long   f_gid;
   71     long long       f_size;
   72     unsigned long   f_atime;
   73     unsigned long   f_mtime;
   74     unsigned long   f_ctime;
   75     unsigned long   f_blksize;
   76     unsigned long   f_blocks;
   77 };
   78 
   79 
   80 struct lufs_req_readdir{
   81     unsigned short  offset;
   82     char        dirname[0];
   83 };
   84 
   85 struct lufs_req_mkdir{
   86     int     mode;
   87     char    dirname[0];
   88 };
   89 
   90 struct lufs_req_rw{
   91     long long       offset;
   92     unsigned long   count;
   93     char        name[0];
   94 };
   95 
   96 struct lufs_req_open{
   97     unsigned    mode;
   98     char    name[0];
   99 };
  100 
  101 struct lufs_req_setattr{
  102     struct lufs_fattr   fattr;
  103     char        name[0];
  104 };
  105 
  106 #endif