Content-type: text/html Man page of LCG_LR

LCG_LR

Section: Library Functions (3)
Updated: $Date: 2008/12/18 18:04:43 $
Index Return to Main Contents

 

NAME

lcg_lr - get the list of replicas for a given LFN, GUID or SURL

 

SYNOPSIS

#include "lcg_util.h"

int lcg_lr (char *file, char *vo, char *conf_file, int insecure, char ***pfns)

int lcg_lrx (char *file, char *vo, char *conf_file, int insecure, char ***pfns, char *errbuf, int errbufsz)

int lcg_lr2 (char *file, int nobdii, char *vo, char ***pfns, char *errbuf, int errbufsz)

int lcg_lr3 (char *file, int nobdii, char *vo, char ***pfns, int verbose, char *errbuf, int errbufsz)

 

DESCRIPTION

lcg_lr gets the list of replicas for a given LFN, GUID or SURL.
file
specifies the Logical File Name, the Grid Unique IDentifier or the Site URL. An SURL scheme can be sfn: for a classical SE or srm:.
nobdii
If set to a non-zero value, it means that you don't want to make BDII calls to get LFC endpoint. So, you have to define the environment variable 'LFC_HOST'.
vo
specifies the Virtual Organization the user belongs to. If it is not specified, the environment variable LCG_GFAL_VO will be used.
conf_file
This argument is currently ignored.
insecure
This argument is currently ignored. The access to the Replica Catalog or the LFC is done according to the endpoints published in MDS.
pfns
will be set by the routine to the address of the array of pointers to the replicas. The application should free both the replica names and the array of pointers.
verbose
Verbose level. Here are the possible levels:
0
Only critical errors are displayed on stderr or put into errbuf if not null.
1
Warnings are displayed on stderr as well as critical errors.
2
Debug information is displayed as well as warnings and critical errors.
errbuf
specifies a buffer of size errbufsz to receive detailed error messages. If this pointer is NULL, the message goes to stderr. The pointer should not be NULL if the application is a daemon or is multi-threaded.

 

NOTE

The environment variable LCG_GFAL_INFOSYS must point to the BDII, unless nobdii is set to a non-zero value. To use the RLS as catalog instead of the LFC, the environment variable LCG_CATALOG_TYPE must explicitely be set to "edg". By default, it is set to "lfc".

 

RETURN VALUE

This routine returns 0 if the operation was successful or -1 if the operation failed. In the latter case, errno is set appropriately.

 

ERRORS

ENOENT
The named file does not exist.
EFAULT
file, vo or pfns is an invalid pointer.
EINVAL
file has an invalid syntax.
ECOMM
Communication error.
ENAMETOOLONG
vo is too long.
EPROTONOSUPPORT
Access method not supported.

 

FILES

/opt/lcg/include/lcg_util.h
/opt/lcg/lib/liblcg_util.so

 

SEE ALSO

lcg_aa(3), lcg_cp(3), lcg_cr(3), lcg_del(3), lcg_gt(3), lcg_la(3), lcg_lg(3), lcg_lr(3), lcg_ra(3), lcg_rep(3), lcg_rf(3), lcg_sd(3), lcg_stmd(3), lcg_uf(3)


 

Index

NAME
SYNOPSIS
DESCRIPTION
NOTE
RETURN VALUE
ERRORS
FILES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 14:16:53 GMT, July 14, 2009