root/include/linux/random.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  * include/linux/random.h
   3  *
   4  * Include file for the random number generator.
   5  */
   6 
   7 #ifndef _LINUX_RANDOM_H
   8 #define _LINUX_RANDOM_H
   9 
  10 /* ioctl()'s for the random number generator */
  11 
  12 #define RNDGETENTCNT    0x01080000
  13 #define RNDADDTOENTCNT  0x01080001
  14 #define RNDGETPOOL      0x01080002
  15 
  16 struct rand_pool_state {
  17         int     entropy_count;
  18         int     pool_size;
  19         __u32   pool[0];
  20 };
  21 
  22 /* Exported functions */
  23 
  24 #ifdef __KERNEL__
  25 
  26 void rand_initialize(void);
  27 void rand_initialize_irq(int irq);
  28 void rand_initialize_blkdev(int irq);
  29 
  30 void add_keyboard_randomness(unsigned char scancode);
  31 void add_mouse_randomness(__u32 mouse_data);
  32 void add_interrupt_randomness(int irq);
  33 void add_blkdev_randomness(int major);
  34 
  35 void get_random_bytes(void *buf, int nbytes);
  36 int read_random(struct inode * inode, struct file * file,
  37                 char * buf, int nbytes);
  38 int read_random_unlimited(struct inode * inode, struct file * file,
  39                           char * buf, int nbytes);
  40 int write_random(struct inode * inode, struct file * file,
  41                  const char * buffer, int count);
  42 int random_ioctl(struct inode * inode, struct file * file,
  43                  unsigned int cmd, unsigned long arg);
  44 
  45 #endif /* __KERNEL___ */
  46 
  47 #endif /* _LINUX_RANDOM_H */

/* [previous][next][first][last][top][bottom][index][help] */