blob: d1fd9984e70fc21e0a651ae61939b5296d87abd8 [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
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 Cheng655a7c02013-10-16 16:09:24 -07007#ifndef _UAPI_LINUX_RANDOM_H
8#define _UAPI_LINUX_RANDOM_H
9#include <linux/types.h>
10#include <linux/ioctl.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070011#include <linux/irqnr.h>
Tao Baod7db5942015-01-28 10:07:51 -080012#define RNDGETENTCNT _IOR('R', 0x00, int)
13#define RNDADDTOENTCNT _IOW('R', 0x01, int)
14#define RNDGETPOOL _IOR('R', 0x02, int[2])
Tao Baod7db5942015-01-28 10:07:51 -080015#define RNDADDENTROPY _IOW('R', 0x03, int[2])
16#define RNDZAPENTCNT _IO('R', 0x04)
17#define RNDCLEARPOOL _IO('R', 0x06)
Christopher Ferris76a1d452018-06-27 14:12:29 -070018#define RNDRESEEDCRNG _IO('R', 0x07)
Ben Cheng655a7c02013-10-16 16:09:24 -070019struct rand_pool_info {
Tao Baod7db5942015-01-28 10:07:51 -080020 int entropy_count;
21 int buf_size;
Christopher Ferris7447a1c2022-10-04 18:24:44 -070022 __u32 buf[];
Ben Cheng655a7c02013-10-16 16:09:24 -070023};
Christopher Ferris82d75042015-01-26 10:57:07 -080024#define GRND_NONBLOCK 0x0001
25#define GRND_RANDOM 0x0002
Christopher Ferrisbb9fcb42020-04-06 11:38:04 -070026#define GRND_INSECURE 0x0004
Nick Kralevicha67e4de2013-01-14 11:28:26 -080027#endif