blob: 7bff0b005f6b65c41757ae7c4f563cf32aacaac3 [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 */
Christopher Ferris37c3f3c2023-07-10 10:59:05 -07007#ifndef _UAPI_LINUX_USER_EVENTS_H
8#define _UAPI_LINUX_USER_EVENTS_H
9#include <linux/types.h>
10#include <linux/ioctl.h>
11#define USER_EVENTS_SYSTEM "user_events"
12#define USER_EVENTS_PREFIX "u:"
13#define DYN_LOC(offset,size) ((size) << 16 | (offset))
Christopher Ferris0f795212024-01-17 14:17:28 -080014enum user_reg_flag {
15 USER_EVENT_REG_PERSIST = 1U << 0,
16 USER_EVENT_REG_MAX = 1U << 1,
17};
Christopher Ferris37c3f3c2023-07-10 10:59:05 -070018struct user_reg {
19 __u32 size;
20 __u8 enable_bit;
21 __u8 enable_size;
22 __u16 flags;
23 __u64 enable_addr;
24 __u64 name_args;
25 __u32 write_index;
26} __attribute__((__packed__));
27struct user_unreg {
28 __u32 size;
29 __u8 disable_bit;
30 __u8 __reserved;
31 __u16 __reserved2;
32 __u64 disable_addr;
33} __attribute__((__packed__));
34#define DIAG_IOC_MAGIC '*'
35#define DIAG_IOCSREG _IOWR(DIAG_IOC_MAGIC, 0, struct user_reg *)
36#define DIAG_IOCSDEL _IOW(DIAG_IOC_MAGIC, 1, char *)
37#define DIAG_IOCSUNREG _IOW(DIAG_IOC_MAGIC, 2, struct user_unreg *)
38#endif