---
name: "globus_ftp_control_callback_t"
section: "3"
platform: "linux"
package: "libglobus-ftp-control-doc"
version: "9.10-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/globus_ftp_control.h"
---

# globus\_ftp\_control\_callback\_t(3)

GridFTP Control Connection API.

Part of [globus\_ftp\_control.h(3)](/globus_ftp_control.h/3.md).

## NAME

globus\_ftp\_control.h - GridFTP Control Connection API.

## SYNOPSIS

`#include 'globus_common.h'`\
 `#include 'globus_error_string.h'`\
 `#include 'globus_io.h'`\
 `#include 'globus_gss_assist.h'`\
 `#include 'globus_handle_table.h'`\

### Data Structures

struct **globus\_ftp\_control\_dcau\_subject\_s**\
 Control DCAU subject authentication type.  struct **globus\_ftp\_control\_round\_robin\_s**\
 Control striping round robin attribute structure.  union **globus\_ftp\_control\_dcau\_u**\
 Control DCAU union.  union **globus\_ftp\_control\_layout\_u**\
 Control striping attribute union.  union **globus\_ftp\_control\_parallelism\_u**\
 Control parallelism attribute structure \
\
  " struct **globus\_ftp\_control\_tcpbuffer\_default\_t**\
 Don't change the TCP buffer/window size from the system default.  struct **globus\_ftp\_control\_tcpbuffer\_fixed\_t**\
 Set the TCP buffer/window size to a fixed value.  struct **globus\_ftp\_control\_tcpbuffer\_automatic\_s**\
 Automatically set the TCP buffer/window size.  union **globus\_ftp\_control\_tcpbuffer\_t**\
 Control tcpbuffer attribute structure.  struct **globus\_ftp\_control\_auth\_info\_s**\
 Authentication Values.

### Macros

\#define **GLOBUS\_FTP\_CONTROL\_MODULE**   (&globus\_i\_ftp\_control\_module)\
 Module descriptor.

### Typedefs

typedef enum **globus\_ftp\_control\_type\_e** **globus\_ftp\_control\_type\_t**\
 GridFTP TYPE values.  typedef enum **globus\_ftp\_control\_mode\_e** **globus\_ftp\_control\_mode\_t**\
 GridFTP MODE values.  typedef enum **globus\_ftp\_control\_dcau\_mode\_e** **globus\_ftp\_control\_dcau\_mode\_t**\
 GridFTP DCAU values.  typedef struct **globus\_ftp\_control\_dcau\_subject\_s** **globus\_ftp\_control\_dcau\_subject\_t**\
 Control DCAU subject authentication type.  typedef enum **globus\_ftp\_control\_striping\_mode\_e** **globus\_ftp\_control\_striping\_mode\_t**\
 GridFTP Striping Types.  typedef struct **globus\_ftp\_control\_round\_robin\_s** **globus\_ftp\_control\_round\_robin\_t**\
 Control striping round robin attribute structure.  typedef union **globus\_ftp\_control\_dcau\_u** **globus\_ftp\_control\_dcau\_t**\
 Control DCAU union.  typedef union **globus\_ftp\_control\_layout\_u** **globus\_ftp\_control\_layout\_t**\
 Control striping attribute union.  typedef enum **globus\_ftp\_control\_structure\_e** **globus\_ftp\_control\_structure\_t**\
 typedef enum **globus\_ftp\_control\_parallelism\_mode\_e** **globus\_ftp\_control\_parallelism\_mode\_t**\
 typedef union **globus\_ftp\_control\_parallelism\_u** **globus\_ftp\_control\_parallelism\_t**\
 Control parallelism attribute structure \
\
  " typedef enum **globus\_ftp\_control\_tcpbuffer\_mode\_e** **globus\_ftp\_control\_tcpbuffer\_mode\_t**\
 typedef struct **globus\_ftp\_control\_tcpbuffer\_automatic\_s** **globus\_ftp\_control\_tcpbuffer\_automatic\_t**\
 Automatically set the TCP buffer/window size.  typedef union **globus\_ftp\_control\_tcpbuffer\_t** **globus\_ftp\_control\_tcpbuffer\_t**\
 Control tcpbuffer attribute structure.  typedef struct **globus\_ftp\_control\_auth\_info\_s** **globus\_ftp\_control\_auth\_info\_t**\
 Authentication Values.  typedef void(\* **globus\_ftp\_control\_response\_callback\_t**) (void \*callback\_arg, struct globus\_ftp\_control\_handle\_s \*handle, globus\_object\_t \*error, globus\_ftp\_control\_response\_t \*ftp\_response)\
 typedef void(\* **globus\_ftp\_control\_callback\_t**) (void \*callback\_arg, struct globus\_ftp\_control\_handle\_s \*handle, globus\_object\_t \*error)\
 typedef void(\* **globus\_ftp\_control\_command\_callback\_t**) (void \*callback\_arg, struct globus\_ftp\_control\_handle\_s \*handle, globus\_object\_t \*error, union globus\_ftp\_control\_command\_u \*command)\
 typedef void(\* **globus\_ftp\_control\_auth\_callback\_t**) (void \*callback\_arg, struct globus\_ftp\_control\_handle\_s \*handle, globus\_object\_t \*error, **globus\_ftp\_control\_auth\_info\_t** \*auth\_result)\
 typedef unsigned long **globus\_ftp\_control\_auth\_requirements\_t**\
 typedef void(\* **globus\_ftp\_control\_data\_callback\_t**) (void \*callback\_arg, globus\_ftp\_control\_handle\_t \*handle, globus\_object\_t \*error, globus\_byte\_t \*buffer, globus\_size\_t length, globus\_off\_t offset, globus\_bool\_t eof)\
 typedef void(\* **globus\_ftp\_control\_server\_callback\_t**) (void \*callback\_arg, struct globus\_ftp\_control\_server\_s \*server\_handle, globus\_object\_t \*error)\
 Server callback.

### Enumerations

enum **globus\_ftp\_control\_type\_e** { **GLOBUS\_FTP\_CONTROL\_TYPE\_NONE**, **GLOBUS\_FTP\_CONTROL\_TYPE\_ASCII** = 'A', **GLOBUS\_FTP\_CONTROL\_TYPE\_EBCDIC** = 'E', **GLOBUS\_FTP\_CONTROL\_TYPE\_IMAGE** = 'I', **GLOBUS\_FTP\_CONTROL\_TYPE\_LOCAL** = 'L' }\
 GridFTP TYPE values.  enum **globus\_ftp\_control\_mode\_e** { **GLOBUS\_FTP\_CONTROL\_MODE\_NONE**, **GLOBUS\_FTP\_CONTROL\_MODE\_STREAM** = 'S', **GLOBUS\_FTP\_CONTROL\_MODE\_BLOCK** = 'B', **GLOBUS\_FTP\_CONTROL\_MODE\_EXTENDED\_BLOCK** = 'E', **GLOBUS\_FTP\_CONTROL\_MODE\_COMPRESSED** = 'C' }\
 GridFTP MODE values.  enum **globus\_ftp\_control\_dcau\_mode\_e** { **GLOBUS\_FTP\_CONTROL\_DCAU\_NONE** = 'N', **GLOBUS\_FTP\_CONTROL\_DCAU\_SELF** = 'A', **GLOBUS\_FTP\_CONTROL\_DCAU\_SUBJECT** = 'S', **GLOBUS\_FTP\_CONTROL\_DCAU\_DEFAULT** }\
 GridFTP DCAU values.  enum **globus\_ftp\_control\_striping\_mode\_e** \
 GridFTP Striping Types.  enum **globus\_ftp\_control\_protection\_t** { **GLOBUS\_FTP\_CONTROL\_PROTECTION\_CLEAR** = 'C', **GLOBUS\_FTP\_CONTROL\_PROTECTION\_SAFE** = 'S', **GLOBUS\_FTP\_CONTROL\_PROTECTION\_CONFIDENTIAL** = 'E', **GLOBUS\_FTP\_CONTROL\_PROTECTION\_PRIVATE** = 'P' }\
 GridFTP Protection Types.  enum **globus\_ftp\_control\_delay\_passive\_t** \
 enum **globus\_ftp\_control\_structure\_e** \
 enum **globus\_ftp\_control\_parallelism\_mode\_e** \
 enum **globus\_ftp\_control\_tcpbuffer\_mode\_e** { **GLOBUS\_FTP\_CONTROL\_TCPBUFFER\_DEFAULT**, **GLOBUS\_FTP\_CONTROL\_TCPBUFFER\_FIXED**, **GLOBUS\_FTP\_CONTROL\_TCPBUFFER\_AUTOMATIC** }\

### Functions

globus\_result\_t **globus\_ftp\_control\_local\_layout** (globus\_ftp\_control\_handle\_t \*handle, **globus\_ftp\_control\_layout\_t** \*layout, globus\_size\_t data\_size)\
 Set data layout.  globus\_result\_t **globus\_ftp\_control\_data\_set\_interface** (globus\_ftp\_control\_handle\_t \*handle, const char \*interface\_addr)\
 Create an outgoing FTP data connection.  globus\_result\_t **globus\_ftp\_control\_create\_data\_info** (globus\_ftp\_control\_handle\_t \*handle, globus\_ftp\_control\_data\_write\_info\_t \*data\_info, globus\_byte\_t \*buffer, globus\_size\_t length, globus\_off\_t offset, globus\_bool\_t eof, **globus\_ftp\_control\_data\_callback\_t** callback, void \*callback\_arg)\
 Create a globus\_ftp\_control\_data\_write\_info\_t structure.  globus\_result\_t **globus\_ftp\_control\_release\_data\_info** (globus\_ftp\_control\_handle\_t \*handle, globus\_ftp\_control\_data\_write\_info\_t \*data\_info)\
 Release a data\_info structure.  globus\_result\_t **globus\_ftp\_control\_data\_write\_stripe** (globus\_ftp\_control\_handle\_t \*handle, globus\_byte\_t \*buffer, globus\_size\_t length, globus\_off\_t offset, globus\_bool\_t eof, int stripe\_ndx, **globus\_ftp\_control\_data\_callback\_t** callback, void \*callback\_arg)\
 Write FTP data to a stripe.  globus\_result\_t **globus\_X\_ftp\_control\_data\_write\_stripe** (globus\_ftp\_control\_handle\_t \*handle, globus\_byte\_t \*buffer, globus\_size\_t length, globus\_off\_t offset, globus\_bool\_t eof, int stripe\_ndx, globus\_ftp\_control\_data\_write\_info\_t \*data\_info)\
 Write data to a stripe from an enqueue callback.  globus\_result\_t **globus\_ftp\_control\_auth\_info\_init** (**globus\_ftp\_control\_auth\_info\_t** \*auth\_info, gss\_cred\_id\_t credential\_handle, globus\_bool\_t encrypt, char \*user, char \*password, char \*account, char \*subject)\
 Initialize authentication information.  int **globus\_ftp\_control\_auth\_info\_compare** (**globus\_ftp\_control\_auth\_info\_t** \*auth\_info\_1, **globus\_ftp\_control\_auth\_info\_t** \*auth\_info\_2)\
 Compare authentication information.  globus\_result\_t **globus\_ftp\_control\_handle\_init** (globus\_ftp\_control\_handle\_t \*handle)\
 Initialize a globus ftp handle.  globus\_result\_t **globus\_ftp\_control\_handle\_destroy** (globus\_ftp\_control\_handle\_t \*handle)\
 Destroy a globus ftp handle.  globus\_result\_t **globus\_ftp\_control\_server\_handle\_init** (globus\_ftp\_control\_server\_t \*handle)\
 Initialize a GridFTP server handle.  globus\_result\_t **globus\_ftp\_control\_server\_handle\_destroy** (globus\_ftp\_control\_server\_t \*handle)\
 Destroy a GridFTP server handle.  globus\_result\_t **globus\_ftp\_control\_response\_destroy** (globus\_ftp\_control\_response\_t \*response)\
 Free the memory associated with a response.  globus\_result\_t **globus\_ftp\_control\_response\_copy** (globus\_ftp\_control\_response\_t \*src, globus\_ftp\_control\_response\_t \*dest)\
 Copy a response structure.  globus\_result\_t **globus\_ftp\_control\_connect** (globus\_ftp\_control\_handle\_t \*handle, char \*host, unsigned short port, **globus\_ftp\_control\_response\_callback\_t** callback, void \*callback\_arg)\
 Create a new control connection to an FTP server.  globus\_result\_t **globus\_ftp\_control\_authenticate** (globus\_ftp\_control\_handle\_t \*handle, **globus\_ftp\_control\_auth\_info\_t** \*auth\_info, globus\_bool\_t use\_auth, **globus\_ftp\_control\_response\_callback\_t** callback, void \*callback\_arg)\
 Authenticate the user to the FTP server.  globus\_result\_t **globus\_ftp\_control\_authenticate\_ex** (globus\_ftp\_control\_handle\_t \*handle, **globus\_ftp\_control\_auth\_info\_t** \*auth\_info, globus\_bool\_t use\_auth, **globus\_ftp\_control\_response\_callback\_t** callback, void \*callback\_arg)\
 Authenticate the user to the FTP server.    globus\_result\_t **globus\_ftp\_control\_abort** (globus\_ftp\_control\_handle\_t \*handle, **globus\_ftp\_control\_response\_callback\_t** callback, void \*callback\_arg)\
 Send a GridFTP ABORT.  globus\_result\_t **globus\_ftp\_control\_quit** (globus\_ftp\_control\_handle\_t \*handle, **globus\_ftp\_control\_response\_callback\_t** callback, void \*callback\_arg)\
 Send a GridFTP QUIT.  globus\_result\_t **globus\_ftp\_control\_force\_close** (globus\_ftp\_control\_handle\_t \*handle, **globus\_ftp\_control\_response\_callback\_t** callback, void \*callback\_arg)\
 Force a control connection to close.  globus\_result\_t **globus\_ftp\_control\_send\_command** (globus\_ftp\_control\_handle\_t \*handle, const char \*cmdspec, **globus\_ftp\_control\_response\_callback\_t** callback, void \*callback\_arg,...)\
 Send an FTP protocol command.  globus\_result\_t **globus\_ftp\_control\_local\_pbsz** (globus\_ftp\_control\_handle\_t \*handle, unsigned long bufsize)\
 Set data channel protection buffer size.  globus\_result\_t **globus\_ftp\_control\_get\_pbsz** (globus\_ftp\_control\_handle\_t \*handle, unsigned long \*bufsize)\
 Get data channel protection buffer size.  globus\_result\_t **globus\_ftp\_control\_server\_listen** (globus\_ftp\_control\_server\_t \*handle, unsigned short \*port, **globus\_ftp\_control\_server\_callback\_t** callback, void \*callback\_arg)\
 Listen on for FTP Client Connections.  globus\_result\_t **globus\_ftp\_control\_server\_listen\_ex** (globus\_ftp\_control\_server\_t \*handle, globus\_io\_attr\_t \*attr, unsigned short \*port, **globus\_ftp\_control\_server\_callback\_t** callback, void \*callback\_arg)\
 Listen on for FTP Client Connections.  globus\_result\_t **globus\_ftp\_control\_server\_stop** (globus\_ftp\_control\_server\_t \*listener, **globus\_ftp\_control\_server\_callback\_t** callback, void \*callback\_arg)\
 Stop listening for GridFTP client connections.  globus\_result\_t **globus\_ftp\_control\_server\_accept** (globus\_ftp\_control\_server\_t \*listener, globus\_ftp\_control\_handle\_t \*handle, **globus\_ftp\_control\_callback\_t** callback, void \*callback\_arg)\
 Accept a Client Connection.  globus\_result\_t **globus\_ftp\_control\_server\_authenticate** (globus\_ftp\_control\_handle\_t \*handle, **globus\_ftp\_control\_auth\_requirements\_t** auth\_requirements, **globus\_ftp\_control\_auth\_callback\_t** callback, void \*callback\_arg)\
 Authenticate a GridFTP Client Connection.  globus\_result\_t **globus\_ftp\_control\_read\_commands** (globus\_ftp\_control\_handle\_t \*handle, **globus\_ftp\_control\_command\_callback\_t** callback, void \*callback\_arg)\
 Read GridFTP commands.  globus\_result\_t **globus\_ftp\_control\_send\_response** (globus\_ftp\_control\_handle\_t \*handle, const char \*respspec, **globus\_ftp\_control\_callback\_t** callback, void \*callback\_arg,...)\
 Send a GridFTP response.  globus\_result\_t **globus\_ftp\_control\_command\_copy** (globus\_ftp\_control\_command\_t \*dest, globus\_ftp\_control\_command\_t \*src)\
 Copy of GridFTP command.  globus\_result\_t **globus\_ftp\_control\_command\_init** (globus\_ftp\_control\_command\_t \*command, char \*raw\_command, **globus\_ftp\_control\_auth\_info\_t** \*auth\_info)\
 Initialize a GridFTP command.  globus\_result\_t **globus\_ftp\_control\_command\_destroy** (globus\_ftp\_control\_command\_t \*command)\
 Destroy a GridFTP command.  globus\_result\_t **globus\_ftp\_control\_data\_force\_close** (globus\_ftp\_control\_handle\_t \*control\_handle, **globus\_ftp\_control\_callback\_t** destroy\_callback, void \*destroy\_callback\_arg)\
 Close data connections.  globus\_result\_t **globus\_ftp\_control\_local\_send\_eof** (globus\_ftp\_control\_handle\_t \*handle, globus\_bool\_t send\_eof)\
 Enable or disable automatic EOF handling.  globus\_result\_t **globus\_ftp\_control\_data\_send\_eof** (globus\_ftp\_control\_handle\_t \*handle, int count\[\], int array\_size, globus\_bool\_t eof\_message, **globus\_ftp\_control\_callback\_t** cb, void \*user\_arg)\
 Send EOF.  globus\_result\_t **globus\_ftp\_control\_data\_connect\_read** (globus\_ftp\_control\_handle\_t \*handle, globus\_ftp\_control\_data\_connect\_callback\_t callback, void \*user\_arg)\
 Create an incoming FTP data connection.  globus\_result\_t **globus\_ftp\_control\_data\_connect\_write** (globus\_ftp\_control\_handle\_t \*handle, globus\_ftp\_control\_data\_connect\_callback\_t callback, void \*user\_arg)\
 Create an outgoing FTP data connection.  globus\_result\_t **globus\_ftp\_control\_data\_add\_channels** (globus\_ftp\_control\_handle\_t \*handle, unsigned int num\_channels, unsigned int stripe)\
 Add data channels.  globus\_result\_t **globus\_ftp\_control\_data\_remove\_channels** (globus\_ftp\_control\_handle\_t \*handle, unsigned int num\_channels, unsigned int stripe)\
 Remove Data Channels.  globus\_result\_t **globus\_ftp\_control\_data\_query\_channels** (globus\_ftp\_control\_handle\_t \*handle, unsigned int \*num\_channels, unsigned int stripe)\
 Number of data channels.  globus\_result\_t **globus\_ftp\_control\_data\_get\_total\_data\_channels** (globus\_ftp\_control\_handle\_t \*handle, unsigned int \*num\_channels, unsigned int stripe\_ndx)\
 Get Total Data Channels For a Stripe.  globus\_result\_t **globus\_ftp\_control\_local\_parallelism** (globus\_ftp\_control\_handle\_t \*handle, **globus\_ftp\_control\_parallelism\_t** \*parallelism)\
 Set control handle parallelism.  globus\_result\_t **globus\_ftp\_control\_local\_pasv** (globus\_ftp\_control\_handle\_t \*handle, globus\_ftp\_control\_host\_port\_t \*address)\
 Create a passive socket.  globus\_result\_t **globus\_ftp\_control\_local\_spas** (globus\_ftp\_control\_handle\_t \*handle, globus\_ftp\_control\_host\_port\_t addresses\[\], unsigned int num\_addresses)\
 Create multiple passive sockets.  globus\_result\_t **globus\_ftp\_control\_local\_port** (globus\_ftp\_control\_handle\_t \*handle, globus\_ftp\_control\_host\_port\_t \*address)\
 Set remote data address.  globus\_result\_t **globus\_ftp\_control\_local\_spor** (globus\_ftp\_control\_handle\_t \*handle, globus\_ftp\_control\_host\_port\_t addresses\[\], unsigned int num\_addresses)\
 Set remote data addresses.  globus\_result\_t **globus\_ftp\_control\_local\_type** (globus\_ftp\_control\_handle\_t \*handle, **globus\_ftp\_control\_type\_t** type, int form\_code)\
 Set control handle TYPE value.  globus\_result\_t **globus\_ftp\_control\_local\_tcp\_buffer** (globus\_ftp\_control\_handle\_t \*handle, **globus\_ftp\_control\_tcpbuffer\_t** \*tcp\_buffer)\
 Set data handle TCP buffer size.  globus\_result\_t **globus\_ftp\_control\_local\_mode** (globus\_ftp\_control\_handle\_t \*handle, **globus\_ftp\_control\_mode\_t** mode)\
 Set data handle mode.  globus\_result\_t **globus\_ftp\_control\_local\_dcau** (globus\_ftp\_control\_handle\_t \*handle, const **globus\_ftp\_control\_dcau\_t** \*dcau, gss\_cred\_id\_t delegated\_credential\_handle)\
 Set data channel DCAU.  globus\_result\_t **globus\_ftp\_control\_local\_stru** (globus\_ftp\_control\_handle\_t \*handle, **globus\_ftp\_control\_structure\_t** structure)\
 Set data channel structure.  globus\_result\_t **globus\_ftp\_control\_data\_write** (globus\_ftp\_control\_handle\_t \*handle, globus\_byte\_t \*buffer, globus\_size\_t length, globus\_off\_t offset, globus\_bool\_t eof, **globus\_ftp\_control\_data\_callback\_t** callback, void \*callback\_arg)\
 Write data to data connections.  globus\_result\_t **globus\_ftp\_control\_data\_read** (globus\_ftp\_control\_handle\_t \*handle, globus\_byte\_t \*buffer, globus\_size\_t max\_length, **globus\_ftp\_control\_data\_callback\_t** callback, void \*callback\_arg)\
 Read data from data connections.  globus\_result\_t **globus\_ftp\_control\_set\_force\_order** (globus\_ftp\_control\_handle\_t \*handle, globus\_bool\_t order\_data, globus\_off\_t starting\_offset)\
 Set data handle to return read mode E data in order.  globus\_result\_t **globus\_ftp\_control\_ipv6\_allow** (globus\_ftp\_control\_handle\_t \*handle, globus\_bool\_t allow)\
 Not documented yet.  globus\_result\_t **globus\_ftp\_control\_client\_get\_connection\_info\_ex** (globus\_ftp\_control\_handle\_t \*handle, globus\_ftp\_control\_host\_port\_t \*local\_info, globus\_ftp\_control\_host\_port\_t \*remote\_info)\
 Not documented yet.

## Detailed Description

GridFTP Control Connection API.

## Typedef Documentation

### typedef void(\* globus\_ftp\_control\_auth\_callback\_t) (void \*callback\_arg, struct globus\_ftp\_control\_handle\_s \*handle, globus\_object\_t \*error, globus\_ftp\_control\_auth\_info\_t \*auth\_result)

Server authentication complete callback.

A function with this signature is registered by calling globus\_ftp\_control\_accept(). It is called when the authentication protocol has completed. Based on the auth\_result, the server implementor should determine authorization and then send the appropriate response using **globus\_ftp\_control\_send\_response()**, indicating to the client whether authorization was successful or not.

**Parameters**

*handle* This structure is populated when the callback is called and represents a control connection to the client. \
 *error* Indicates if a command was successfully read or or if a failure occurred. This object will be freed once this callback returns. If the user wishes to have a copy of the error that persists past the life of this callback, they must make a copy using globus\_object\_copy(), and free it with globus\_object\_free(). \
 *auth\_result* A globus\_ftp\_control\_auth\_result\_t containing the values the client sent for gss authentication, user name, password and account. If any of the values were not sent by the client they will be NULL. Based on that information the user can decide if the client will be authorized for use of the server. \

*callback\_arg* The user argument passed to the callback.

### typedef struct globus\_ftp\_control\_auth\_info\_s globus\_ftp\_control\_auth\_info\_t

Authentication Values. This structure is populated and passed back to the user via the **globus\_ftp\_control\_auth\_callback\_t()**. It contains the information needed to decide if a client may use the server.

### typedef unsigned long globus\_ftp\_control\_auth\_requirements\_t

Authentication requirements.

The value of this should be a bitwise or of

- •

  GLOBUS\_FTP\_CONTROL\_AUTH\_NONE

- •

  GLOBUS\_FTP\_CONTROL\_AUTH\_GSSAPI

- •

  GLOBUS\_FTP\_CONTROL\_AUTH\_USER

- •

  GLOBUS\_FTP\_CONTROL\_AUTH\_PASS

- •

  GLOBUS\_FTP\_CONTROL\_AUTH\_ACCT

### typedef void(\* globus\_ftp\_control\_callback\_t) (void \*callback\_arg, struct globus\_ftp\_control\_handle\_s \*handle, globus\_object\_t \*error)

Asynchronous control callback.

This callback is used as a generic control operation callback.

**Parameters**

*callback\_arg* User supplied argument to the callback function \
 *handle* A pointer to the GridFTP control handle. Used to identify which control connection the operation was applied to. \
 *error* Pointer to a globus error object containing information about any errors that occurred processing the operation

### typedef void(\* globus\_ftp\_control\_command\_callback\_t) (void \*callback\_arg, struct globus\_ftp\_control\_handle\_s \*handle, globus\_object\_t \*error, union globus\_ftp\_control\_command\_u \*command)

Server command callback.

When a command from a client is received on the control channel a user callback with this signature is called.

**Parameters**

*callback\_arg* The user argument passed to the callback function. \
 *handle* The control handle that the command was issued on. \
 *error* Indicates if a command was successfully read or or if a failure occurred. This object will be freed once this callback returns. If the user wishes to have a copy of the error that persists past the life of this callback, they must make a copy using globus\_object\_copy(), and free it with globus\_object\_free(). \
 *command* The command structure indicates what type of command the client issued. Based on the 'type' further information can be extracted. This command structure will be freed once this callback returns. If the user wishes to have a copy of the error that persists past the life of this callback, they must make a copy using **globus\_ftp\_control\_command\_copy()**, and free it with globus\_ftp\_control\_command\_free().

### typedef void(\* globus\_ftp\_control\_data\_callback\_t) (void \*callback\_arg, globus\_ftp\_control\_handle\_t \*handle, globus\_object\_t \*error, globus\_byte\_t \*buffer, globus\_size\_t length, globus\_off\_t offset, globus\_bool\_t eof)

Asynchronous data transmission operation callback.

This callback is called in functions that send or receive data on the data channel(s).

In the case of a write, this function is invoked when the entire data buffer is sent. Depending on the data transfer properties set by the globus\_ftp\_control\_local\_\*() functions, the data may actually be split into multiple buffers and sent to multiple data nodes.

In the case of a read, this function will return a single extent of the data. The order of the data returned is not defined in an extended block mode data transfer, unless the ordered\_data flag is set. It is up to the user of the API to re-construct the file order.

**Parameters**

*callback\_arg* User supplied argument to the callback function \
 *handle* A pointer to the GridFTP control handle. Used to identify which control connection the operation was applied to. \
 *error* Pointer to a globus error object containing information about any errors that occurred processing the operation \
 *buffer* The user buffer passed as a parameter to **globus\_ftp\_control\_data\_read()** or **globus\_ftp\_control\_data\_write()**. \
 *length* The amount of data in the buffer. In the case of an incoming data channel, this may be less than the buffer size. \
 *offset* The file offset of the data which is contained in the buffer. \
 *eof* This is set to GLOBUS\_TRUE then all of the data associated with the transfer has arrived on the data connections associated with this handle. If multiple data callbacks are registered with this handle, there is no guaranteed order of the EOF callback with respect to other data callbacks. If multiple callbacks are registered when EOF is reached on the data connections, at least one callback function will be called with eof set to GLOBUS\_TRUE.

### typedef enum globus\_ftp\_control\_parallelism\_mode\_e globus\_ftp\_control\_parallelism\_mode\_t

control parallelism Types

### typedef void(\* globus\_ftp\_control\_response\_callback\_t) (void \*callback\_arg, struct globus\_ftp\_control\_handle\_s \*handle, globus\_object\_t \*error, globus\_ftp\_control\_response\_t \*ftp\_response)

Asynchronous operation completion callback.

This callback is called whenever a reply to command is received on the FTP control channel. It allows the user to handle the received reply or alternatively handle any errors that occurred during the interaction with the FTP server. This function will be called multiple times in the case when intermediate responses (1yz) are received.

**Parameters**

*callback\_arg* User supplied argument to the callback function \
 *handle* A pointer to the GridFTP control handle. Used to identify which control connection the operation was applied to. \
 *error* Pointer to a globus error object containing information about any errors that occurred processing the operation \
 *ftp\_response* Pointer to a response structure containing the FTP response to the command.

### typedef enum globus\_ftp\_control\_structure\_e globus\_ftp\_control\_structure\_t

control structure structure

### typedef enum globus\_ftp\_control\_tcpbuffer\_mode\_e globus\_ftp\_control\_tcpbuffer\_mode\_t

TCP Buffer Setting Modes

## Enumeration Type Documentation

### enum globus\_ftp\_control\_delay\_passive\_t

delayed passive flags

### enum globus\_ftp\_control\_parallelism\_mode\_e

control parallelism Types

### enum globus\_ftp\_control\_structure\_e

control structure structure

### enum globus\_ftp\_control\_tcpbuffer\_mode\_e

TCP Buffer Setting Modes

**Enumerator**

- *GLOBUS\_FTP\_CONTROL\_TCPBUFFER\_DEFAULT*

  *Don't change the TCP buffer/window size from the system default*

- *GLOBUS\_FTP\_CONTROL\_TCPBUFFER\_FIXED*

  *Set the TCP buffer/window size to a fixed value*

- *GLOBUS\_FTP\_CONTROL\_TCPBUFFER\_AUTOMATIC*

  *Automatically set the TCP buffer/window size*

## Author

*Generated automatically by Doxygen for globus\_ftp\_control from the source code.*
