Each source has a state structure which the kernel uses to hold the timing information and other state for that source.
typedef struct {
char name[16];
uint32_t last_time;
uint32_t last_delta;
uint32_t last_delta2;
uint32_t total;
uint32_t type;
uint32_t flags;
} rndsource_t;
This structure holds the internal representation of a device's timing state. The
name field holes the device name, as known to the kernel. The
last_time entry is the timestamp of the last time this device generated an event. It is for internal use only, and not in any specific representation. The
last_delta and
last_delta2 fields hold the last first- and second-order deltas. The
total field holds a count of how many bits this device has potentially generated. This is not the same as how many bits were used from it. The
type field holds the device type.
Currently, these types are defined:
RND_TYPE_DISK
The device is a physical hard drive.
RND_TYPE_NET
The device is a network interface. By default, timing information is collected from this source type, but entropy is not estimated.
RND_TYPE_TAPE
The device is a tape device.
RND_TYPE_TTY
The device is a terminal, mouse, or other user input device.
RND_TYPE_RNG
The device is a random number generator.
flags is a bitfield.
RND_FLAG_NO_ESTIMATE
Do not assume any entropy is in the timing information.
RND_FLAG_NO_COLLECT
Do not even add timing information to the pool.