lfc_getreplica man page

LFC_GETREPLICA(3) LFC Library Functions LFC_GETREPLICA(3)

[1mNAME[0m
lfc_getreplica - get the replica entries associated with a LFC file in
the name server

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

[1mint lfc_getreplica (const char *[4m[22mpath[24m[1m, const char *[4m[22mguid[24m[1m, const char *[4m[22mse[24m[1m,[0m
[1mint *[4m[22mnbentries[24m[1m, struct lfc_filereplica **[4m[22mrep_entries[24m[1m)[0m

[1mDESCRIPTION[0m
[1mlfc_getreplica [22mgets the replica entries associated with a LFC file in
the name server.

The file can be specified by [4mpath[24m name or by [4mguid[24m. If both are given,
they must point at the same file.

[4mpath[24m specifies the logical pathname relative to the current LFC
directory or the full LFC pathname.

[4mguid[24m specifies the Grid Unique IDentifier.

[4mse[24m allows to restrict the replica entries to a given SE.

[4mnbentries[0m
will be set to the number of entries in the array of replicas.

[4mrep_entries[0m
will be set to the address of an array of lfc_filereplica struc-
tures allocated by the API. The client application is responsi-
ble for freeing the array when not needed anymore.

struct lfc_filereplica {
u_signed64 fileid;
u_signed64 nbaccesses;
time_t atime; /* last access to replica */
time_t ptime; /* replica pin time */
char status;
char f_type; /* 'V' for Volatile, 'P' for Permanent */
char poolname[CA_MAXPOOLNAMELEN+1];
char host[CA_MAXHOSTNAMELEN+1];
char fs[80];
char sfn[CA_MAXSFNLEN+1];
};

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

[1mERRORS[0m
[1mENOENT [22mThe named file does not exist.

[1mEACCES [22mSearch permission is denied on a component of the [4mpath[0m
prefix.

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

[1mEFAULT [4m[22mpath[24m and [4mguid[24m are NULL pointers or [4mnbentries[24m or
[4mrep_entries[24m is a NULL pointer.

[1mENOTDIR [22mA component of [4mpath[24m prefix is not a directory.

[1mEINVAL [22mThe length of [4mguid[24m exceeds [1mCA_MAXGUIDLEN [22mor the length of
[4mse[24m exceeds [1mCA_MAXHOSTNAMELEN [22mor path and guid are both
given and they point at a different file.

[1mENAMETOOLONG [22mThe length of [4mpath[24m exceeds [1mCA_MAXPATHLEN [22mor the length of
a [4mpath[24m component exceeds [1mCA_MAXNAMELEN[22m.

[1mSENOSHOST [22mHost unknown.

[1mSENOSSERV [22mService unknown.

[1mSECOMERR [22mCommunication error.

[1mENSNACT [22mName server is not running or is being shutdown.

[1mSEE ALSO[0m
[1mCastor_limits(4)[22m, [1mlfc_chdir(3)[0m

[1mAUTHOR[0m
[1mLCG Grid Deployment [22mTeam

LFC $Date: 2006/04/26 10:12:35 $ LFC_GETREPLICA(3)

Info