xpci3xxx: xPCI3xxx IOCTL API

xpci3xxx 1.00.00

xPCI3xxx IOCTL API

$MainRevision: $

# Introduction

The xpci3xxx Linux driver supports the following boards:

- apci3003
- apci3002
- apci3116
- apci3110
- apci3106
- apci3100
- apci3016
- apci3110
- apci3106
- apci3100
- apci3016
- apci3010
- apci3006
- apci3000
- apci3500
- apci3002
- apci3501
- apcie3121
- apcie3126

This document describes the IOCTL interface provided by the xPCI3xxx driver for normal applications.

## IOCTL commands

ioctl() is a function which takes three arguments:

- a file descriptor, which corresponds to a device
- a command, specific to the device
- a pointer to memory, which contains the arguments for the command. This argument differs from one command to the other.

Usually, on success zero is returned, on error, -1 is returned, and errno is set appropriately. Commands may also return a positive error value, whose signification is to be found in the command documentation.

A typical use could be:

    inf fd = open( ... );
    if ( -1 == ioctl(fd, CMD_...,  ) )
        perror("ioctl");
    close(fd);

## Where to find more information?

The chapter "Modules" contains a detailed description of the commands, with parameter and return value.
The driver comes also with a set of samples, which exemplifies the use of the IOCTL commands.

For each C function, such as ioctl(), there is documentation available in the form of "man pages". Try in the console

    $ man ioctl

to know if the relevant documentation package is already installed.

The installation procedure differs form one distribution to another. For instance, for Debian/Ubuntu, it is

    $ apt-get install manpages-dev