chirp_client.h

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 
00008 #ifndef CHIRP_CLIENT_H
00009 #define CHIRP_CLIENT_H
00010 
00011 #include "int_sizes.h"
00012 #include "chirp_protocol.h"
00013 #include "chirp_types.h"
00014 
00015 #include <fcntl.h>
00016 #include <unistd.h>
00017 #include <stdio.h>
00018 #include <time.h>
00019 
00020 /* Authentication Environment Variable */
00021 #define CHIRP_CLIENT_TICKETS  "CHIRP_CLIENT_TICKETS"
00022 
00023 struct chirp_client *chirp_client_connect(const char *host, int negotiate_auth, time_t stoptime);
00024 struct chirp_client *chirp_client_connect_condor(time_t stoptime);
00025 
00026 void chirp_client_disconnect(struct chirp_client *c);
00027 INT64_T chirp_client_serial(struct chirp_client *c);
00028 
00029 INT64_T chirp_client_open(struct chirp_client *c, const char *path, INT64_T flags, INT64_T mode, struct chirp_stat *buf, time_t stoptime);
00030 INT64_T chirp_client_close(struct chirp_client *c, INT64_T fd, time_t stoptime);
00031 INT64_T chirp_client_pread(struct chirp_client *c, INT64_T fd, void *buffer, INT64_T length, INT64_T offset, time_t stoptime);
00032 INT64_T chirp_client_pwrite(struct chirp_client *c, INT64_T fd, const void *buffer, INT64_T length, INT64_T offset, time_t stoptime);
00033 INT64_T chirp_client_sread(struct chirp_client *c, INT64_T fd, void *buffer, INT64_T length, INT64_T stride_length, INT64_T stride_skip, INT64_T offset, time_t stoptime);
00034 INT64_T chirp_client_swrite(struct chirp_client *c, INT64_T fd, const void *buffer, INT64_T length, INT64_T stride_length, INT64_T stride_skip, INT64_T offset, time_t stoptime);
00035 INT64_T chirp_client_fsync(struct chirp_client *c, INT64_T fd, time_t stoptime);
00036 INT64_T chirp_client_fstat(struct chirp_client *c, INT64_T fd, struct chirp_stat *buf, time_t stoptime);
00037 INT64_T chirp_client_fstatfs(struct chirp_client *c, INT64_T fd, struct chirp_statfs *buf, time_t stoptime);
00038 INT64_T chirp_client_fchown(struct chirp_client *c, INT64_T fd, INT64_T uid, INT64_T gid, time_t stoptime);
00039 INT64_T chirp_client_fchmod(struct chirp_client *c, INT64_T fd, INT64_T mode, time_t stoptime);
00040 INT64_T chirp_client_ftruncate(struct chirp_client *c, INT64_T fd, INT64_T length, time_t stoptime);
00041 
00042 INT64_T chirp_client_getfile(struct chirp_client *c, const char *name, FILE * stream, time_t stoptime);
00043 INT64_T chirp_client_getfile_buffer(struct chirp_client *c, const char *name, char **buffer, time_t stoptime);
00044 INT64_T chirp_client_putfile(struct chirp_client *c, const char *name, FILE * stream, INT64_T mode, INT64_T length, time_t stoptime);
00045 INT64_T chirp_client_putfile_buffer(struct chirp_client *c, const char *name, const char *buffer, INT64_T mode, INT64_T length, time_t stoptime);
00046 INT64_T chirp_client_thirdput(struct chirp_client *c, const char *path, const char *hostname, const char *newpath, time_t stoptime);
00047 
00048 INT64_T chirp_client_getstream(struct chirp_client *c, const char *path, time_t stoptime);
00049 INT64_T chirp_client_getstream_read(struct chirp_client *c, void *buffer, INT64_T length, time_t stoptime);
00050 
00051 INT64_T chirp_client_putstream(struct chirp_client *c, const char *path, time_t stoptime);
00052 INT64_T chirp_client_putstream_write(struct chirp_client *c, const char *data, INT64_T length, time_t stoptime);
00053 
00054 INT64_T chirp_client_cookie(struct chirp_client *c, const char *cookie, time_t stoptime);
00055 
00056 CHIRP_SEARCH *chirp_client_opensearch(struct chirp_client *c, const char *paths, const char *pattern, int flags, time_t stoptime);
00057 struct chirp_searchent *chirp_client_readsearch(CHIRP_SEARCH *search);
00058 int chirp_client_closesearch(CHIRP_SEARCH *search);
00059 
00060 INT64_T chirp_client_getlongdir(struct chirp_client *c, const char *path, chirp_longdir_t callback, void *arg, time_t stoptime);
00061 INT64_T chirp_client_getdir(struct chirp_client *c, const char *path, chirp_dir_t callback, void *arg, time_t stoptime);
00062 INT64_T chirp_client_opendir(struct chirp_client *c, const char *path, time_t stoptime);
00063 const char *chirp_client_readdir(struct chirp_client *c, time_t stoptime);
00064 INT64_T chirp_client_getacl(struct chirp_client *c, const char *path, chirp_dir_t callback, void *arg, time_t stoptime);
00065 INT64_T chirp_client_openacl(struct chirp_client *c, const char *path, time_t stoptime);
00066 const char *chirp_client_readacl(struct chirp_client *c, time_t stoptime);
00067 INT64_T chirp_client_ticket_create(struct chirp_client *c, char name[CHIRP_PATH_MAX], unsigned bits, time_t stoptime);
00068 INT64_T chirp_client_ticket_register(struct chirp_client *c, const char *name, const char *subject, time_t duration, time_t stoptime);
00069 INT64_T chirp_client_ticket_delete(struct chirp_client *c, const char *name, time_t stoptime);
00070 INT64_T chirp_client_ticket_list(struct chirp_client *c, const char *subject, char ***list, time_t stoptime);
00071 INT64_T chirp_client_ticket_get(struct chirp_client *c, const char *name, char **subject, char **ticket, time_t * duration, char ***rights, time_t stoptime);
00072 INT64_T chirp_client_ticket_modify(struct chirp_client *c, const char *name, const char *path, const char *aclmask, time_t stoptime);
00073 INT64_T chirp_client_setacl(struct chirp_client *c, const char *path, const char *user, const char *acl, time_t stoptime);
00074 INT64_T chirp_client_resetacl(struct chirp_client *c, const char *path, const char *acl, time_t stoptime);
00075 INT64_T chirp_client_locate(struct chirp_client *c, const char *path, chirp_loc_t callback, void *arg, time_t stoptime);
00076 INT64_T chirp_client_whoami(struct chirp_client *c, char *buf, INT64_T length, time_t stoptime);
00077 INT64_T chirp_client_whoareyou(struct chirp_client *c, const char *rhost, char *buffer, INT64_T length, time_t stoptime);
00078 INT64_T chirp_client_unlink(struct chirp_client *c, const char *path, time_t stoptime);
00079 INT64_T chirp_client_rename(struct chirp_client *c, const char *path, const char *newpath, time_t stoptime);
00080 INT64_T chirp_client_link(struct chirp_client *c, const char *path, const char *newpath, time_t stoptime);
00081 INT64_T chirp_client_symlink(struct chirp_client *c, const char *path, const char *newpath, time_t stoptime);
00082 INT64_T chirp_client_readlink(struct chirp_client *c, const char *path, char *buf, INT64_T length, time_t stoptime);
00083 INT64_T chirp_client_mkdir(struct chirp_client *c, char const *path, INT64_T mode, time_t stoptime);
00084 INT64_T chirp_client_rmdir(struct chirp_client *c, char const *path, time_t stoptime);
00085 INT64_T chirp_client_rmall(struct chirp_client *c, char const *path, time_t stoptime);
00086 INT64_T chirp_client_stat(struct chirp_client *c, const char *path, struct chirp_stat *buf, time_t stoptime);
00087 INT64_T chirp_client_lstat(struct chirp_client *c, const char *path, struct chirp_stat *buf, time_t stoptime);
00088 INT64_T chirp_client_statfs(struct chirp_client *c, const char *path, struct chirp_statfs *buf, time_t stoptime);
00089 INT64_T chirp_client_access(struct chirp_client *c, const char *path, INT64_T mode, time_t stoptime);
00090 INT64_T chirp_client_chmod(struct chirp_client *c, const char *path, INT64_T mode, time_t stoptime);
00091 INT64_T chirp_client_chown(struct chirp_client *c, const char *path, INT64_T uid, INT64_T gid, time_t stoptime);
00092 INT64_T chirp_client_lchown(struct chirp_client *c, const char *path, INT64_T uid, INT64_T gid, time_t stoptime);
00093 INT64_T chirp_client_truncate(struct chirp_client *c, const char *path, INT64_T length, time_t stoptime);
00094 INT64_T chirp_client_utime(struct chirp_client *c, const char *path, time_t actime, time_t modtime, time_t stoptime);
00095 INT64_T chirp_client_md5(struct chirp_client *c, const char *path, unsigned char digest[16], time_t stoptime);
00096 INT64_T chirp_client_setrep(struct chirp_client *c, const char *path, int nreps, time_t stoptime);
00097 
00098 INT64_T chirp_client_getxattr(struct chirp_client *c, const char *path, const char *name, void *data, size_t size, time_t stoptime);
00099 INT64_T chirp_client_fgetxattr(struct chirp_client *c, INT64_T fd, const char *name, void *data, size_t size, time_t stoptime);
00100 INT64_T chirp_client_lgetxattr(struct chirp_client *c, const char *path, const char *name, void *data, size_t size, time_t stoptime);
00101 INT64_T chirp_client_listxattr(struct chirp_client *c, const char *path, char *list, size_t size, time_t stoptime);
00102 INT64_T chirp_client_flistxattr(struct chirp_client *c, INT64_T fd, char *list, size_t size, time_t stoptime);
00103 INT64_T chirp_client_llistxattr(struct chirp_client *c, const char *path, char *list, size_t size, time_t stoptime);
00104 INT64_T chirp_client_setxattr(struct chirp_client *c, const char *path, const char *name, const void *data, size_t size, int flags, time_t stoptime);
00105 INT64_T chirp_client_fsetxattr(struct chirp_client *c, INT64_T fd, const char *name, const void *data, size_t size, int flags, time_t stoptime);
00106 INT64_T chirp_client_lsetxattr(struct chirp_client *c, const char *path, const char *name, const void *data, size_t size, int flags, time_t stoptime);
00107 INT64_T chirp_client_removexattr(struct chirp_client *c, const char *path, const char *name, time_t stoptime);
00108 INT64_T chirp_client_fremovexattr(struct chirp_client *c, INT64_T fd, const char *name, time_t stoptime);
00109 INT64_T chirp_client_lremovexattr(struct chirp_client *c, const char *path, const char *name, time_t stoptime);
00110 
00111 INT64_T chirp_client_remote_debug(struct chirp_client *c, const char *flag, time_t stoptime);
00112 INT64_T chirp_client_localpath(struct chirp_client *c, const char *path, char *localpath, int length, time_t stoptime);
00113 INT64_T chirp_client_audit(struct chirp_client *c, const char *path, struct chirp_audit **list, time_t stoptime);
00114 
00115 INT64_T chirp_client_mkalloc(struct chirp_client *c, char const *path, INT64_T size, INT64_T mode, time_t stoptime);
00116 INT64_T chirp_client_lsalloc(struct chirp_client *c, char const *path, char *allocpath, INT64_T * total, INT64_T * inuse, time_t stoptime);
00117 
00118 INT64_T chirp_client_pread_begin(struct chirp_client *c, INT64_T fd, void *buffer, INT64_T length, INT64_T offset, time_t stoptime);
00119 INT64_T chirp_client_pread_finish(struct chirp_client *c, INT64_T fd, void *buffer, INT64_T length, INT64_T offset, time_t stoptime);
00120 INT64_T chirp_client_sread_begin(struct chirp_client *c, INT64_T fd, void *buffer, INT64_T length, INT64_T stride_length, INT64_T stride_skip, INT64_T offset, time_t stoptime);
00121 INT64_T chirp_client_sread_finish(struct chirp_client *c, INT64_T fd, void *buffer, INT64_T length, INT64_T stride_length, INT64_T stride_skip, INT64_T offset, time_t stoptime);
00122 INT64_T chirp_client_pwrite_begin(struct chirp_client *c, INT64_T fd, const void *buffer, INT64_T length, INT64_T offset, time_t stoptime);
00123 INT64_T chirp_client_pwrite_finish(struct chirp_client *c, INT64_T fd, const void *buffer, INT64_T length, INT64_T offset, time_t stoptime);
00124 INT64_T chirp_client_swrite_begin(struct chirp_client *c, INT64_T fd, const void *buffer, INT64_T length, INT64_T stride_length, INT64_T stride_skip, INT64_T offset, time_t stoptime);
00125 INT64_T chirp_client_swrite_finish(struct chirp_client *c, INT64_T fd, const void *buffer, INT64_T length, INT64_T stride_length, INT64_T stride_skip, INT64_T offset, time_t stoptime);
00126 INT64_T chirp_client_fsync_begin(struct chirp_client *c, INT64_T fd, time_t stoptime);
00127 INT64_T chirp_client_fsync_finish(struct chirp_client *c, INT64_T fd, time_t stoptime);
00128 INT64_T chirp_client_fstat_begin(struct chirp_client *c, INT64_T fd, struct chirp_stat *buf, time_t stoptime);
00129 INT64_T chirp_client_fstat_finish(struct chirp_client *c, INT64_T fd, struct chirp_stat *buf, time_t stoptime);
00130 
00131 INT64_T chirp_client_job_create(struct chirp_client *c, const char *json, chirp_jobid_t *id, time_t stoptime);
00132 INT64_T chirp_client_job_commit(struct chirp_client *c, const char *json, time_t stoptime);
00133 INT64_T chirp_client_job_kill(struct chirp_client *c, const char *json, time_t stoptime);
00134 INT64_T chirp_client_job_status(struct chirp_client *c, const char *json, char **status, time_t stoptime);
00135 INT64_T chirp_client_job_wait(struct chirp_client *c, chirp_jobid_t id, INT64_T timeout, char **status, time_t stoptime);
00136 INT64_T chirp_client_job_reap(struct chirp_client *c, const char *json, time_t stoptime);
00137 
00138 #endif
00139 
00140 /* vim: set noexpandtab tabstop=4: */

Generated on 17 Feb 2015 for cctools by  doxygen 1.6.1