Miscellaneous

Data Structures

Defines

Enumerations

Functions


Detailed Description

Miscellaneous functions and types.


Define Documentation

#define RLS_LRCSERVER   0x1

Server is LRC server.

#define RLS_RLISERVER   0x2

Server is RLI server.

#define RLS_RCVLFNLIST   0x4

RLI accepts LFN list updates.

#define RLS_RCVBLOOMFILTER   0x8

RLI accepts Bloom filter updates.

#define RLS_SNDLFNLIST   0x10

LRC sends LFN list updates.

#define RLS_SNDBLOOMFILTER   0x20

LRC sends Bloom filter updates.

#define RLS_INITIALIZED   0x40

RLC is fully initialized.


Enumeration Type Documentation

Wildcard character style.

Enumerator:
rls_pattern_unix 

Unix file globbing chars (*, ?)

rls_pattern_sql 

SQL "like" wildcards (%, _)

Attribute Value Types.

Enumerator:
globus_rls_attr_type_date 

Date (time_t).

globus_rls_attr_type_flt 

Floating point (double).

globus_rls_attr_type_int 

Integer (int).

globus_rls_attr_type_str 

String (char *).

Object types in LRC and RLI databases.

Enumerator:
globus_rls_obj_lrc_lfn 

LRC Logical File Name.

globus_rls_obj_lrc_pfn 

LRC Physical File Name.

globus_rls_obj_rli_lfn 

RLI Logical File Name.

globus_rls_obj_rli_lrc 

RLI LRC URL.

Attribute Value Query Operators.

Enumerator:
globus_rls_attr_op_all 

All values returned.

globus_rls_attr_op_eq 

Values matching operand 1 returned.

globus_rls_attr_op_ne 

Values not matching operand 1.

globus_rls_attr_op_gt 

Values greater than operand 1.

globus_rls_attr_op_ge 

Values greater than or equal to op1.

globus_rls_attr_op_lt 

Values less than operand 1.

globus_rls_attr_op_le 

Values less than or equal to op1.

globus_rls_attr_op_btw 

Values between operand1 and 2.

globus_rls_attr_op_like 

Strings "like" operand1 (SQL like)

globus_rls_client_admin() commands.

Enumerator:
globus_rls_admin_cmd_ping 

Verify RLS server responding.

globus_rls_admin_cmd_quit 

Tell RLS server to exit.

globus_rls_admin_cmd_ssu 

Tell LRC server to do softstate update.


Function Documentation

globus_result_t globus_rls_client_admin ( globus_rls_handle_t h,
globus_rls_admin_cmd_t  cmd 
)

Miscellaneous administrative operations.

Most operations require the admin privilege.

Parameters:
hHandle connected to RLS server.
cmdCommand to be sent to RLS server.
Return values:
GLOBUS_SUCCESSCommand succeeded.
globus_result_t globus_rls_client_get_configuration ( globus_rls_handle_t h,
char *  option,
globus_list_t **  conf_list 
)

Get server configuration.

Client needs admin privilege.

Parameters:
hHandle connected to RLS server.
optionConfiguration option to get. If NULL all options are retrieved.
Return values:
conf_listList of configuration options.
GLOBUS_SUCCESSList of retrieved config options returned in conf_list, each datum is of type globus_rls_string2_t. conf_list should be freed with globus_rls_client_free_list(). There may be multiple "acl" entries in the list, since the access control list can include more than one entry. Each acl configuration value is consists of a regular expression (matched against grid-mapfile users or DNs), a colon, and space separated list of permissions the matching users are granted.
globus_result_t globus_rls_client_set_configuration ( globus_rls_handle_t h,
char *  option,
char *  value 
)

Set server configuration option.

Client needs admin privilege.

Parameters:
hHandle connected to RLS server.
optionConfiguration option to set.
valueNew value for option.
Return values:
GLOBUS_SUCCESSOption set on server.
globus_result_t globus_rls_client_stats ( globus_rls_handle_t h,
globus_rls_stats_t rlsstats 
)

Retrieve various statistics from RLS server.

Requires stats privilege.

Parameters:
hHandle connected to RLS server.
rlsstatsStats returned here.
Return values:
GLOBUS_SUCCESSStats returned in rlsstats.
char* globus_rls_client_attr2s ( globus_rls_attribute_t attr,
char *  buf,
int  buflen 
)

Map attribute value to string.

Parameters:
attrAttribute to convert. If attr->type is globus_rls_attr_type_date then the resulting string will be in the format MySQL uses by default, which is YYYYMMDDHHMMSS.
bufBuffer to write string value to. Note if attr->type is globus_rls_attr_type_str then attr->val.s is returned, and buf is unused.
buflenSize of buf in bytes.
Return values:
String ValueAttribute value converted to a string.
globus_result_t globus_rls_client_s2attr ( globus_rls_attr_type_t  type,
char *  sval,
globus_rls_attribute_t attr 
)

Set globus_rls_attribute_t type and val fields from a type and string value.

Parameters:
typeAttribute value type.
svalString value to convert to binary. If type is globus_rls_attr_type_date sval should be in the form YYYY-MM-DD HH:MM:SS.
attrAttribute whose type and val fields are to be set.
Return values:
GLOBUS_SUCCESSattr->type and attr->val successfully set.
globus_result_t globus_rls_client_error_info ( globus_result_t  r,
int *  rc,
char *  buf,
int  buflen,
globus_bool_t  preserve 
)

Get error code and message from globus_result_t returned by this API.

Parameters:
rResult returned by RLS API function. r is freed by this call and should not be referenced again. If preserve is set then a new globus_result_t is constructed with the same values and returned as the function value.
rcAddress to store error code at. If NULL error code is not returned.
bufAddress to store error message at. If NULL error message is not returned.
preserveIf GLOBUS_TRUE then a new globus_result_t is contructed with the same values as the old and returned as the function value.
buflenSize of buf.
Return values:
globus_result_tIf preserve is set a new globus_result_t identical to r is returned, otherwise GLOBUS_SUCCESS.
int globus_list_len ( globus_list_t *  len)

Compute length of list.

globus_list_size() is implemented using recursion, besides being inefficient it can run out of stack space when the list is large.

char* globus_rls_errmsg ( int  rc,
char *  specificmsg,
char *  buf,
int  buflen 
)

Map RLS status code to error string.

Parameters:
rcStatus code.
specificmsgIf not NULL prepended (with a colon) to error string.
bufBuffer to write error message to.
buflenLength of buf. Message will be truncated to fit if too long.
Return values:
char* Returns buf, error message written to buf.