
--- IEEE1394 Application Programming Interface Specification ---
--- Adaptec Inc. Confidential ---
7/9/97
2
1.0 Introduction
The IEEE1394 Application Programming Interface (PAPI) allows developers to write applications that
control a IEEE1394 node / device directly.
To use PAPI for Win32 the three functions listed in the next section must be imported from wnpapi32.dll
into the client’s application.
Function Description
GetPAPISupportInfo This function returns the total number of IEEE1394 host adapters installed and
ensures that the PAPI manager is initialized properly.
SendPAPICommand This function handles IEEE1394 I/O requests.
BusConfig Get or Set IEEE1394 and host adapter configuration
The PAPI Manager for Win32 is implemented as a Dynamic Link Library (DLL) named wnpapi32.dll and
wn1394.sys for WinNT. PAPI functions are used to retrieve information about IEEE1394 Host Adapters
and devices and to execute IEEE1394 I/O requests.
PAPI consists of three major API functions. GetPAPISupportInfo is used to determine the number of
IEEE1394 host adapters found. SendPAPICommand and BusConfig have several subcommands.
BusConfig commands are executed by filling in and sending down SBC packets, SendPAPICommands are
executed by sending down PRBs. If a command is to be executed asynchronously an event has to be
specified in the command packet, PRB or SBC, that will be signaled upon completion of the command.
Devices on the 1394 bus(es) are accessed using handles. A client must get a handle to a specific device by
calling BusConfig with command field set to P_GET_HANDLE and the node ID field set to the nodeID of
the target device. Handles are used instead of node Ids because Node Ids can potentially change when Bus
Resets occur.
The HaNum field in the header of every PAPI packet represents the Host adapter number in a multiple host
adapter situation. There is an assumption made and that is that two host adapters in the same system are
not on the same 1394 bus.
All PAPI commands except fot GetPAPISupportInfo have a common header, this header contains fields
for sub-commands that an application specifies what it wants to perform, BusId or Host Adapter number
to which the intended node is attached to, Device handle which basically address the specific node and a
status field that PAPI returns. Each command has its own set of possible status values that PAPI would
return and these are specified within each command description below.