blob: 37bf66b60aee28e937c93706fcb4599334d3e352 [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"
Christopher Ferris7f4c8372024-06-03 14:22:19 -070012#define USER_EVENTS_MULTI_SYSTEM "user_events_multi"
Christopher Ferris37c3f3c2023-07-10 10:59:05 -070013#define USER_EVENTS_PREFIX "u:"
14#define DYN_LOC(offset,size) ((size) << 16 | (offset))
Christopher Ferris0f795212024-01-17 14:17:28 -080015enum user_reg_flag {
16 USER_EVENT_REG_PERSIST = 1U << 0,
Christopher Ferris7f4c8372024-06-03 14:22:19 -070017 USER_EVENT_REG_MULTI_FORMAT = 1U << 1,
18 USER_EVENT_REG_MAX = 1U << 2,
Christopher Ferris0f795212024-01-17 14:17:28 -080019};
Christopher Ferris37c3f3c2023-07-10 10:59:05 -070020struct user_reg {
21 __u32 size;
22 __u8 enable_bit;
23 __u8 enable_size;
24 __u16 flags;
25 __u64 enable_addr;
26 __u64 name_args;
27 __u32 write_index;
28} __attribute__((__packed__));
29struct user_unreg {
30 __u32 size;
31 __u8 disable_bit;
32 __u8 __reserved;
33 __u16 __reserved2;
34 __u64 disable_addr;
35} __attribute__((__packed__));
36#define DIAG_IOC_MAGIC '*'
37#define DIAG_IOCSREG _IOWR(DIAG_IOC_MAGIC, 0, struct user_reg *)
38#define DIAG_IOCSDEL _IOW(DIAG_IOC_MAGIC, 1, char *)
39#define DIAG_IOCSUNREG _IOW(DIAG_IOC_MAGIC, 2, struct user_unreg *)
40#endif