The Bottom Layer Functions

There are five bottom layer functions for a stream: read, write, flush, seek and close. However, not all of these functions are needed for every stream:

These functions usually only operate on the specific fields of a particular user-defined stream. (i.e. Fields other than the first field in a user-defined stream structure.) The errno field and magic field in QP_stream part may also be maintained by the bottom layer functions. The mode field and max_reclen field are also typically accessed by the bottom layer functions.

Except for the read function, all the bottom layer functions return QP_SUCCESS upon success, and return QP_ERROR and assign an error code to the errno field upon failure. These functions are described further in subsequent sub-sections.