The read system call returns the number of log records (in bytes) that fit in the user supplied buffer, or at most the number of messages available in the log. Reading from the device resets the log by the number of log records read.
For each message sent a log record is kept, containing a timestamp (in clock ticks), its source and destination. These are available in the following structure:
struct logent {
clock_t timestamp; /* time stamp */
unsigned entno; /* log entry number */
int src, dst; /* source and destination */
};
This structure contains the time the message was sent in clock ticks elapsed since boot time, its log entry number (numbered from the start of the system), its source and destination. Reads from the msglog device should be aligned by ``struct logent''.