RANDOM

This is the interface for accessing random number generator devices.

Details

define RANDOM_VERSION

define RANDOM_IOC_CHAR

define I_RANDOM_GETVERSION

define I_RANDOM_GETINFO

This request reads the random generator information.

Example:

random_info_t info;
ioctl(fildes, I_RANDOM_GETINFO, &info);

define I_RANDOM_SETATTR

Requests the hardware to write the random generator attributes.

Example:

random_attr_t attr;
attr.o_flags = RANDOM_FLAG_SET_SEED;
attr.seed = 10;
ioctl(fildes, I_RANDOM_SETATTR, &attr);

enum @25
  • RANDOM_FLAG_SET_SEED Set the seed using I_RANDOM_SETATTR
  • RANDOM_FLAG_IS_PSEUDO Set in info flags is generator is pseudorandom
  • RANDOM_FLAG_IS_TRUE Set in info flags is generator is a true random number generator
  • RANDOM_FLAG_ENABLE Enables the random number generator
  • RANDOM_FLAG_DISABLE Disables the random number generator

struct::random_info_t

u32 o_flags

Bitwise flags

u32 resd

struct::random_attr_t

u32 o_flags

Bitwise flags

u32 seed

Seed value when setting seed

u32 resd

X

Thanks for Coming!

Subscribe to news and updates