CERN org.glite.Gfal  2.0.1
Defines | Functions
/builddir/build/BUILD/gfal2-2.0.0/src/common/srm/gfal_common_srm_endpoint.c File Reference

file for internal use in the srm part, endpoint determination More...

#include <time.h>
#include <string.h>
#include <unistd.h>
#include <regex.h>
#include <stdlib.h>
#include <errno.h>
#include "../gfal_common_internal.h"
#include "gfal_common_srm_endpoint.h"
#include "../gfal_common_errverbose.h"
#include "../mds/gfal_common_mds.h"

Functions

int gfal_srm_determine_endpoint (gfal_srmv2_opt *opts, const char *surl, char *buff_endpoint, size_t s_buff, enum gfal_srm_proto *srm_type, GError **err)
 extract endpoint and srm_type from a surl determine the best endpoint associated with the surl and the param of the actual handle (no bdii check or not) see the diagram in doc/diagrams/surls_get_endpoint_activity_diagram.svg for more informations
gboolean gfal_check_fullendpoint_in_surlG (const char *surl, GError **err)
int gfal_get_fullendpointG (const char *surl, char *buff_endpoint, size_t s_buff, GError **err)
 create a full endpoint from a "full-surl"
int gfal_select_best_protocol_and_endpointG (gfal_srmv2_opt *opts, char **tab_se_type, char **tab_endpoint, char *buff_endpoint, size_t s_buff, enum gfal_srm_proto *srm_type, GError **err)
int gfal_get_hostname_from_surlG (const char *surl, char *buff_hostname, size_t s_buff, GError **err)
 get the hostname from a surl
int gfal_get_endpoint_and_setype_from_bdiiG (gfal_srmv2_opt *opts, const char *surl, char *buff_endpoint, size_t s_buff, enum gfal_srm_proto *srm_type, GError **err)
 get endpoint from the bdii system only

Detailed Description

file for internal use in the srm part, endpoint determination

Author:
Devresse Adrien
Version:
2.0
Date:
22/06/2011

Function Documentation

gboolean gfal_check_fullendpoint_in_surlG ( const char *  surl,
GError **  err 
)

return TRUE if a full endpoint is contained in surl else FALSE

Referenced by gfal_srm_determine_endpoint().

int gfal_get_endpoint_and_setype_from_bdiiG ( gfal_srmv2_opt opts,
const char *  surl,
char *  buff_endpoint,
size_t  s_buff,
enum gfal_srm_proto *  srm_type,
GError **  err 
)

get endpoint from the bdii system only

Returns:
0 if success with endpoint and srm_type set correctly else -1 and err set

References gfal_get_hostname_from_surlG(), and gfal_select_best_protocol_and_endpointG().

Referenced by gfal_srm_determine_endpoint().

int gfal_get_hostname_from_surlG ( const char *  surl,
char *  buff_hostname,
size_t  s_buff,
GError **  err 
)

get the hostname from a surl

Returns:
return 0 if success else -1 and err is set

Referenced by gfal_get_endpoint_and_setype_from_bdiiG().

int gfal_select_best_protocol_and_endpointG ( gfal_srmv2_opt opts,
char **  tab_se_type,
char **  tab_endpoint,
char *  buff_endpoint,
size_t  s_buff,
enum gfal_srm_proto *  srm_type,
GError **  err 
)

select the best protocol choice and the best endpoint choice from a list of protocol and endpoints obtained by the bdii

Referenced by gfal_get_endpoint_and_setype_from_bdiiG().

int gfal_srm_determine_endpoint ( gfal_srmv2_opt opts,
const char *  surl,
char *  buff_endpoint,
size_t  s_buff,
enum gfal_srm_proto *  srm_type,
GError **  err 
)

extract endpoint and srm_type from a surl determine the best endpoint associated with the surl and the param of the actual handle (no bdii check or not) see the diagram in doc/diagrams/surls_get_endpoint_activity_diagram.svg for more informations

Returns:
return 0 with endpoint and types set if success else -1 and set Error

References gfal_check_fullendpoint_in_surlG(), gfal_get_endpoint_and_setype_from_bdiiG(), and gfal_get_fullendpointG().

Referenced by gfal_srm_accessG(), gfal_srm_cheksumG(), and gfal_srm_statG().