Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

chirp_types.h

Go to the documentation of this file.
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 a BSD-style 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 
00110 typedef enum {
00111         CHIRP_JOB_STATE_BEGIN=0,        
00112         CHIRP_JOB_STATE_IDLE=1,         
00113         CHIRP_JOB_STATE_RUNNING=2,      
00114         CHIRP_JOB_STATE_SUSPENDED=3,    
00115         CHIRP_JOB_STATE_COMPLETE=4,     
00116         CHIRP_JOB_STATE_FAILED=5,       
00117         CHIRP_JOB_STATE_KILLED=6,       
00118 } chirp_job_state_t; 
00119 
00124 const char * chirp_job_state_string( chirp_job_state_t state );
00125 
00130 struct chirp_job_state {
00131         INT64_T jobid;                          
00132         char    command[CHIRP_PATH_MAX];        
00133         char    owner[CHIRP_PATH_MAX];          
00134         chirp_job_state_t state;                
00135         int     exit_code;                      
00136         time_t  submit_time;                    
00137         time_t  start_time;                     
00138         time_t  stop_time;                      
00139         int     pid;                            
00140 };
00141 
00150 typedef void (*chirp_dir_t) ( const char *path, void *arg );
00151 
00161 typedef void (*chirp_longdir_t) ( const char *path, struct chirp_stat *info, void *arg );
00162 
00171 typedef void (*chirp_joblist_t) ( struct chirp_job_state *state, void *arg );
00172 
00173 #endif

Generated on Mon Oct 19 10:11:27 2009 for cctools by  doxygen 1.3.9.1