Grid Community Toolkit  6.2.1705709074 (tag: v6.2.20240202)
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
Driver Programming: String options

Driver Programming: String options. More...

Functions

globus_result_t globus_xio_driver_string_cntl_set_table (globus_xio_driver_t driver, globus_xio_string_cntl_table_t *table)
 
globus_result_t globus_xio_driver_handle_string_cntl_set_table (globus_xio_driver_t driver, globus_xio_string_cntl_table_t *table)
 
globus_result_t globus_xio_string_cntl_bouncer (globus_xio_driver_attr_cntl_t cntl_func, void *attr, int cmd,...)
 
globus_result_t globus_xio_string_cntl_bool (void *attr, const char *key, const char *val, int cmd, globus_xio_driver_attr_cntl_t cntl_func)
 
globus_result_t globus_xio_string_cntl_float (void *attr, const char *key, const char *val, int cmd, globus_xio_driver_attr_cntl_t cntl_func)
 
globus_result_t globus_xio_string_cntl_int (void *attr, const char *key, const char *val, int cmd, globus_xio_driver_attr_cntl_t cntl_func)
 
globus_result_t globus_xio_string_cntl_string (void *attr, const char *key, const char *val, int cmd, globus_xio_driver_attr_cntl_t cntl_func)
 
globus_result_t globus_xio_string_cntl_int_int (void *attr, const char *key, const char *val, int cmd, globus_xio_driver_attr_cntl_t cntl_func)
 

Detailed Description

Driver Programming: String options.

The set of interface functions that the driver author must implement to create a driver and the functions to assist in the creation.

Driver attribute functions

If the driver wishes to provide driver specific attributes to the user it must implement the following functions:

globus_xio_driver_attr_init_t globus_xio_driver_attr_copy_t globus_xio_driver_attr_cntl_t globus_xio_driver_attr_destroy_t

A driver can choose to expose parameters as in a string form. Providing this feature makes dynamically setting driver specific options much easier. a user can then load the driver by name and set specific options by name all at runtime with no object module references. For example, a TCP driver can be loaded with the string: tcp, and the options can be set with:

port=50668;keepalive=yes;nodelay=N

this would set the port to 50668, keepalive to true and nodelay to false. The particular string definition is defined by the tcp driver by properly creating a globus_i_xio_attr_parse_table_t array. Each element of the array is 1 options. There are 3 members of each array entry: key, cmd, and parse function. The key is a string that defines what option is to be set. In the above example string "port" would be 1 key. cmd tells the driver what cntl is associated with the key. In other words, once the string is parsed out what driver specific control must be called to set the requested option. For more information on controls see globus_xio_attr_cntl. The final value in the array entry is the parsing function. The parsing function takes the value of the key=value portion of the string and parses it into data types. once parsed globus_xio_attr_cntl is called and thus the option is set. There are many available parsing functions but the developer is free to right their own if the provided ones are not sufficient. Sample parsing functions follow:

Function Documentation

globus_result_t globus_xio_driver_handle_string_cntl_set_table ( globus_xio_driver_t  driver,
globus_xio_string_cntl_table_t *  table 
)

Set the string table for handle cntl

globus_result_t globus_xio_driver_string_cntl_set_table ( globus_xio_driver_t  driver,
globus_xio_string_cntl_table_t *  table 
)

Set the string table for attr cntl

globus_result_t globus_xio_string_cntl_bool ( void *  attr,
const char *  key,
const char *  val,
int  cmd,
globus_xio_driver_attr_cntl_t  cntl_func 
)

String option parsing function.

globus_result_t globus_xio_string_cntl_bouncer ( globus_xio_driver_attr_cntl_t  cntl_func,
void *  attr,
int  cmd,
  ... 
)

New type functions call this one

globus_result_t globus_xio_string_cntl_float ( void *  attr,
const char *  key,
const char *  val,
int  cmd,
globus_xio_driver_attr_cntl_t  cntl_func 
)

String option parsing function.

globus_result_t globus_xio_string_cntl_int ( void *  attr,
const char *  key,
const char *  val,
int  cmd,
globus_xio_driver_attr_cntl_t  cntl_func 
)

String option parsing function.

globus_result_t globus_xio_string_cntl_int_int ( void *  attr,
const char *  key,
const char *  val,
int  cmd,
globus_xio_driver_attr_cntl_t  cntl_func 
)

String option parsing function.

globus_result_t globus_xio_string_cntl_string ( void *  attr,
const char *  key,
const char *  val,
int  cmd,
globus_xio_driver_attr_cntl_t  cntl_func 
)

String option parsing function.