---
name: "string_driver_pgm"
section: "3"
platform: "linux"
package: "libglobus-xio-doc"
version: "3.3-1"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/string_driver_pgm"
---

# string\_driver\_pgm(3)

## NAME

Driver Programming: String options -

### Functions

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

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 dynamicly setting driver specific options much easier. a user can then load the driverby 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 otherwords, 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 pasing function takes the value of the \<key\>=

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:

- •

  **globus\_xio\_string\_cntl\_bool**

- •

  **globus\_xio\_string\_cntl\_float**

- •

  **globus\_xio\_string\_cntl\_int**

- •

  **globus\_xio\_string\_cntl\_string**

- •

  **globus\_xio\_string\_cntl\_int\_int**

## Function Documentation

### globus\_result\_t globus\_xio\_string\_cntl\_bouncer (globus\_xio\_driver\_attr\_cntl\_tcntl\_func, void \*attr, intcmd, ...)

New type functions call this one.

### globus\_result\_t globus\_xio\_string\_cntl\_bool (void \*attr, const char \*key, const char \*val, intcmd, globus\_xio\_driver\_attr\_cntl\_tcntl\_func)

String option parsing function.

References globus\_xio\_string\_cntl\_bool(), and globus\_xio\_string\_cntl\_bouncer().

### globus\_result\_t globus\_xio\_string\_cntl\_float (void \*attr, const char \*key, const char \*val, intcmd, globus\_xio\_driver\_attr\_cntl\_tcntl\_func)

String option parsing function.

References globus\_xio\_string\_cntl\_bouncer(), and globus\_xio\_string\_cntl\_float().

### globus\_result\_t globus\_xio\_string\_cntl\_int (void \*attr, const char \*key, const char \*val, intcmd, globus\_xio\_driver\_attr\_cntl\_tcntl\_func)

String option parsing function.

References globus\_xio\_string\_cntl\_bouncer(), and globus\_xio\_string\_cntl\_int().

### globus\_result\_t globus\_xio\_string\_cntl\_string (void \*attr, const char \*key, const char \*val, intcmd, globus\_xio\_driver\_attr\_cntl\_tcntl\_func)

String option parsing function.

References globus\_xio\_string\_cntl\_bouncer(), and globus\_xio\_string\_cntl\_string().

### globus\_result\_t globus\_xio\_string\_cntl\_int\_int (void \*attr, const char \*key, const char \*val, intcmd, globus\_xio\_driver\_attr\_cntl\_tcntl\_func)

String option parsing function.

References globus\_xio\_string\_cntl\_bouncer(), and globus\_xio\_string\_cntl\_int\_int().

## Author

Generated automatically by Doxygen for globus xio from the source code.
