Content-type: text/html
Man page of GFAL_INIT
GFAL_INIT
Section: Library Functions (3)
Updated: $Date: 2009/04/16 13:56:37 $
Index
Return to Main Contents
NAME
gfal_init - generates a 'gfal_internal' object
SYNOPSIS
#include "gfal_api.h"
int gfal_init (gfal_request req, gfal_internal &gfal, char *errbuf, int errbufsz);
DESCRIPTION
gfal_init
generates a
gfal_internal
object from user parameters stored in a
gfal_request
object. It is important to note that user parameters must not be freed while
gfal
is needed. Once it is not needed anymore, you can free user parameters, and you have to free the object with
gfal_internal_free().
This object can/should be used several times for requests on same files.
It is very important to not modify such an object by hand, it have to be seen as a black box.
- req
-
gfal_request
object in which there are all user parameters.
- gfal
-
non-allocated pointer to a
gfal_internal
object in which the real object will be stored.
- errbuf
-
allocated
char *
pointer in which a detailed error message may be stored.
- errbufsz
-
size allocated ofr the pointer
errbuf
PARAMETERS IN GFAL_REQUEST
- int nbfiles
-
Specifies the number of files in the request. It can be either the number of file names in
surls
, or the number of file names you want to generate (see
generatesurls
parameter). It is mandatory in all cases.
- char **surls
-
Is the list of SURLs on which you want to do actions. It is mandatory in all cases, except
when you want to generate new file names (to create new file on a SE) (see
generatesurls
parameter).
- int generatesurls
-
If set to '1' and
surls
is set to NULL,
gfal_init()
will generate
nbfiles
file names. It is useful when you want to put new files on a SE, and you don't want a specific file name.
But in this case, the parameter
endpoint
must be set to the SE host name on which you want to create files, when to set
generatesurls
to '1'. In all other cases, it is ignored. Moreover, to generate file names, BDII is required
to get the root path, so it is not compatible with
no_bdii_check
parameter.
- char *relative_path
-
Is used during file name generation (
generatesurls
is set to '1'), to specify the default sub-directory (in the root path) in which to put files.
In all other cases, it is ignored.
- int oflag
-
Allows to specify if it is a
get
or a
put
action. It is only used by
gfal_turlsfromsurls()
function. By default, the function considers it is a
get
request.
- GFAL_LONG64 *filesizes
-
It is only used and mandatory when
oflag
is set to '1'. It is a table of size
nbfiles
in which there are the sizes of the files what will be put on the SE.
- enum se_type defaultsetype
-
Allows to specify the default type of the given SE to be used. The possible values are
TYPE_NONE,
TYPE_SE,
TYPE_SRM,
TYPE_SRMv2.
They respectively correspond to no default type, Classic SE, SRM v1, SRMv2. If BDII calls are not disabled,
and there no entry for the given SE with this type, but for another type, the latter will be used. By default,
it is set to
TYPE_NONE.
- enum se_type setype
-
Allows to specify the type of the given SE to be used. The possible values are
TYPE_NONE,
TYPE_SE,
TYPE_SRM,
TYPE_SRMv2.
They respectively correspond to no default type, Classic SE, SRM v1, SRMv2. If BDII calls are not disabled,
and there no entry for the given SE with this type, it will fails. By default,
it is set to
TYPE_NONE.
- int no_bdii_check
-
Disables call to BDII. So the SE type cannot be get from there, what means that you have to specify it either with
defaultsetype
or with
setype.
Moreover, as BDII can't be used to get SE parameters (port number, service path), at least the first SURLs has to
contain the full endpoint (eg. srm://lxdpm104.cern.ch:8446/srm/managerv2?SFN=/dpm/cern.ch/home/dteam/file.test).
It is not compatible with
generatesurls.
- int timeout
-
Specifies the time before which remote servers are considered as down. By default, there is no timeout.
- char **protocols
-
Specifies the list of protocols to use to communicate with the SE. By defaut, it will be set to all protocols
understandable by the system (the system has the corresponding library).
- NOTE
-
The following parameters are SRMv2-specific, what means that specifying them will force the type of the SE to SRMv2.
So it is not compatible with setting
setype
to another value than
TYPE_NONE
or
TYPE_SRMv2.
- char *srmv2_spacetokendesc
-
Specifies the space token to used with the given SE.
- int srmv2_desiredpintime
-
Specifies the desired pin life time for files on the given SE. It is only used by
gfal_pin(),
gfal_turlsfromsurls,
gfal_get.
- int srmv2_lslevels
-
It is only used by
gfal_ls.
Specifies the number of levels of recursion. Possible values are only '0' (no directory listing) or '1' (one level of directory listing).
- int srmv2_lsoffset
-
It is only used by
gfal_ls.
Specifies the offset from which the listing must begin. In other words, it is the number of file entries to skip.
- int srmv2_lscount
-
It is only used by
gfal_ls.
Specifies the maximum number of files to get. Keep in mind that SEs have also a maximum limit, so whatever you specify here, the number
of files will never be higher than the SE limit.
RETURN VALUE
This routine returns 0 on a success, or -1 in case of error. In the latter case,
errno
is set appropriately. Moreover, you can get an error message from
errbuf
, if specified.
ERRORS
errno
indicates the type of error, but for detailled error message, you have to look into
errbuf.
- EINVAL
-
One or more parameter in
req
have a wrong value.
- ENOMEM
-
Not enough free memory.
SEE ALSO
gfal(3),
gfal_request_new(3),
gfal_internal_free(3),
gfal_init(3),
gfal_deletesurls(3),
gfal_removedir(3),
gfal_turlsfromsurls(3),
gfal_ls(3),
gfal_get(3),
gfal_getstatus(3),
gfal_prestage(3),
gfal_prestagestatus(3),
gfal_pin(3),
gfal_release(3),
gfal_abortrequest(3),
gfal_abortfiles(3),
gfal_set_xfer_done(3),
gfal_set_xfer_running(3),
gfal_get_ids(3),
gfal_set_ids(3),
gfal_get_results(3),
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- PARAMETERS IN GFAL_REQUEST
-
- RETURN VALUE
-
- ERRORS
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 14:16:31 GMT, July 14, 2009