---
name: "globus_gram_client_attr"
section: "3"
platform: "linux"
package: "libglobus-gram-client-doc"
version: "14.6-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/globus_gram_client_attr"
---

# globus\_gram\_client\_attr(3)

GRAM Client Attribute Functions - GRAM Client Attribute Functions.

## NAME

globus\_gram\_client\_attr - GRAM Client Attribute Functions

 \- GRAM Client Attribute Functions.

## SYNOPSIS

### Macros

\#define **GLOBUS\_GRAM\_CLIENT\_NO\_ATTR**\
 Default GRAM client operation attribute.

### Typedefs

typedef void \* **globus\_gram\_client\_attr\_t**\
 GRAM client operation attribute.

### Functions

int **globus\_gram\_client\_attr\_init** (**globus\_gram\_client\_attr\_t** \*attr)\
 Initialize a GRAM client attribute.  int **globus\_gram\_client\_attr\_destroy** (**globus\_gram\_client\_attr\_t** \*attr)\
 Destroy a GRAM client attribute.  int **globus\_gram\_client\_attr\_set\_credential** (**globus\_gram\_client\_attr\_t** attr, gss\_cred\_id\_t credential)\
 Set a GRAM client attribute's security credential.  int **globus\_gram\_client\_attr\_get\_credential** (**globus\_gram\_client\_attr\_t** attr, gss\_cred\_id\_t \*credential)\
 Get a GRAM client attribute's security credential.  int **globus\_gram\_client\_attr\_set\_delegation\_mode** (**globus\_gram\_client\_attr\_t** attr, globus\_io\_secure\_delegation\_mode\_t mode)\
 Set a GRAM client attribute's delegation mode.  int **globus\_gram\_client\_attr\_get\_delegation\_mode** (**globus\_gram\_client\_attr\_t** attr, globus\_io\_secure\_delegation\_mode\_t \*mode)\
 Get a GRAM client attribute's security credential.

## Detailed Description

GRAM Client Attribute Functions.

## Macro Definition Documentation

### #define GLOBUS\_GRAM\_CLIENT\_NO\_ATTR

Default GRAM client operation attribute. The GLOBUS\_GRAM\_CLIENT\_NO\_ATTR macro defines a constant for use when a user of the GRAM client API does not want to specify any non-default GRAM attributes.

## Typedef Documentation

### typedef void\* globus\_gram\_client\_attr\_t

GRAM client operation attribute. The **globus\_gram\_client\_attr\_t** type is an opaque type describing GRAM attributes. It can be accessed or modified by functions in the **GRAM Client Attribute Functions** documentation.

## Function Documentation

### int globus\_gram\_client\_attr\_destroy (globus\_gram\_client\_attr\_t \* attr)

Destroy a GRAM client attribute. The **globus\_gram\_client\_attr\_destroy()** function destroys and frees a GRAM client attribute. After this function returns, the value pointed to by *attr* is no longer valid and must not be used.

**Parameters**

*attr* A pointer to the attribute to destroy. All data associated with the attribute will be freed and it will be an invalid attribute.

**Returns**

Upon success, **globus\_gram\_client\_attr\_destroy()** destroys the attribute pointed to by the *attr* parameter and sets it to an invalid state. If an error occurs, **globus\_gram\_client\_attr\_destroy()** returns an integer error code and value of *attr* is unchanged.

**Return values**

*GLOBUS\_SUCCESS* Success \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_ATTR* Invalid attribute

**See also**

**globus\_gram\_client\_attr\_init()**

### int globus\_gram\_client\_attr\_get\_credential (globus\_gram\_client\_attr\_t attr, gss\_cred\_id\_t \* credential)

Get a GRAM client attribute's security credential. The **globus\_gram\_client\_attr\_get\_credential()** function gets the value of the **credential** in an attribute and modifies the *credential* parameter to point to it. This is a shallow copy.

**Parameters**

*attr* The attribute set to query for its *credential*. \
 *credential* An output parameter that will be initialized to point to the GSSAPI credential which the *attr* is currently using.

**Returns**

Upon success, **globus\_gram\_client\_attr\_get\_credential()** modifies the the value pointed to by the *credential* parameter to be the same credential as that being used by the attribute named by the *attr* parameter and returns *GLOBUS\_SUCCESS*. If an error occurs, **globus\_gram\_client\_attr\_get\_credential()** returns an integer error code and the value pointed to by the *credential* parameter is undefined.

**Return values**

*GLOBUS\_SUCCESS* Success \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_ATTR* Invalid attribute \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_NULL\_PARAMETER* Null parameter

**See also**

**globus\_gram\_client\_attr\_set\_credential()**

### int globus\_gram\_client\_attr\_get\_delegation\_mode (globus\_gram\_client\_attr\_t attr, globus\_io\_secure\_delegation\_mode\_t \* mode)

Get a GRAM client attribute's security credential. The **globus\_gram\_client\_attr\_get\_delegation\_mode()** function gets the value of the **delegation\_mode** in an attribute and modifies the *mode* parameter to point to its value.

**Parameters**

*attr* The attribute set to query for its *delegation\_mode*. \
 *mode* An output parameter that will be set to point to the delegation mode which the *attr* is currently using.

**Returns**

Upon success, **globus\_gram\_client\_attr\_get\_delegation\_mode()** modifies the the value pointed to by the *mode* parameter as described above and returns *GLOBUS\_SUCCESS*. If an error occurs, **globus\_gram\_client\_attr\_get\_delegation\_mode()** returns an integer error code and the value pointed to by the *mode* parameter is undefined.

**Return values**

*GLOBUS\_SUCCESS* Success \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_ATTR* Invalid attribute \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_NULL\_PARAMETER* Null parameter

**See also**

**globus\_gram\_client\_attr\_get\_delegation\_mode()**

### int globus\_gram\_client\_attr\_init (globus\_gram\_client\_attr\_t \* attr)

Initialize a GRAM client attribute. The **globus\_gram\_client\_attr\_init()** function creates a new opaque structure that can be used to specify custom attributes for performing GRAM client operations.

**Parameters**

*attr* An output parameter which will be set to the newly initialized attribute.

**Returns**

Upon success, **globus\_gram\_client\_attr\_init()** modifies the *attr* parameter to point to a new GRAM client attribute and returns *GLOBUS\_SUCCESS*. If an error occurs, **globus\_gram\_client\_attr\_init()** returns an integer error code and value of *attr* is undefined.

**Return values**

*GLOBUS\_SUCCESS* Success \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_ATTR* Invalid attribute \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_MALLOC\_FAILED* Out of memory

**See also**

**globus\_gram\_client\_attr\_destroy()**

### int globus\_gram\_client\_attr\_set\_credential (globus\_gram\_client\_attr\_t attr, gss\_cred\_id\_t credential)

Set a GRAM client attribute's security credential. The **globus\_gram\_client\_attr\_set\_credential()** function sets the value of the **credential** in an attribute to the GSSAPI credential named by the *credential* parameter. This is done as a shallow copy, so the value of *credential* must not be freed until the attribute will no longer be used.

**Parameters**

*attr* The attribute set to modify to use the credential named by the *credential* parameter. \
 *credential* The GSSAPI credential to use with the attribute named by the *attr* parameter. This may be *GSS\_C\_NO\_CREDENTIAL* to set the attribute to use the default security credential.

**Returns**

Upon success, **globus\_gram\_client\_attr\_set\_credential()** modifies the the attribute pointed to by the *attr* parameter to use the credential specified by the *credential* parameter and returns *GLOBUS\_SUCCESS*. If an error occurs, **globus\_gram\_client\_attr\_set\_credential()** returns an integer error code and the attribute named by *attr* is unchanged.

**Return values**

*GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_ATTR* An invalid attribute set was passed to this function.

**See also**

**globus\_gram\_client\_attr\_get\_credential()**

### int globus\_gram\_client\_attr\_set\_delegation\_mode (globus\_gram\_client\_attr\_t attr, globus\_io\_secure\_delegation\_mode\_t mode)

Set a GRAM client attribute's delegation mode. The **globus\_gram\_client\_attr\_set\_delegation\_mode()** function sets the value of the **delegation\_mode** in an attribute to the delegation mode in the *mode* parameter.

The GRAM client supports the following delegation modes:

- •

  **GLOBUS\_IO\_SECURE\_DELEGATION\_MODE\_LIMITED\_PROXY**

- •

  **GLOBUS\_IO\_SECURE\_DELEGATION\_MODE\_FULL\_PROXY**

**Parameters**

*attr* The attribute set to modify to use the delegation mode in the *mode* parameter. \
 *mode* The new value of the delegation mode.

**Returns**

Upon success, **globus\_gram\_client\_attr\_set\_delegation\_mode()** modifies the the attribute named by the *attr* parameter to use the delegation mode in the *mode* parameter and returns GLOBUS\_SUCCESS. If an error occurs, **globus\_gram\_client\_attr\_set\_delegation\_mode()** returns an integer error code and the *delegation\_mode* attribute value is unchanged.

**Return values**

*GLOBUS\_SUCCESS* Success \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_ATTR* Invalid attribute

**See also**

**globus\_gram\_client\_attr\_get\_delegation\_mode()**

## Author

Generated automatically by Doxygen for globus\_gram\_client from the source code.
