next up previous contents
Next: Simple API Up: Introduction Previous: Cyclic log commands   Contents

Machine-independent structure

Cyclic logs are files with a special structure: they are created to be of a certain user-specifyable size and never grow beyond that size. They have header information at the beginning to say where the data begins and ends.

Cyclic logs may contain ASCII but on the other hand they may not. It depends what the user wants to put into them. Thus, there is no concept of a record in a cyclic log. it is just a byte buffer that wraps around.

The cyclic log header contains an identifier that identifies the file to be a cyclic logfile. Thus the commands that manipulate cyclic logs can detect when they are being asked to look at a file that is not a cyclic log (in which case they give an appropriate error message).

The cyclic log header contains a revision number. This is used to identify which version of the cyclic log software created the file. This allows the structure of a cyclic log to change in the future whilst retaining backward compatibility.

The numeric data in the cyclic log header such as the revision number and start/end of data pointers, is held in non-machine dependant form. This allows a logfile created on one architecture to be transferred read on a machine with a different architecture.


next up previous contents
Next: Simple API Up: Introduction Previous: Cyclic log commands   Contents
Andrew Marlow 2004-01-01