---
name: "globus_net_manager_attr_t"
section: "3"
platform: "linux"
package: "libglobus-net-manager-doc"
version: "1.7-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/globus_net_manager_attr"
---

# globus\_net\_manager\_attr\_t(3)

Attributes - Net Manager Attribute Management Functions.

Part of [globus\_net\_manager\_attr(3)](/globus_net_manager_attr/3.md).

## NAME

globus\_net\_manager\_attr - Attributes

 \- Net Manager Attribute Management Functions.

## SYNOPSIS

### Data Structures

struct **globus\_net\_manager\_attr\_s**\
 Net Manager Attributes.

### Macros

\#define **GLOBUS\_NET\_MANAGER\_NULL\_ATTR**\
 End of attribute array static initializer.

### Typedefs

typedef struct **globus\_net\_manager\_attr\_s** **globus\_net\_manager\_attr\_t**\
 Net Manager Attributes.

### Functions

globus\_result\_t **globus\_net\_manager\_attr\_array\_copy** (**globus\_net\_manager\_attr\_t** \*\*dest\_array, const **globus\_net\_manager\_attr\_t** \*src\_array)\
 Copy an array of Network Manager attributes.  void **globus\_net\_manager\_attr\_array\_delete** (**globus\_net\_manager\_attr\_t** \*attrs)\
 Destroy an array of Network Manager attributes.  globus\_result\_t **globus\_net\_manager\_attr\_array\_from\_string** (**globus\_net\_manager\_attr\_t** \*\*attr, const char \*scope, const char \*attr\_string)\
 Parse an array of Network Manager attributes from a string.  void **globus\_net\_manager\_attr\_destroy** (**globus\_net\_manager\_attr\_t** \*attr)\
 Destroy the contents of an attribute.  globus\_result\_t **globus\_net\_manager\_attr\_init** (**globus\_net\_manager\_attr\_t** \*attr, const char \*scope, const char \*name, const char \*value)\
 Initialize the contents of an attribute.

### Variables

const **globus\_net\_manager\_attr\_t** **globus\_net\_manager\_null\_attr** = **GLOBUS\_NET\_MANAGER\_NULL\_ATTR**\
 End of array value.

## Detailed Description

Net Manager Attribute Management Functions.

## Typedef Documentation

### typedef struct globus\_net\_manager\_attr\_s globus\_net\_manager\_attr\_t

Net Manager Attributes. The globus\_net\_manager\_attr\_t structure defines a scoped (attribute, value) tuple. The scope in most cases is either the name of the transport driver or the 'globus\_net\_manager' scope, for attributes specific to the network manager implementation.

## Function Documentation

### globus\_result\_t globus\_net\_manager\_attr\_array\_copy (globus\_net\_manager\_attr\_t \*\* dest\_array, const globus\_net\_manager\_attr\_t \* src\_array)

Copy an array of Network Manager attributes. This function performs a deep copy of array of net\_manager attributes. The new array will be stored in the pointer passed to by the dest\_array parameter. It will contain all entries in the array passed as the src\_array, ending with the value **GLOBUS\_NET\_MANAGER\_NULL\_ATTR**.

The caller must free the array stored in \*dest\_array by calling globus\_net\_manager\_attr\_array\_destroy().

**Parameters**

*dest\_array* A pointer to an array of attributes to be allocated and initialized. \
 *src\_array* An array of attributes to copy.

**Returns**

On error, the dest\_array is set to NULL and this function returns an error object. Otherwise, this function returns GLOBUS\_SUCCESS.

### void globus\_net\_manager\_attr\_array\_delete (globus\_net\_manager\_attr\_t \* attrs)

Destroy an array of Network Manager attributes. This function deletes an array of Network Manager attributes and all values contained within them. The array must be terminated by the value **GLOBUS\_NET\_MANAGER\_NULL\_ATTR**.

**Parameters**

*attrs* A pointer to an array of attributes to be freed.

### globus\_result\_t globus\_net\_manager\_attr\_array\_from\_string (globus\_net\_manager\_attr\_t \*\* attr, const char \* scope, const char \* attr\_string)

Parse an array of Network Manager attributes from a string. This function parses a string containing a list of attributes and creates a new array of Network Manager attribute values from it. The array is terminated by globus\_net\_manager\_null\_attr.

Attribute strings are formed by the regular expression

```
    NAME=VALUE(;NAME=VALUE)*
```

 The NAME and VALUE strings may contain any character except `;` `=`, and the carriage return and newline characters.

The caller must free the array stored in \*attr by calling globus\_net\_manager\_attr\_array\_destroy().

**Parameters**

*attr* A pointer to an array of attributes to be allocated and initialized. \
 *scope* The string to be added as the scope value of the attributes. \
 *attr\_string* The string to be parsed.

**Returns**

On success, this function returns GLOBUS\_SUCCESS. Otherwise, an error result is returned to the caller.

### void globus\_net\_manager\_attr\_destroy (globus\_net\_manager\_attr\_t \* attr)

Destroy the contents of an attribute. This function frees the values contained in **attr** and reinitializes them to NULL. It *does not* free attr itself.

**Parameters**

*attr* Pointer to the attribute to destroy.

### globus\_result\_t globus\_net\_manager\_attr\_init (globus\_net\_manager\_attr\_t \* attr, const char \* scope, const char \* name, const char \* value)

Initialize the contents of an attribute. This function initializes **attr** and with copies of the values passed as the **scope**, **name**, and **value** parameters.

**Parameters**

*attr* Pointer to the attribute to initialize. \
 *scope* Attribute scope \
 *name* Attribute name \
 *value* Attribute value

**Returns**

On error, 'attr' is set to NULL and this function returns an error object. Otherwise this function returns 'GLOBUS\_SUCCESS'

## Variable Documentation

### const globus\_net\_manager\_attr\_t globus\_net\_manager\_null\_attr = GLOBUS\_NET\_MANAGER\_NULL\_ATTR

End of array value. This value may be assigned to an element in an array of Network Manager attributes to terminate the array.

## Author

Generated automatically by Doxygen for globus\_net\_manager from the source code.
