lcg_gt(3) - Linux man page
Name
lcg_gt - get the TURL for a given SURL and transfer protocolSynopsis
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.
- ENODATA
- Required data cannot be found in the server response but the call itself was successfull - for example, turl is missing. This normally indicates a malfunctioning server.
- 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