User Guide
5-38  Ampex 1308911-02
Model No.
Running Head
dst_getpos libdd2 API Functions
5.10 dst_getpos 
NAME 
dst_getpos() - get current position.
SYNOPSIS 
#include <dd2.h> 
 int dst_getpos(int fd, dst_position_st *pos); 
DESCRIPTION 
dst_getpos() reports the current tape drive position in token or structure form. This is the data 
block address at which the next read or write operation occurs.
The position returned by dst_getpos() does not necessarily reflect the actual physical tape 
head position. For example, if there is data in the tape drive buffer that has not yet been written 
to tape, dst_getpos() returns the next buffer position, not the current tape head position. If you 
need the actual physical position, use the dst_status() function, which also returns other 
position-related information such as number of unsynchronized bytes in the tape drive data 
buffer and the remaining capacity of the current partition.
dst_getpos() is available to all users.
PARAMETERS
fd The file descriptor returned by the open call.
*pos Pointer to a structure of type
 dst_position_st.
USAGE
dst_getpos() uses the *pos structure for both input and output.
• On input, the type member defines the position specification to be retrieved from the 
drive; see “DST API Overview” on page 5-1 for details. 
• On successful return, the pos member contains the position specification which 
indicates the current position of the drive. If the specification is in structure form, the
valid bit mask specifies which members contain valid information.
typedef struct
{
dst_pos_type_en type; /* Position type */
dst_position_un pos; /* Position */










