IOCINFO

This IOCTL command provides access to information about the tape or medium changer device. It is a standard AIX® IOCTL function.

An example of the IOCINFO command is
#include <sys/devinfo.h>
#include <sys/Atape.h>
struct devinfo info;

if (!ioctl (fd, IOCINFO, &info))
    {
        printf ("The IOCINFO ioctl succeeded\n");
    }
    else
    {
        perror ("The IOCINFO ioctl failed");
    }
An example of the output data structure for a tape drive rmt* special file is
info.devtype=DD_SCTAPE
info.devsubtype=ATAPE_3590
info.un.scmt.type=DT_STREAM
info.un.scmt.blksize=tape block size (0=variable)
An example of the output data structure for an integrated medium changer rmt*.smc special file is
info.devtype=DD_MEDIUM_CHANGER;
info.devsubtype=ATAPE_3590;
An example of the output data structure for an independent medium changer smc* special file is
info.devtype=DD_MEDIUM_CHANGER;
info.devsubtype=ATAPE_7337;

See the Atape.h header file for the defined devsubstype values.