User Guide

2-6 Ampex 1308911-02
Model No.
Running Head
libdd2 API Overview Software Overview
2.4.1 Operation of libdd2
The libdd2 API layer packages SCSI tape drive commands as C functions, isolating the caller
from the device driver layer. C programs that use the libdd2 API normally use the C
preprocessor
#include directive to include the following header file.
dd2.h Contains the libdd2 function prototypes and provides several useful
definitions such as the DST_SPACE type argument. To use any dd2
function, include the following statement:
#include <dd2.h>.
In addition to the above DST tape device driver header file, some of the system calls require
inclusion of standard system header files. Any such files are shown in the syntax section for
each system call.
The DST tape device driver header files are normally installed in the
/usr/include/sys
directory. To use any dd2 functions, include the following statment:
#include <dd2.h>
To link your application, reference the libdd2 library in /user/lib.
2.4.2 Function Return Values
All libdd2 C-Library functions return either DST_SUCCESS (0) or DST_FAILURE (-1).
2.4.3 Errors
See “Return Values” on page 5-7 for information on libdd2 error reporting.
2.4.4 UNIX Platform Compatibility
Unless noted otherwise, all libdd2 functions operate consistently across supported platforms.
See the on line release notes installed with the libdd2 API to find out which version of the DST
device driver it is compatible with.
2.4.5 Restrictions
Some of the libdd2 API functions are restricted for use by the root user only. The manual page
for each libdd2 function notes any such restriction.