---
name: "globus_net_manager_context"
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_context"
---

# globus\_net\_manager\_context(3)

Context - Net Manager Context Management Functions.

## NAME

globus\_net\_manager\_context - Context

 \- Net Manager Context Management Functions.

## SYNOPSIS

### Typedefs

typedef struct globus\_i\_net\_manager\_context\_s \* **globus\_net\_manager\_context\_t**\
 Net Manager Context.

### Functions

void **globus\_net\_manager\_context\_destroy** (**globus\_net\_manager\_context\_t** context)\
 Destroy Context.  globus\_result\_t **globus\_net\_manager\_context\_end\_listen** (**globus\_net\_manager\_context\_t** context, const char \*task\_id, const char \*transport, const char \*local\_contact, const **globus\_net\_manager\_attr\_t** \*attr\_array)\
 Call Context End Listen.  globus\_result\_t **globus\_net\_manager\_context\_init** (**globus\_net\_manager\_context\_t** \*context, const **globus\_net\_manager\_attr\_t** \*attrs)\
 Initialize Context.  globus\_result\_t **globus\_net\_manager\_context\_post\_accept** (**globus\_net\_manager\_context\_t** context, const char \*task\_id, const char \*transport, const char \*local\_contact, const char \*remote\_contact, const **globus\_net\_manager\_attr\_t** \*attr\_array, **globus\_net\_manager\_attr\_t** \*\*attr\_array\_out)\
 Call Context Post Accept.  globus\_result\_t **globus\_net\_manager\_context\_post\_close** (**globus\_net\_manager\_context\_t** context, const char \*task\_id, const char \*transport, const char \*local\_contact, const char \*remote\_contact, const **globus\_net\_manager\_attr\_t** \*attr\_array)\
 Call Context Post Close.  globus\_result\_t **globus\_net\_manager\_context\_post\_connect** (**globus\_net\_manager\_context\_t** context, const char \*task\_id, const char \*transport, const char \*local\_contact, const char \*remote\_contact, const **globus\_net\_manager\_attr\_t** \*attr\_array, **globus\_net\_manager\_attr\_t** \*\*attr\_array\_out)\
 Call Context Post Connect.  globus\_result\_t **globus\_net\_manager\_context\_post\_listen** (**globus\_net\_manager\_context\_t** context, const char \*task\_id, const char \*transport, const char \*local\_contact, const **globus\_net\_manager\_attr\_t** \*attr\_array, char \*\*local\_contact\_out, **globus\_net\_manager\_attr\_t** \*\*attr\_array\_out)\
 Call Context Post Listen.  globus\_result\_t **globus\_net\_manager\_context\_pre\_accept** (**globus\_net\_manager\_context\_t** context, const char \*task\_id, const char \*transport, const char \*local\_contact, const **globus\_net\_manager\_attr\_t** \*attr\_array, **globus\_net\_manager\_attr\_t** \*\*attr\_array\_out)\
 Call Context Pre Accept.  globus\_result\_t **globus\_net\_manager\_context\_pre\_close** (**globus\_net\_manager\_context\_t** context, const char \*task\_id, const char \*transport, const char \*local\_contact, const char \*remote\_contact, const **globus\_net\_manager\_attr\_t** \*attr\_array)\
 Call Context Pre Close.  globus\_result\_t **globus\_net\_manager\_context\_pre\_connect** (**globus\_net\_manager\_context\_t** context, const char \*task\_id, const char \*transport, const char \*remote\_contact, const **globus\_net\_manager\_attr\_t** \*attr\_array, char \*\*remote\_contact\_out, **globus\_net\_manager\_attr\_t** \*\*attr\_array\_out)\
 Call Context Pre Connect.  globus\_result\_t **globus\_net\_manager\_context\_pre\_listen** (**globus\_net\_manager\_context\_t** context, const char \*task\_id, const char \*transport, const **globus\_net\_manager\_attr\_t** \*attr\_array, **globus\_net\_manager\_attr\_t** \*\*attr\_array\_out)\
 Call Context Pre Listen.

## Detailed Description

Net Manager Context Management Functions.

The Net Manager Context manages a collection of network manager plug-ins which will be called when network events occur.

Initialize the context by calling **globus\_net\_manager\_context\_init()**. This processes an array of attributes. The 'scope' member of of attributes indicate the name of a network manager to associate with the context. The (name, value) tuples of the attributes are added to the attributes passed to all of that particular network manager's implementation functions.

Once the network manager context is created, pass it to the per-operation invocation functions to trigger all of the manager callouts associated with the context.

When the network manager context is no longer needed, destroy it by calling **globus\_net\_manager\_context\_destroy()**.

## Typedef Documentation

### typedef struct globus\_i\_net\_manager\_context\_s\* globus\_net\_manager\_context\_t

Net Manager Context. A structure of this type is used to thread attributes through the set of configured net manager modules and invoke their functions in configuration order.

## Function Documentation

### void globus\_net\_manager\_context\_destroy (globus\_net\_manager\_context\_t context)

Destroy Context. This functions destroys *context*.

**Parameters**

*context* Pointer to the context to destroy.

### globus\_result\_t globus\_net\_manager\_context\_end\_listen (globus\_net\_manager\_context\_t context, const char \* task\_id, const char \* transport, const char \* local\_contact, const globus\_net\_manager\_attr\_t \* attr\_array)

Call Context End Listen. Call the chain of end\_listen() functions in a context with the given task\_id, transport, and attributes. If any manager in the context returns an error, the subsequent managers will not be called.

**Parameters**

*context* The context to call functions in. \
 *task\_id* The task\_id associated with this network operation. \
 *transport* The transport driver associated with this network operation. \
 *local\_contact* The string representation of the local address of the socket. \
 *attr\_array* The set of attributes to pass to the managers.

**Returns**

On success, this function returns GLOBUS\_SUCCESS. If any manager returns an error, the end\_listen calls stop and the error is returned to the caller.

### globus\_result\_t globus\_net\_manager\_context\_init (globus\_net\_manager\_context\_t \* context, const globus\_net\_manager\_attr\_t \* attrs)

Initialize Context. This functions initializes *context* with the attribute list *attrs*.

**Parameters**

*context* A pointer to the context to initialize. \
 *attrs* An array of attributes to initialize the context with.

**Returns**

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

### globus\_result\_t globus\_net\_manager\_context\_post\_accept (globus\_net\_manager\_context\_t context, const char \* task\_id, const char \* transport, const char \* local\_contact, const char \* remote\_contact, const globus\_net\_manager\_attr\_t \* attr\_array, globus\_net\_manager\_attr\_t \*\* attr\_array\_out)

Call Context Post Accept. Call the chain of post\_accept() functions in a context with the given task\_id, transport, contact information, and attributes. If any manager in the context returns an error, the subsequent managers will not be called. The attributes are chained through all the calls, with any changed values returned from a manager passed to subsequent managers in the chain.

**Parameters**

*context* The context to call functions in. \
 *task\_id* The task\_id associated with this network operation. \
 *transport* The transport driver associated with this network operation. \
 *local\_contact* The string representation of the local address of the socket. \
 *remote\_contact* The string representation of the remote address of the socket. \
 *attr\_array* The set of attributes to pass to the managers. \
 *attr\_array\_out* The resulting set of attributes from the managers. This will be set to NULL if no manager modifies the attributes.

**Returns**

On success, this function returns GLOBUS\_SUCCESS. If any manager returns an error, the post\_accept calls stop and the error is returned to the caller.

### globus\_result\_t globus\_net\_manager\_context\_post\_close (globus\_net\_manager\_context\_t context, const char \* task\_id, const char \* transport, const char \* local\_contact, const char \* remote\_contact, const globus\_net\_manager\_attr\_t \* attr\_array)

Call Context Post Close. Call the chain of post\_close() functions in a context with the given task\_id, transport, contact information, and attributes. If any manager in the context returns an error, the subsequent managers will not be called.

**Parameters**

*context* The context to call functions in. \
 *task\_id* The task\_id associated with this network operation. \
 *transport* The transport driver associated with this network operation. \
 *local\_contact* The string representation of the local address of the socket. \
 *remote\_contact* The string representation of the remote address of the socket \
 *attr\_array* The set of attributes to pass to the managers.

**Returns**

On success, this function returns GLOBUS\_SUCCESS. If any manager returns an error, the post\_close calls stop and the error is returned to the caller.

### globus\_result\_t globus\_net\_manager\_context\_post\_connect (globus\_net\_manager\_context\_t context, const char \* task\_id, const char \* transport, const char \* local\_contact, const char \* remote\_contact, const globus\_net\_manager\_attr\_t \* attr\_array, globus\_net\_manager\_attr\_t \*\* attr\_array\_out)

Call Context Post Connect. Call the chain of post\_connect() functions in a context with the given task\_id, transport, contact information, and attributes. If any manager in the context returns an error, the subsequent managers will not be called.

**Parameters**

*context* The context to call functions in. \
 *task\_id* The task\_id associated with this network operation. \
 *transport* The transport driver associated with this network operation. \
 *local\_contact* The string representation of the local address of the socket. \
 *remote\_contact* The string representation of the remote address of the socket. \
 *attr\_array* The set of attributes to pass to the managers. \
 *attr\_array\_out* The resulting set of attributes from the managers. This will be set to NULL if no manager modifies the attributes.

**Returns**

On success, this function returns GLOBUS\_SUCCESS. If any manager returns an error, the post\_connect calls stop and the error is returned to the caller.

### globus\_result\_t globus\_net\_manager\_context\_post\_listen (globus\_net\_manager\_context\_t context, const char \* task\_id, const char \* transport, const char \* local\_contact, const globus\_net\_manager\_attr\_t \* attr\_array, char \*\* local\_contact\_out, globus\_net\_manager\_attr\_t \*\* attr\_array\_out)

Call Context Post Listen. Call the chain of post\_listen() functions in a context with the given task\_id, transport, contact information, and attributes. If any manager in the context returns an error, the subsequent managers will not be called.

**Parameters**

*context* The context to call functions in. \
 *task\_id* The task\_id associated with this network operation. \
 *transport* The transport driver associated with this network operation. \
 *local\_contact* The string representation of the local address of the socket. \
 *attr\_array* The set of attributes to pass to the managers. \
 *local\_contact\_out* The resulting local contact from the managers. This will be set to NULL if no manager modifies the local contact. \
 *attr\_array\_out* The resulting set of attributes from the managers. This will be set to NULL if no manager modifies the attributes.

**Returns**

On success, this function returns GLOBUS\_SUCCESS. If any manager returns an error, the post\_listen() calls stop and the error is returned to the caller.

### globus\_result\_t globus\_net\_manager\_context\_pre\_accept (globus\_net\_manager\_context\_t context, const char \* task\_id, const char \* transport, const char \* local\_contact, const globus\_net\_manager\_attr\_t \* attr\_array, globus\_net\_manager\_attr\_t \*\* attr\_array\_out)

Call Context Pre Accept. Call the chain of pre\_accept() functions in a context with the given task\_id, transport, contact information, and attributes. If any manager in the context returns an error, the subsequent managers will not be called.

**Parameters**

*context* The context to call functions in. \
 *task\_id* The task\_id associated with this network operation. \
 *transport* The transport driver associated with this network operation. \
 *local\_contact* The string representation of the local address of socket. \
 *attr\_array* The set of attributes to pass to the managers. \
 *attr\_array\_out* The resulting set of attributes from the managers. This will be set to NULL if no manager modifies the attributes.

**Returns**

On success, this function returns GLOBUS\_SUCCESS. If any manager returns an error, the pre\_accept() calls stop and the error is returned to the caller.

### globus\_result\_t globus\_net\_manager\_context\_pre\_close (globus\_net\_manager\_context\_t context, const char \* task\_id, const char \* transport, const char \* local\_contact, const char \* remote\_contact, const globus\_net\_manager\_attr\_t \* attr\_array)

Call Context Pre Close. Call the chain of pre\_close() functions in a context with the given task\_id, transport, contact information, and attributes. If any manager in the context returns an error, the subsequent managers will not be called.

**Parameters**

*context* The context to call functions in. \
 *task\_id* The task\_id associated with this network operation. \
 *transport* The transport driver associated with this network operation. \
 *local\_contact* The string representation of the local address of socket. \
 *remote\_contact* The string representation of the remote address of socket. \
 *attr\_array* The set of attributes to pass to the managers.

**Returns**

On success, this function returns GLOBUS\_SUCCESS. If any manager returns an error, the pre\_close() calls stop and the error is returned to the caller.

### globus\_result\_t globus\_net\_manager\_context\_pre\_connect (globus\_net\_manager\_context\_t context, const char \* task\_id, const char \* transport, const char \* remote\_contact, const globus\_net\_manager\_attr\_t \* attr\_array, char \*\* remote\_contact\_out, globus\_net\_manager\_attr\_t \*\* attr\_array\_out)

Call Context Pre Connect. Call the chain of pre\_connect() functions in a context with the given task\_id, transport, contact information, and attributes. If any manager in the context returns an error, the subsequent managers will not be called.

**Parameters**

*context* The context to call functions in. \
 *task\_id* The task\_id associated with this network operation. \
 *transport* The transport driver associated with this network operation. \
 *remote\_contact* The string representation of the remote address of socket. \
 *attr\_array* The set of attributes to pass to the managers. \
 *remote\_contact\_out* The resulting string representation of the remote address. This will be set to NULL if no manager modifies the address. \
 *attr\_array\_out* The resulting set of attributes from the managers. This will be set to NULL if no manager modifies the attributes.

**Returns**

On success, this function returns GLOBUS\_SUCCESS. If any manager returns an error, the pre\_connect() calls stop and the error is returned to the caller.

### globus\_result\_t globus\_net\_manager\_context\_pre\_listen (globus\_net\_manager\_context\_t context, const char \* task\_id, const char \* transport, const globus\_net\_manager\_attr\_t \* attr\_array, globus\_net\_manager\_attr\_t \*\* attr\_array\_out)

Call Context Pre Listen. Call the chain of pre\_listen() functions in a context with the given task\_id, transport, contact information, and attributes. If any manager in the context returns an error, the subsequent managers will not be called.

**Parameters**

*context* The context to call functions in. \
 *task\_id* The task\_id associated with this network operation. \
 *transport* The transport driver associated with this network operation. \
 *attr\_array* The set of attributes to pass to the managers. \
 *attr\_array\_out* The resulting set of attributes from the managers. This will be set to NULL if no manager modifies the attributes.

**Returns**

On success, this function returns GLOBUS\_SUCCESS. If any manager returns an error, the pre\_listen() calls stop and the error is returned to the caller.

## Author

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