dpm_getspacemd man page

DPM_GETSPACEMD(3)            DPM Library Functions           DPM_GETSPACEMD(3)

      dpm_getspacemd - get space metadata

      [1m#include <sys/types.h>[0m
      [1m#include "dpm_api.h"[0m

      [1mint  dpm_getspacemd  (int  [4m[22mnbtokens[24m[1m,  char  **[4m[22ms_tokens[24m[1m, int *[4m[22mnbreplies[24m[1m,[0m
      [1mstruct dpm_space_metadata **[4m[22mspacemd[24m[1m)[0m

      [1mdpm_getspacemd [22mgets space metadata.

      The input arguments are:

             specifies the number of tokens in the request.

             specifies an array of tokens returned by  previous  reservespace

      The output arguments are:

             will be set to the number of replies in the array of space meta-

             will be set to the address of  an  array  of  dpm_space_metadata
             structures  allocated  by  the  API.  The  client application is
             responsible for freeing the array when not needed anymore.

      struct dpm_space_metadata {
           char      s_type;
           char      s_token[CA_MAXDPMTOKENLEN+1];
           uid_t          s_uid;
           gid_t          s_gid;
           char      ret_policy;
           char      ac_latency;
           char      u_token[256];
           char      client_dn[256];
           u_signed64     t_space;  /* Total space */
           u_signed64     g_space;  /* Guaranteed space */
           signed64  u_space;  /* Unused space */
           char      poolname[CA_MAXPOOLNAMELEN+1];
           time_t         a_lifetime;    /* Lifetime assigned */
           time_t         r_lifetime;    /* Remaining lifetime */
           int       nbgids;
           gid_t          *gids;         /* restrict the space to given group(s) */

      This routine returns 0 if the operation was successful  or  -1  if  the
      operation failed. In the latter case, [1mserrno [22mis set appropriately.

      [1mEFAULT       [4m[22ms_tokens[24m [4m,[24m [4mnbreplies[24m or [4mspacemd[24m is a NULL pointer.

      [1mENOMEM       [22mMemory could not be allocated for storing the reply.

      [1mEINVAL       [4m[22mnbtokens[24m  is not strictly positive or the specified tokens
                   are invalid/unknown.

      [1mSENOSHOST    [22mHost unknown.

      [1mSEINTERNAL   [22mDatabase error.

      [1mSECOMERR     [22mCommunication error.

LCG                      $Date: 2008/09/25 10:17:46 $        DPM_GETSPACEMD(3)