Content-type: text/html Man page of LCG_GT

LCG_GT

Section: Library Functions (3)
Updated: $Date: 2008/05/07 12:40:27 $
Index Return to Main Contents

 

NAME

lcg_gt - get the TURL for a given SURL and transfer protocol

 

SYNOPSIS

#include "lcg_util.h"

int lcg_gt (char *surl, char *protocol, char **turl, int *reqid, int *fileid, char **token);

int lcg_gtt (char *surl, char *protocol, char **turl, int *reqid, int *fileid, char **token, int timeout);

int lcg_gtx (char *surl, char *protocol, char **turl, int *reqid, int *fileid, char **token, char *errbuf, int errbufsz);

int lcg_gtxt (char *surl, char *protocol, char **turl, int *reqid, int *fileid, char **token, char *errbuf, int errbufsz, int timeout);

int lcg_gt2 (char *surl, char **protocols, char **turl, int *reqid, int *fileid, char **token, char *errbuf, int errbufsz, int timeout, char *spacetokendesc);

int lcg_gt3 (char *surl, enum se_typedefaulttype, enum se_typesetype, int nobdii, char **protocols, char **turl, int *reqid, int *fileid, char **token, char *errbuf, int errbufsz, int timeout, char *spacetokendesc);

 

DESCRIPTION

lcg_gt gets the TURL for a given SURL and transfer protocol.
surl
specifies the Site URL. An SURL scheme can be sfn: for a classical SE or srm:.
protocol
specifies the protocol which will be used to access the file.
protocols
specifies the list of protocols which can be used to access the file. This list must end by the empty string.
turl
will be set by the routine to the address of the buffer which contains the TURL. This buffer should be freed by the application after use.
reqid
will receive the request identifier to be used to set the file state to "Running" or "Done".
fileid will receive the file ordinal to be used to set the file state to "Running" or "Done".
token
will receive the request token to be used to set the file state to "Running" or "Done".
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.
timeout
specifies the value of timeout(default 0)
defaulttype
specifies the default SE type you want to use. Possible values are TYPE_NONE, TYPE_SE, TYPE_SRM, TYPE_SRMv2, for respectively no default type, classic SE, SRMv1, and SRMv2. But if according to the BDII the default type is not available for this SE, it will use another type.
setype
specifies the SE type you want to use. Possible values are TYPE_NONE, TYPE_SE, TYPE_SRM, TYPE_SRMv2, for respectively no type, classic SE, SRMv1, and SRMv2. But if according to the BDII the default type is not available for this SE, it will fail.
nobdii
If set to a non-zero value, it means that you don't want to make BDII calls to get SE type. So, you must provide the type of the SE for srm: arguments, and full endpoint in SURLs. For SE type, defaulttype can be used.
spacetokendesc
specifies the space token to use with surl. Can be NULL.

 

NOTES

The arguments (token, errbuf, errbufsz) are only meaningful if the space is managed by an SRM. The environment variable LCG_GFAL_INFOSYS must point to the BDII, unless nobdii is set to a non-zero value.

 

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.
EACCES
Permission denied.
EFAULT
One of the arguments is an invalid pointer.
EINVAL
surl has an invalid syntax.
ECOMM
Communication error.
ENAMETOOLONG
The host name contained in surl 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
NOTES
RETURN VALUE
ERRORS
FILES
SEE ALSO

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