---
name: "globus_ftp_control_data.c"
section: "3"
platform: "linux"
package: "libglobus-ftp-control-doc"
version: "4.4-1"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/globus_ftp_control_data.c"
---

# globus\_ftp\_control\_data.c(3)

## NAME

globus\_ftp\_control\_data.c -

## SYNOPSIS

### Functions

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)\
 globus\_result\_t **globus\_ftp\_control\_data\_set\_interface** (globus\_ftp\_control\_handle\_t \*handle, const char \*interface\_addr)\
 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)\
 globus\_result\_t **globus\_ftp\_control\_data\_add\_channels** (globus\_ftp\_control\_handle\_t \*handle, unsigned int num\_channels, unsigned int stripe\_ndx)\
 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)\
 globus\_result\_t **globus\_ftp\_control\_data\_remove\_channels** (globus\_ftp\_control\_handle\_t \*handle, unsigned int num\_channels, unsigned int stripe\_ndx)\
 globus\_result\_t **globus\_ftp\_control\_data\_query\_channels** (globus\_ftp\_control\_handle\_t \*handle, unsigned int \*num\_channels, unsigned int stripe\_ndx)\
 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)\
 globus\_result\_t **globus\_ftp\_control\_local\_send\_eof** (globus\_ftp\_control\_handle\_t \*handle, globus\_bool\_t send\_eof)\
 globus\_result\_t **globus\_ftp\_control\_local\_parallelism** (globus\_ftp\_control\_handle\_t \*handle, **globus\_ftp\_control\_parallelism\_t** \*parallelism)\
 globus\_result\_t **globus\_ftp\_control\_local\_pasv** (globus\_ftp\_control\_handle\_t \*handle, globus\_ftp\_control\_host\_port\_t \*address)\
 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)\
 globus\_result\_t **globus\_ftp\_control\_local\_port** (globus\_ftp\_control\_handle\_t \*handle, globus\_ftp\_control\_host\_port\_t \*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)\
 globus\_result\_t **globus\_ftp\_control\_local\_type** (globus\_ftp\_control\_handle\_t \*handle, **globus\_ftp\_control\_type\_t** type, int form\_code)\
 globus\_result\_t **globus\_ftp\_control\_local\_mode** (globus\_ftp\_control\_handle\_t \*handle, **globus\_ftp\_control\_mode\_t** mode)\
 globus\_result\_t **globus\_ftp\_control\_local\_tcp\_buffer** (globus\_ftp\_control\_handle\_t \*handle, **globus\_ftp\_control\_tcpbuffer\_t** \*tcp\_buffer)\
 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)\
 globus\_result\_t **globus\_ftp\_control\_local\_pbsz** (globus\_ftp\_control\_handle\_t \*handle, unsigned long bufsize)\
 globus\_result\_t **globus\_ftp\_control\_get\_pbsz** (globus\_ftp\_control\_handle\_t \*handle, unsigned long \*bufsize)\
 globus\_result\_t **globus\_ftp\_control\_local\_stru** (globus\_ftp\_control\_handle\_t \*handle, **globus\_ftp\_control\_structure\_t** 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)\
 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)\
 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)\
 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)\
 globus\_result\_t **globus\_ftp\_control\_release\_data\_info** (globus\_ftp\_control\_handle\_t \*handle, globus\_ftp\_control\_data\_write\_info\_t \*data\_info)\
 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)\
 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)\
 globus\_result\_t **globus\_ftp\_control\_data\_force\_close** (globus\_ftp\_control\_handle\_t \*control\_handle, **globus\_ftp\_control\_callback\_t** close\_callback\_func, void \*close\_arg)\

## Detailed Description

FTP Data Connection Configuration and Management.

## Function Documentation

### globus\_result\_t globus\_ftp\_control\_data\_connect\_read (globus\_ftp\_control\_handle\_t \*handle, globus\_ftp\_control\_data\_connect\_callback\_tcallback, void \*user\_arg)

Create an incoming FTP data connection. This function will register a globus\_io\_{accept, connect}. Further accepts/connects are done by registering a new accept/connect in the current accept/connect callback. A call to either **globus\_ftp\_control\_local\_pasv()** or **globus\_ftp\_control\_local\_port()** needs to precede this calling this function. This function may be followed by a globus\_ftp\_data\_read.

**Parameters:**

*handle* A pointer to a FTP control handle which is configured to create an incoming data connection.\
 *callback* This callback is called when the connection occurs. This parameter may be NULL.\
 *user\_arg* The user argument passed to the connect callback.

References GLOBUS\_FTP\_CONTROL\_MODULE.

### 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. This function sets the interface that will be used to send and receive information along the data channel.

**Parameters:**

*handle* A pointer to a FTP control handle which is configured to create an outgoing data connection. \
 *interface\_addr*

References GLOBUS\_FTP\_CONTROL\_MODULE.

### globus\_result\_t globus\_ftp\_control\_data\_connect\_write (globus\_ftp\_control\_handle\_t \*handle, globus\_ftp\_control\_data\_connect\_callback\_tcallback, void \*user\_arg)

Create an outgoing FTP data connection. This function will register a globus\_io\_{accept, connect}. Further accepts/connects are done by registering a new accept/connect in the current accept/connect callback. A call to either **globus\_ftp\_control\_local\_pasv()** or **globus\_ftp\_control\_local\_port()** needs to precede this calling this function. This function may be followed by a globus\_ftp\_data\_write.

**Parameters:**

*handle* A pointer to a FTP control handle which is configured to create an outgoing data connection.\
 *callback* This callback is called when the connection occurs. This parameter may be NULL.\
 *user\_arg* The user argument passed to the connect callback.

References GLOBUS\_FTP\_CONTROL\_MODULE.

### globus\_result\_t globus\_ftp\_control\_data\_add\_channels (globus\_ftp\_control\_handle\_t \*handle, unsigned intnum\_channels, unsigned intstripe\_ndx)

Opens additional data channels (connections) to the host identified by the stripe parameter. **Parameters:**

*handle* A pointer to a FTP control handle. This handle is used to determine the host corresponding to the stripe number and to store information about any channels added by this function. \
 *num\_channels* The number of additional channels to add. \
 *stripe\_ndx* A integer identifying the stripe to add channels too. In the case of non-striped transfer this parameter will be ignored.

References GLOBUS\_FTP\_CONTROL\_MODULE.

### globus\_result\_t globus\_ftp\_control\_data\_send\_eof (globus\_ftp\_control\_handle\_t \*handle, intcount\[\], intarray\_size, globus\_bool\_teof\_message, globus\_ftp\_control\_callback\_tcb, void \*user\_arg)

Sends an eof message to each stripe along an open data connection. **Parameters:**

*handle* A pointer to a FTP control handle. This handle contains the the state for a conneciton. \
 *count\[\]* This array of integers should contain an integer that will be added to the current parallel data connection count on each stripe. The order of the integers corresponds to each stripe in the same order as what was returned from local\_port().

An eof message must be sent to all receiving hosts in a transfer. The message contains the total number of data connections used by each stripe. Many stripes may be sending to a single receiver but only one eof message may be sent. The count parameter allows the user to pass in the total number of data connections used by all other hosts. The local values are added to the passed in values and then sent to the receiver.

**Parameters:**

*array\_size* The number of elements in count\[\]. \
 *eof\_message* \
 *cb* The function to be called when the eof message has been called. \
 *user\_arg* A user pointer that is threaded through to the user callback.

References GLOBUS\_FTP\_CONTROL\_MODULE.

### globus\_result\_t globus\_ftp\_control\_data\_remove\_channels (globus\_ftp\_control\_handle\_t \*handle, unsigned intnum\_channels, unsigned intstripe\_ndx)

Removes data channels (connections) to the host identified by the stripe parameter. **Parameters:**

*handle* A pointer to a FTP control handle. This handle is used to determine the host corresponding to the stripe number and to update information about any channels removed by this function. \
 *num\_channels* The number of channels to remove. \
 *stripe\_ndx* A integer identifying the stripe to remove channels from. In the case of non-striped transfer this parameter will be ignored.

References GLOBUS\_FTP\_CONTROL\_MODULE.

### globus\_result\_t globus\_ftp\_control\_data\_query\_channels (globus\_ftp\_control\_handle\_t \*handle, unsigned int \*num\_channels, unsigned intstripe\_ndx)

Returns the number of currently open channels for the host identified by the stripe parameter. This number may be less then the level of parallelism specified in local\_parallelism, due to the possibility that some channels have not yet connected.

**Parameters:**

*handle* A pointer to a FTP control handle. This handle is used to determine the host corresponding to 'stripe' and number of channels corresponding to that host. \
 *num\_channels* \
 *stripe\_ndx* A integer identifying the stripe for which to return the number of channels. In the case of non-striped transfer this parameter should be zero.

References GLOBUS\_FTP\_CONTROL\_MODULE.

### globus\_result\_t globus\_ftp\_control\_data\_get\_total\_data\_channels (globus\_ftp\_control\_handle\_t \*handle, unsigned int \*num\_channels, unsigned intstripe\_ndx)

Returns the total number of data channels used so far in the current transfer on the given stripe. **Parameters:**

*handle* A pointer to a FTP control handle. This handle is used to determine the host corresponding to 'stripe' and number of channels corresponding to that host. \
 *num\_channels* \
 *stripe\_ndx* A integer identifying the stripe for which to return the number of channels. In the case of non-striped transfer this parameter should be zero.

References GLOBUS\_FTP\_CONTROL\_MODULE.

### globus\_result\_t globus\_ftp\_control\_local\_send\_eof (globus\_ftp\_control\_handle\_t \*handle, globus\_bool\_tsend\_eof)

Determines if the library will automatically send an EOF message in extended block mode, or if the user will have to explicitly do it by calling **globus\_ftp\_control\_data\_send\_eof()**. **Parameters:**

*handle* The ftp handle you wish to sent the send\_eof attribute on.\
 *send\_eof* A boolean representing whether or not to automatically send an EOF message.

References GLOBUS\_FTP\_CONTROL\_MODULE.

### globus\_result\_t globus\_ftp\_control\_local\_parallelism (globus\_ftp\_control\_handle\_t \*handle, globus\_ftp\_control\_parallelism\_t \*parallelism)

Set the parallelism information in a FTP control handle. **Parameters:**

*handle* A pointer to the FTP control handle for which the parallelism information is to be updated \
 *parallelism* A structure containing parallelism information

References GLOBUS\_FTP\_CONTROL\_MODULE.

### globus\_result\_t globus\_ftp\_control\_local\_pasv (globus\_ftp\_control\_handle\_t \*handle, globus\_ftp\_control\_host\_port\_t \*address)

Create a local listening socket, bind it and return the address the socket is listening to. If there is a existing data connection it is closed.

**Parameters:**

*handle* A pointer to a FTP control handle. Information about the listening socket is stored in the handle. \
 *address* The host IP address and port is returned through this parameter.

References GLOBUS\_FTP\_CONTROL\_MODULE.

### globus\_result\_t globus\_ftp\_control\_local\_spas (globus\_ftp\_control\_handle\_t \*handle, globus\_ftp\_control\_host\_port\_taddresses\[\], unsigned intnum\_addresses)

Create num\_addresses local listening sockets, bind them and return the addresses the sockets are listening to. If there is a existing data connection it is closed.

**Parameters:**

*handle* A pointer to a FTP control handle. Information about the listening sockets is stored in the handle. \
 *addresses* The host IP addresses and ports are returned through this parameter. \
 *num\_addresses* The number of listening sockets to create

References GLOBUS\_FTP\_CONTROL\_MODULE.

### globus\_result\_t globus\_ftp\_control\_local\_port (globus\_ftp\_control\_handle\_t \*handle, globus\_ftp\_control\_host\_port\_t \*address)

Insert the host/port information returned by a PASV on the remote host into the local FTP control handle. (close any outstanding data con)

**Parameters:**

*handle* A pointer to the FTP control handle into which to insert the host/port information \
 *address* The host IP address and port

References GLOBUS\_FTP\_CONTROL\_MODULE.

### globus\_result\_t globus\_ftp\_control\_local\_spor (globus\_ftp\_control\_handle\_t \*handle, globus\_ftp\_control\_host\_port\_taddresses\[\], unsigned intnum\_addresses)

Insert the host/port addresses returned by a SPAS on the remote host into the local FTP control handle. If there are any outstanding data connections at this point, they are closed.

**Parameters:**

*handle* A pointer to the FTP control handle into which to insert the host/port addresses \
 *addresses* The host IP addresses and port numbers \
 *num\_addresses* The number of addresses

References GLOBUS\_FTP\_CONTROL\_MODULE.

### globus\_result\_t globus\_ftp\_control\_local\_type (globus\_ftp\_control\_handle\_t \*handle, globus\_ftp\_control\_type\_ttype, intform\_code)

Update the FTP control handle with the given type information. **Parameters:**

*handle* A pointer to the FTP control handle to be updated \
 *type* The type of the data connection. Possible values are: ASCII, EBCDIC, IMAGE and LOCAL. Currently only ASCII and IMAGE types are supported. \
 *form\_code* The logical byte size parameter for the LOCAL type.

References GLOBUS\_FTP\_CONTROL\_MODULE.

### globus\_result\_t globus\_ftp\_control\_local\_mode (globus\_ftp\_control\_handle\_t \*handle, globus\_ftp\_control\_mode\_tmode)

Update the FTP control handle with the given mode information. **Parameters:**

*handle* A pointer to the FTP control handle to be updated \
 *mode* Specifies the mode of the data connection. Possible modes are STREAM, BLOCK, EXTENDED BLOCK and COMPRESSED. Out of these only STREAM and EXTENDED BLOCK are supported in this implementation. Also, EXTENDED BLOCK is only supported in combination with the IMAGE type.

References GLOBUS\_FTP\_CONTROL\_MODULE.

### globus\_result\_t globus\_ftp\_control\_local\_tcp\_buffer (globus\_ftp\_control\_handle\_t \*handle, globus\_ftp\_control\_tcpbuffer\_t \*tcp\_buffer)

Update the FTP control handle with the given socket buffer information. **Parameters:**

*handle* A pointer to the FTP control handle to be updated \
 *tcp\_buffer* A pointer to the socket buffer.

References GLOBUS\_FTP\_CONTROL\_MODULE, and GLOBUS\_FTP\_CONTROL\_TCPBUFFER\_FIXED.

### globus\_result\_t globus\_ftp\_control\_local\_dcau (globus\_ftp\_control\_handle\_t \*handle, const globus\_ftp\_control\_dcau\_t \*dcau, gss\_cred\_id\_tdelegated\_credential\_handle)

Update the FTP control handle with the given data channel authentication information. If authentication is set to GLOBUS\_FTP\_CONTROL\_DCAU\_NONE, then protection will also be disabled for this control handle.

**Parameters:**

*handle* A pointer to the FTP control handle to be updated \
 *dcau* A parameter specifying the data channel authentication mode. Possible values are No Authentication, Self Authentication and Subject-name authentication. \
 *delegated\_credential\_handle*

References GLOBUS\_FTP\_CONTROL\_MODULE.

### globus\_result\_t globus\_ftp\_control\_local\_pbsz (globus\_ftp\_control\_handle\_t \*handle, unsigned longbufsize)

Update the FTP control handle with the given protection buffer size information. This function sets protection buffer size to be used by this handle. This value is used to determine how much data will be sent in each packet during a protected data transfer.

**Parameters:**

*handle* A pointer to the FTP control handle to be updated \
 *bufsize* A parameter specifying the protection buffer size value.

References GLOBUS\_FTP\_CONTROL\_MODULE.

### globus\_result\_t globus\_ftp\_control\_get\_pbsz (globus\_ftp\_control\_handle\_t \*handle, unsigned long \*bufsize)

Query the FTP control handle for the protection buffer size information. This function queries the handle to determine the protection buffer size which is used by this handle. This value is used to determine how much data will be sent in each packet during a protected data transfer.

**Parameters:**

*handle* A pointer to the FTP control handle to be updated \
 *bufsize* A pointer to a parameter to store the value of the protection buffer size.

References GLOBUS\_FTP\_CONTROL\_MODULE.

### globus\_result\_t globus\_ftp\_control\_local\_stru (globus\_ftp\_control\_handle\_t \*handle, globus\_ftp\_control\_structure\_tstructure)

Updates the handle with information on the structure of the data being sent on the data channel. This function updates the handle with the provided structure information. At this point the only structure type that is supported is the file type.

**Parameters:**

*handle* A pointer to a FTP control handle. The handle contains information about the current state of the control and data connections. \
 *structure* This parameter is used to pass the structure information. Possible values are file, record and page. Only the file type is supported

References GLOBUS\_FTP\_CONTROL\_MODULE.

### globus\_result\_t globus\_ftp\_control\_data\_write (globus\_ftp\_control\_handle\_t \*handle, globus\_byte\_t \*buffer, globus\_size\_tlength, globus\_off\_toffset, globus\_bool\_teof, globus\_ftp\_control\_data\_callback\_tcallback, void \*callback\_arg)

Writes data from the supplied buffer to data connection(s) This function writes contained in the buffer to the data channel(s).

**Parameters:**

*handle* A pointer to a FTP control handle. The handle contains information about the current state of the control and data connections. \
 *buffer* A user supplied buffer from which data will written to the data connection(s) \
 *length* The length of the data contained in the buffer. \
 *offset* The offset in the file at which the data in the buffer starts \
 *eof* Indicates that the buffer is that last part of a file. In the striped case this will cause a EOF block to be send to every data node involved in the transfer. \
 *callback* The function to be called once the data has been sent \
 *callback\_arg* User supplied argument to the callback function

References GLOBUS\_FTP\_CONTROL\_MODULE.

### globus\_result\_t globus\_ftp\_control\_data\_read (globus\_ftp\_control\_handle\_t \*handle, globus\_byte\_t \*buffer, globus\_size\_tmax\_length, globus\_ftp\_control\_data\_callback\_tcallback, void \*callback\_arg)

Reads data from data connection(s) and put them in the supplied buffer. This function takes the given buffer and will try to read data from the data connection(s).

**Parameters:**

*handle* A pointer to a FTP control handle. The handle contains information about the current state of the control and data connections. \
 *buffer* A user supplied buffer into which data from the data connection(s) will be written \
 *max\_length* The maximum length of the data that can be written to the buffer \
 *callback* The function to be called once the data has been read \
 *callback\_arg* User supplied argument to the callback function

References GLOBUS\_FTP\_CONTROL\_MODULE.

### globus\_result\_t globus\_ftp\_control\_local\_layout (globus\_ftp\_control\_handle\_t \*handle, globus\_ftp\_control\_layout\_t \*layout, globus\_size\_tdata\_size)

Update the handle with the layout and the size of the data sent over the data channel. This function is deprecated. The interface will be the changed to that of globus\_X\_ftp\_control\_local\_layout()

**Parameters:**

*handle* A pointer to the FTP control handle into which to insert the layout information. \
 *layout* A variable containing the layout information \
 *data\_size* The size of the data that is going to be sent. This may be needed to interpret the layout information.

References GLOBUS\_FTP\_CONTROL\_MODULE.

### 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\_tlength, globus\_off\_toffset, globus\_bool\_teof, globus\_ftp\_control\_data\_callback\_tcallback, void \*callback\_arg)

Create a globus\_ftp\_control\_data\_write\_info\_t structure. This funciton populates a globus\_ftp\_control\_data\_callback\_t structure with valid information. This structure provides the user a way to register several data writes with a single callback. This is quite useful to the writter of enqueue functions. It allows a single call to **globus\_ftp\_control\_data\_write()** to be broken up into many writes, potentially on different stripes, and for a single callback to be called when all are finished.

**Parameters:**

*handle* A pointer to a FTP control handle. The handle contains information about the current state of the control and data connections. \
 *data\_info* The globus\_ftp\_control\_data\_write\_info\_t structure to be released. \
 *buffer* The pointer to the user buffer that will be passed to the callback argument when there are zero references to data\_info. This is intended to be the start of all the data the user intends to write using **globus\_ftp\_control\_data\_write\_stripe()**, but it does not have to be. \
 *length* The length of the memory segment pointed to by the argument buffer. \
 *offset* The file offset of the data segment specified. \
 *eof* This should be set to true if the user plans on registering eof on the data\_info structure. \
 *callback* The user function to be called when all references to data\_info are released. This occurs after all data registered for write from globus\_ftp\_control\_data\_write\_stripe have occured and the user calls **globus\_ftp\_control\_release\_data\_info()**. The callback is passed all of the arguments passed to this function with the exception of data\_info. \
 *callback\_arg* User supplied argument to the callback function

References GLOBUS\_FTP\_CONTROL\_MODULE.

### 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. This function releases all memory and references created when a call to **globus\_ftp\_control\_create\_data\_info()** was made. For every call to **globus\_ftp\_control\_create\_data\_info()** a call to this function must be made.

**Parameters:**

*handle* A pointer to a FTP control handle. The handle contains information about the current state of the control and data connections. \
 *data\_info* The globus\_ftp\_control\_data\_write\_info\_t structure to be released.

References GLOBUS\_FTP\_CONTROL\_MODULE.

### globus\_result\_t globus\_ftp\_control\_data\_write\_stripe (globus\_ftp\_control\_handle\_t \*handle, globus\_byte\_t \*buffer, globus\_size\_tlength, globus\_off\_toffset, globus\_bool\_teof, intstripe\_ndx, globus\_ftp\_control\_data\_callback\_tcallback, void \*callback\_arg)

Write FTP data to a particular stripe. This function allows the user to write to a specified stripe. The stripe index relates to the order passsed into local\_spor(). This function differs from **globus\_ftp\_control\_data\_write()** in that no enqueue function is needed since the user specifies the stripe on which data is written. In order to use this function the user must have a valid pointer to a globus\_ftp\_control\_data\_write\_info\_t structure. The data\_info structure can be obtained by a call to **globus\_ftp\_control\_create\_data\_info()**. Many calls to this function can be made, but only a single user callback occurs per creation of a globus\_ftp\_control\_data\_write\_info\_t structure.

**Parameters:**

*handle* A pointer to a FTP control handle. The handle contains information about the current state of the control and data connections. \
 *buffer* a pointer to the data the user wishes to send along the FTP data channels. \
 *length* the length of the data pointer to by the parameter buffer. \
 *offset* the offset into the file of the data. \
 *eof* A boolean stating that this will be the last chuck of data registered on the given stripe. In order to properly send an eof message the user must register an eof on every stripe. \
 *stripe\_ndx* The index of the stripe on which the data will be sent. The index of each stripe is determined by the call to local\_spas or local\_spor. \
 *callback* The function to be called once the data has been sent \
 *callback\_arg* User supplied argument to the callback function

References GLOBUS\_FTP\_CONTROL\_MODULE.

### globus\_result\_t globus\_X\_ftp\_control\_data\_write\_stripe (globus\_ftp\_control\_handle\_t \*handle, globus\_byte\_t \*buffer, globus\_size\_tlength, globus\_off\_toffset, globus\_bool\_teof, intstripe\_ndx, globus\_ftp\_control\_data\_write\_info\_t \*data\_info)

Write data on a specific stripe from an enqueue callback function only. This function allows the user to register the write of ftp data on a specfic stripe. This function can only be called fromed an enqueue function callback. This function should be used only by the implementor of an enqueue funciton. It should be viewed as unstable and used used only by advanced users. This is the only function in the library that the enqueue function implemtor is allowed from the enqueue callback.

**Parameters:**

*handle* A pointer to a FTP control handle. The handle contains information about the current state of the control and data connections. \
 *buffer* a pointer to the data the user wishes to send along the FTP data channels. \
 *length* the length of the data pointer to by the parameter buffer. \
 *offset* the offset into the file of the data. \
 *eof* a boolean stating that this is the last buffer to be registered. When using the \_X\_ version of this function the user does not need to register an eof on each stripe, the control library will take care of that internally. \
 *stripe\_ndx* The index of the stripe on which the data will be sent. The index of each stripe is determined by the call to local\_spas or local\_spor. \
 *data\_info* An opaque structure that is passed into the enqueue function and contains reference count and state information. The same data\_info pointer that is passed into the enqueue function must be used for this parameter.

References GLOBUS\_FTP\_CONTROL\_MODULE.

### globus\_result\_t globus\_ftp\_control\_data\_force\_close (globus\_ftp\_control\_handle\_t \*control\_handle, globus\_ftp\_control\_callback\_tclose\_callback\_func, void \*close\_arg)

Forces an imediate close of all data connections. **Parameters:**

*control\_handle* The globus\_ftp\_control\_handle that is have its data connections closed. \
 *close\_callback\_func* A user function that will be called when the data connections are closed. \
 *close\_arg* The user argument that will be threaded through to close\_callback\_func.

References GLOBUS\_FTP\_CONTROL\_MODULE.

## Author

Generated automatically by Doxygen for globus ftp control from the source code.
