random.h (13057) | random.h (13099) |
---|---|
1/* 2 * random.h -- A strong random number generator 3 * 4 * $Id$ 5 * 6 * Version 0.95, last modified 18-Oct-95 7 * 8 * Copyright Theodore Ts'o, 1994, 1995. All rights reserved. --- 38 unchanged lines hidden (view full) --- 47 * 48 */ 49 50#ifndef _MACHINE_RANDOM_H_ 51#define _MACHINE_RANDOM_H_ 1 52 53#if defined(KERNEL) 54#include <i386/isa/icu.h> | 1/* 2 * random.h -- A strong random number generator 3 * 4 * $Id$ 5 * 6 * Version 0.95, last modified 18-Oct-95 7 * 8 * Copyright Theodore Ts'o, 1994, 1995. All rights reserved. --- 38 unchanged lines hidden (view full) --- 47 * 48 */ 49 50#ifndef _MACHINE_RANDOM_H_ 51#define _MACHINE_RANDOM_H_ 1 52 53#if defined(KERNEL) 54#include <i386/isa/icu.h> |
55#include <i386/isa/isa_device.h> |
|
55#endif 56#include <sys/ioctl.h> 57 58#define MEM_SETIRQ _IOW('r', 1, u_int16_t) /* set interrupt */ 59#define MEM_CLEARIRQ _IOW('r', 2, u_int16_t) /* clear interrupt */ 60#define MEM_RETURNIRQ _IOR('r', 3, u_int16_t) /* return interrupt */ 61 62#if defined(KERNEL) 63 64/* Interrupts to be used in the randomising process */ 65 66extern inthand2_t *sec_intr_handler[ICU_LEN]; 67extern int sec_intr_unit[ICU_LEN]; 68 69/* Exported functions */ 70 71void rand_initialize(void); 72void add_keyboard_randomness(u_char scancode); 73void add_interrupt_randomness(int irq); | 56#endif 57#include <sys/ioctl.h> 58 59#define MEM_SETIRQ _IOW('r', 1, u_int16_t) /* set interrupt */ 60#define MEM_CLEARIRQ _IOW('r', 2, u_int16_t) /* clear interrupt */ 61#define MEM_RETURNIRQ _IOR('r', 3, u_int16_t) /* return interrupt */ 62 63#if defined(KERNEL) 64 65/* Interrupts to be used in the randomising process */ 66 67extern inthand2_t *sec_intr_handler[ICU_LEN]; 68extern int sec_intr_unit[ICU_LEN]; 69 70/* Exported functions */ 71 72void rand_initialize(void); 73void add_keyboard_randomness(u_char scancode); 74void add_interrupt_randomness(int irq); |
75#ifdef notused |
|
74void add_blkdev_randomness(int major); | 76void add_blkdev_randomness(int major); |
77#endif |
|
75 | 78 |
79#ifdef notused |
|
76void get_random_bytes(void *buf, u_int nbytes); | 80void get_random_bytes(void *buf, u_int nbytes); |
81#endif |
|
77u_int read_random(char *buf, u_int size); 78u_int read_random_unlimited(char *buf, u_int size); | 82u_int read_random(char *buf, u_int size); 83u_int read_random_unlimited(char *buf, u_int size); |
84#ifdef notused |
|
79u_int write_random(const char *buf, u_int nbytes); | 85u_int write_random(const char *buf, u_int nbytes); |
86#endif |
|
80 81#endif 82 83#endif | 87 88#endif 89 90#endif |