---
name: "globus_gss_assist_token_send_fd"
section: "3"
platform: "linux"
package: "libglobus-gss-assist-doc"
version: "12.7-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/globus_gss_assist_tokens"
---

# globus\_gss\_assist\_token\_send\_fd(3)

Token Transport - Send and Receive Security Tokens.

Part of [globus\_gss\_assist\_tokens(3)](/globus_gss_assist_tokens/3.md).

## NAME

globus\_gss\_assist\_tokens - Token Transport

 \- Send and Receive Security Tokens.

## SYNOPSIS

### Functions

int **globus\_gss\_assist\_token\_get\_fd** (void \*arg, void \*\*bufp, size\_t \*sizep)\
 Get token from a FILE \*.  int **globus\_gss\_assist\_token\_send\_fd** (void \*arg, void \*buf, size\_t size)\
 Send token via a FILE \*.  int **globus\_gss\_assist\_token\_send\_fd\_without\_length** (void \*arg, void \*buf, size\_t size)\
 Send token to a FILE \*.  int **globus\_gss\_assist\_token\_send\_fd\_ex** (void \*exp, void \*buf, size\_t size)\
 Send a token to a FILE \*.

## Detailed Description

Send and Receive Security Tokens.

The functions in this section are used to send and receive GSSAPI tokens using various methods. These are used by the **Security Context Management** functions.

## Function Documentation

### int globus\_gss\_assist\_token\_get\_fd (void \* arg, void \*\* bufp, size\_t \* sizep)

Get token from a FILE \*. Use a open FILE handle to get a token. This function provides parameter types that allow it to be passed to **globus\_gss\_assist\_init\_sec\_context** and **globus\_gss\_assist\_accept\_sec\_context**

**Parameters**

*arg* the FILE \* stream cast to a void pointer \
 *bufp* the resulting token \
 *sizep* the size (number of bytes) read into bufp

**Returns**

0 on success \> 0 is internal return \< 0 is the -errno

### int globus\_gss\_assist\_token\_send\_fd (void \* arg, void \* buf, size\_t size)

Send token via a FILE \*. Write a token to the open FILE handle. Will write it with a 4 byte length. This function provides parameter types that allow it to be passed to **globus\_gss\_assist\_init\_sec\_context** and **globus\_gss\_assist\_accept\_sec\_context**

**Parameters**

*arg* the FILE \* stream to send the token on \
 *buf* the token \
 *size* the size of the token in bytes

**Returns**

0 on success \>0 on error \<0 on errno error

### int globus\_gss\_assist\_token\_send\_fd\_ex (void \* exp, void \* buf, size\_t size)

Send a token to a FILE \*. Write a token to the open FILE \*. This function will look at the flag to determine if the length field needs to be written.

**Parameters**

*exp* the globus\_gss\_assist\_ex variable that holds the FILE \* stream and flags to bet set \
 *buf* the token buffer to send \
 *size* size of the token buffer

**Returns**

0 on success \>0 on error \<0 on errno error (-errno)

### int globus\_gss\_assist\_token\_send\_fd\_without\_length (void \* arg, void \* buf, size\_t size)

Send token to a FILE \*. Write a token to the open FILE. This function will write it without a length, so that the FILE stream only contains GSSAPI tokens.

## Author

Generated automatically by Doxygen for globus\_gss\_assist from the source code.
