---
name: "globus_gass_transfer_referral"
section: "3"
platform: "linux"
package: "libglobus-gass-transfer-doc"
version: "9.4-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/globus_gass_transfer_referral"
---

# globus\_gass\_transfer\_referral(3)

Referrals - GASS Referrals.

## NAME

globus\_gass\_transfer\_referral - Referrals

 \- GASS Referrals.

## SYNOPSIS

### Functions

globus\_size\_t **globus\_gass\_transfer\_referral\_get\_count** (globus\_gass\_transfer\_referral\_t \*referral)\
 char \* **globus\_gass\_transfer\_referral\_get\_url** (globus\_gass\_transfer\_referral\_t \*referral, globus\_size\_t index)\
 int **globus\_gass\_transfer\_referral\_destroy** (globus\_gass\_transfer\_referral\_t \*referral)\

## Detailed Description

GASS Referrals.

Referrals

The GASS Transfer API supports referring URL requests to alternate URLs via referrals. Referrals are essentially pointers to another URL or URLs which contain the same file as the original location which a client has requested of a server. Referrals may span multiple protocol schemes, though not all protocols may be able to generate referrals. For example, an HTTP server may refer a client to another HTTP server, an HTTPS server.

Upon receiving a referred response from a server, a client should query the request handle to determine from where the file can be retrieved.

## Function Documentation

### int globus\_gass\_transfer\_referral\_destroy (globus\_gass\_transfer\_referral\_t \* referral)

Free all memory used by a referral.

This function frees all memory used by this referral. After calling this function, the strings returned by calling **globus\_gass\_transfer\_referral\_get\_url()** must not be accessed. Any further attempts to extract informatoin from this referral will fail.

**Parameters**

*referral* The referral to destroy.

**Return values**

*GLOBUS\_SUCCESS* The referral was successfully destroyed. \
 *GLOBUS\_GASS\_TRANSFER\_ERROR\_NULL\_POINTER* The referral parameter was GLOBUS\_NULL. It could not be destroyed.

### globus\_size\_t globus\_gass\_transfer\_referral\_get\_count (globus\_gass\_transfer\_referral\_t \* referral)

Get the number of URLs in this referral.

This function examines the referral to determine if the number of URLs which are contained in it. Each of these URLs should either point to another referral, or to a URL containing the equivalent file as the original URL request which caused this referral.

**Parameters**

*referral* The referral structure to query.

**Returns**

This function returns the number of URL entries in the referral, or 0, if there are none.

### char \* globus\_gass\_transfer\_referral\_get\_url (globus\_gass\_transfer\_referral\_t \* referral, globus\_size\_t index)

Get a URL string from a referral.

This function examines the referral to retrieve a URL string from it. A valid referal will contain one or more strings. They are indexed from 0 to the value returned by **globus\_gass\_transfer\_referral\_get\_count()** - 1.

The string returned by this function must not be freed by the caller. It will remain valid until the referral structure is destroyed.

**Parameters**

*referral* The referral structure to query.\
 *index* The URL to extract from the referral.

**Returns**

This function returns a string pointer containing the URL, or NULL if the index or referral were invalid.

## Author

Generated automatically by Doxygen for globus\_gass\_transfer from the source code.
