FTAM/9000 Programmer's Guide
Chapter 2 61
Using HP FTAM/9000
Using Parameters
Data Control Blocks
Data control blocks (DCBs) are C structures used as function parameters
to pass information between your application and the FTAM interface.
Most FTAM functions use both an input_dcb and an inout_dcb.
input_dcb
The values used within input_dcb depend on the function requirements.
If any of the input_dcb parameters are mandatory, you must pass a
non-NULL address of an input_dcb; otherwise, you can pass a NULL
value.
You can allocate memory for the input_dcb two ways.
• Allocate the memory yourself (e.g., using malloc() or by using
variables).
• Before the request, invoke ft_didcb() to allocate memory for
input_dcb. After the request completes, invoke ft_dfdcb() to free the
memory used by input_dcb.
After the function call returns, you can immediately reclaim or reuse
memory occupied by input_dcb.
inout_dcb
Use the inout_dcb to obtain output information in the user program.
When passing the inout_dcb to the interface, you must pass an address
that references either a non-NULL or NULL value.
Except for size, all parameters in the inout_dcb are output parameters.
Note, however, some output parameters are exposed rather than being
part of the inout_dcb (e.g., connection_id on the ft_connect() function
call).
The size and result fields are always present in the inout_dcb. Other
inout_dcb fields may be present, depending on the function.
input_dcb Contains only function input parameters.
inout_dcb Contains parameters used for both input and output, and
parameters used for output only.