cctools
|
00001 /* 00002 Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin 00003 Copyright (C) 2005- The University of Notre Dame 00004 This software is distributed under the GNU General Public License. 00005 See the file COPYING for details. 00006 */ 00007 00012 #ifndef CHIRP_TYPES_H 00013 #define CHIRP_TYPES_H 00014 00015 #include "int_sizes.h" 00016 #include "chirp_protocol.h" 00017 00018 #include <sys/types.h> 00019 #include <time.h> 00020 #include <fcntl.h> 00021 00029 struct chirp_stat { 00030 INT64_T cst_dev; 00031 INT64_T cst_ino; 00032 INT64_T cst_mode; 00033 INT64_T cst_nlink; 00034 INT64_T cst_uid; 00035 INT64_T cst_gid; 00036 INT64_T cst_rdev; 00037 INT64_T cst_size; 00038 INT64_T cst_blksize; 00039 INT64_T cst_blocks; 00040 INT64_T cst_atime; 00041 INT64_T cst_mtime; 00042 INT64_T cst_ctime; 00043 }; 00044 00049 struct chirp_statfs { 00050 INT64_T f_type; 00051 INT64_T f_blocks; 00052 INT64_T f_bavail; 00053 INT64_T f_bsize; 00054 INT64_T f_bfree; 00055 INT64_T f_files; 00056 INT64_T f_ffree; 00057 }; 00058 00061 struct chirp_dirent { 00062 char *name; 00063 struct chirp_stat info; 00064 struct chirp_dirent *next; 00065 }; 00066 00069 typedef enum { 00070 CHIRP_BULKIO_PREAD, 00071 CHIRP_BULKIO_PWRITE, 00072 CHIRP_BULKIO_SREAD, 00073 CHIRP_BULKIO_SWRITE, 00074 CHIRP_BULKIO_FSTAT, 00075 CHIRP_BULKIO_FSYNC, 00076 } chirp_bulkio_t; 00077 00082 struct chirp_bulkio { 00083 chirp_bulkio_t type; 00084 struct chirp_file *file; 00085 struct chirp_stat *info; 00086 void *buffer; 00087 INT64_T length; 00088 INT64_T stride_length; 00089 INT64_T stride_skip; 00090 INT64_T offset; 00091 INT64_T result; 00092 INT64_T errnum; 00093 }; 00094 00099 struct chirp_audit { 00100 char name[CHIRP_PATH_MAX]; 00101 INT64_T nfiles; 00102 INT64_T ndirs; 00103 INT64_T nbytes; 00104 }; 00105 00114 typedef void (*chirp_dir_t) (const char *path, void *arg); 00115 00125 typedef void (*chirp_longdir_t) (const char *path, struct chirp_stat * info, void *arg); 00126 00135 typedef void (*chirp_loc_t) (const char *location, void *arg); 00136 00137 #endif