nfs-ganesha 1.4

hpssclapiext.h

Go to the documentation of this file.
00001 
00011 #include <hpss_types.h>
00012 #include <hpss_api.h>
00013 #include <hpss_version.h>
00014 
00015 #ifndef _HPSSCLAPIEXT_H
00016 #define _HPSSCLAPIEXT_H
00017 
00018 #if HPSS_MAJOR_VERSION == 5
00019 
00020 #define TYPE_CRED_HPSS  hsec_UserCred_t
00021 #define TYPE_TOKEN_HPSS  gss_token_t
00022 #define TYPE_UUID_HPSS  uuid_t
00023 
00024 #elif HPSS_MAJOR_VERSION == 6
00025 
00026 #define TYPE_CRED_HPSS  sec_cred_t
00027 #define TYPE_TOKEN_HPSS  hpss_authz_token_t
00028 #define TYPE_UUID_HPSS  hpss_uuid_t
00029 
00030 #elif HPSS_MAJOR_VERSION == 7
00031 
00032 #define TYPE_CRED_HPSS  sec_cred_t
00033 typedef void *TYPE_TOKEN_HPSS;
00034 #define TYPE_UUID_HPSS  hpss_uuid_t
00035 
00036 #else
00037 #error "Unexpected HPSS VERSION"
00038 #endif
00039 
00040 int HPSSFSAL_SymlinkHandle(ns_ObjHandle_t * ObjHandle,  /* IN - Handle of existing file */
00041                            char *Contents,      /* IN - Desired contents of the link */
00042                            char *Path,  /* IN - New name of the symbolic link */
00043                            TYPE_CRED_HPSS * Ucred,      /* IN - pointer to user credentials */
00044                            ns_ObjHandle_t * HandleOut,  /* OUT - Handle of crfeated link */
00045                            hpss_Attrs_t * AttrsOut);    /* OUT - symbolic link attributes */
00046 
00047 int HPSSFSAL_MkdirHandle(ns_ObjHandle_t * ObjHandle,    /* IN - handle of parent directory */
00048                          char *Path,    /* IN - path of directory */
00049                          mode_t Mode,   /* IN - perm bits for new directory */
00050                          TYPE_CRED_HPSS * Ucred,        /* IN - user credentials */
00051                          ns_ObjHandle_t * HandleOut,    /* OUT - returned object handle */
00052                          hpss_Attrs_t * AttrsOut);      /* OUT - returned attributes */
00053 
00054 int HPSSFSAL_GetRawAttrHandle(ns_ObjHandle_t * ObjHandle,       /* IN - parent object handle */
00055                               char *Path,       /* IN - path of junction to get attributes */
00056                               TYPE_CRED_HPSS * Ucred,   /* IN - user credentials */
00057                               int traverse_junction,
00059                               ns_ObjHandle_t * HandleOut,       /* OUT - returned object handle */
00060                               TYPE_TOKEN_HPSS * AuthzTicket,    /* OUT - returned authorization */
00061                               hpss_Attrs_t * AttrsOut); /* OUT - returned attributes */
00062 
00063 #if (HPSS_MAJOR_VERSION < 7)
00064 int HPSSFSAL_FileSetAttrHandle(ns_ObjHandle_t * ObjHandle,      /* IN  - parent object handle */
00065                                char *Path,      /* IN  - path to the object */
00066                                TYPE_CRED_HPSS * Ucred,  /* IN  - user credentials */
00067                                hpss_fileattrbits_t SelFlags,    /* IN - attributes fields to set */
00068                                hpss_fileattr_t * AttrIn,        /* IN  - input attributes */
00069                                hpss_fileattr_t * AttrOut);      /* OUT - attributes after change */
00070 #else
00071 #define HPSSFSAL_FileSetAttrHandle hpss_FileSetAttributesHandle
00072 #endif
00073 
00074 int HPSSFSAL_OpenHandle(ns_ObjHandle_t * ObjHandle,     /* IN - Parent object handle */
00075                         char *Path,     /* IN - Path to file to be opened */
00076                         int Oflag,      /* IN - Type of file access */
00077                         mode_t Mode,    /* IN - Desired file perms if create */
00078                         TYPE_CRED_HPSS * Ucred, /* IN - User credentials */
00079                         hpss_cos_hints_t * HintsIn,     /* IN - Desired class of service */
00080                         hpss_cos_priorities_t * HintsPri,       /* IN - Priorities of hint struct */
00081                         hpss_cos_hints_t * HintsOut,    /* OUT - Granted class of service */
00082                         hpss_Attrs_t * AttrsOut,        /* OUT - returned attributes */
00083                         ns_ObjHandle_t * HandleOut,     /* OUT - returned handle */
00084                         TYPE_TOKEN_HPSS * AuthzTicket); /* OUT - Client authorization */
00085 
00086 int HPSSFSAL_CreateHandle(ns_ObjHandle_t * ObjHandle,   /* IN - Parent object handle */
00087                           char *Path,   /* IN - Path to file to be created */
00088                           mode_t Mode,  /* IN - Desired file perms */
00089                           TYPE_CRED_HPSS * Ucred,       /* IN - User credentials */
00090                           hpss_cos_hints_t * HintsIn,   /* IN - Desired class of service */
00091                           hpss_cos_priorities_t * HintsPri,     /* IN - Priorities of hint struct */
00092                           hpss_cos_hints_t * HintsOut,  /* OUT - Granted class of service */
00093                           hpss_Attrs_t * AttrsOut,      /* OUT - returned attributes */
00094                           ns_ObjHandle_t * HandleOut,   /* OUT - returned handle */
00095                           TYPE_TOKEN_HPSS * AuthzTicket);       /* OUT - Client authorization */
00096 
00097 int HPSSFSAL_ReadRawAttrsHandle(ns_ObjHandle_t * ObjHandle,     /* IN - directory object handle */
00098                                 u_signed64 OffsetIn,    /* IN - directory position */
00099                                 sec_cred_t * Ucred,     /* IN - user credentials */
00100                                 unsigned32 BufferSize,  /* IN - size of output buffer */
00101                                 unsigned32 GetAttributes,       /* IN - get object attributes? */
00102                                 unsigned32 IgnInconstitMd,      /* IN - ignore in case of inconstitent MD */
00103                                 unsigned32 * End,       /* OUT - hit end of directory */
00104                                 u_signed64 * OffsetOut, /* OUT - resulting directory position */
00105                                 ns_DirEntry_t * DirentPtr);     /* OUT - directory entry information */
00106 
00107 #if (HPSS_LEVEL < 622)
00108 int HPSSFSAL_FileGetXAttributesHandle(ns_ObjHandle_t * ObjHandle,       /* IN - object handle */
00109                                       unsigned32 Flags, /* IN - flags for storage attrs */
00110                                       unsigned32 StorageLevel,  /* IN - level to query     */
00111                                       hpss_xfileattr_t * AttrOut);      /* OUT - attributes after query */
00112 #endif
00113 
00114 #endif