Chapter 3. Data Structures and Program Flow

3.1. Overview

The 1394 subsystem in Linux is divided into the classical three layers, like most other interface subsystems in Linux. The in-kernel subsystem consists of the ieee1394 core, which provides basic services like handling of the 1394 protocol (converting the abstract transactions into packets and back), collecting information about bus and nodes and providing some services to the bus that are required to be available for standards conformant nodes (e.g. CSR registers). Below that are the hardware drivers, which handle converting packets and bus events to and from hardware accesses on specific 1394 chipsets.

Above the core are the highlevel drivers, which use the services provided by the core to implement protocols for certain devices and act as drivers to these. raw1394 is one such driver, however it is not specialized to handle one kind of device but is designed to accept commands from user space to do any transaction wanted (as far as possible from current core design). Using raw1394, normal applications can access 1394 nodes on the bus and it is not neccessary to write kernel code just for that.

raw1394 communicates to user space like most device drivers do, through device files in /dev. It uses a defined protocol on that device, but applications don't have to and should not care about that. All of this is taken care of by libraw1394, which provides a set of functions that convert to and from raw1394 protocol packets and are a lot easier to handle than that underlying protocol.