Elliott Hughes | 180edef | 2023-11-02 00:08:05 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is auto-generated. Modifications will be lost. |
| 3 | * |
| 4 | * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ |
| 5 | * for more information. |
| 6 | */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 7 | #ifndef _UAPI_LINUX_RANDOM_H |
| 8 | #define _UAPI_LINUX_RANDOM_H |
| 9 | #include <linux/types.h> |
| 10 | #include <linux/ioctl.h> |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 11 | #include <linux/irqnr.h> |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 12 | #define RNDGETENTCNT _IOR('R', 0x00, int) |
| 13 | #define RNDADDTOENTCNT _IOW('R', 0x01, int) |
| 14 | #define RNDGETPOOL _IOR('R', 0x02, int[2]) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 15 | #define RNDADDENTROPY _IOW('R', 0x03, int[2]) |
| 16 | #define RNDZAPENTCNT _IO('R', 0x04) |
| 17 | #define RNDCLEARPOOL _IO('R', 0x06) |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 18 | #define RNDRESEEDCRNG _IO('R', 0x07) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 19 | struct rand_pool_info { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 20 | int entropy_count; |
| 21 | int buf_size; |
Christopher Ferris | 7447a1c | 2022-10-04 18:24:44 -0700 | [diff] [blame] | 22 | __u32 buf[]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 23 | }; |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 24 | #define GRND_NONBLOCK 0x0001 |
| 25 | #define GRND_RANDOM 0x0002 |
Christopher Ferris | bb9fcb4 | 2020-04-06 11:38:04 -0700 | [diff] [blame] | 26 | #define GRND_INSECURE 0x0004 |
Nick Kralevich | a67e4de | 2013-01-14 11:28:26 -0800 | [diff] [blame] | 27 | #endif |