]>
git.proxmox.com Git - mirror_spl.git/blob - include/splat-ctl.h
4 /* Contains shared definitions which both the userspace
5 * and kernelspace portions of splat must agree on.
8 #define SPLAT_MAJOR 229 /* XXX - Arbitrary */
10 #define SPLAT_DEV "/dev/splatctl"
12 #define SPLAT_NAME_SIZE 12
13 #define SPLAT_DESC_SIZE 60
15 typedef struct splat_user
{
16 char name
[SPLAT_NAME_SIZE
]; /* short name */
17 char desc
[SPLAT_DESC_SIZE
]; /* short description */
18 int id
; /* unique numeric id */
21 #define SPLAT_CFG_MAGIC 0x15263748U
22 typedef struct splat_cfg
{
23 unsigned int cfg_magic
; /* Unique magic */
24 int cfg_cmd
; /* Config command */
25 int cfg_arg1
; /* Config command arg 1 */
26 int cfg_rc1
; /* Config response 1 */
30 splat_user_t descs
[0];
34 splat_user_t descs
[0];
39 #define SPLAT_CMD_MAGIC 0x9daebfc0U
40 typedef struct splat_cmd
{
41 unsigned int cmd_magic
; /* Unique magic */
42 int cmd_subsystem
; /* Target subsystem */
43 int cmd_test
; /* Subsystem test */
44 int cmd_data_size
; /* Extra opaque data */
45 char cmd_data_str
[0]; /* Opaque data region */
49 #define SPLAT_CFG _IOWR('f', 101, long)
50 #define SPLAT_CMD _IOWR('f', 102, long)
52 /* Valid configuration commands */
53 #define SPLAT_CFG_BUFFER_CLEAR 0x001 /* Clear text buffer */
54 #define SPLAT_CFG_BUFFER_SIZE 0x002 /* Resize text buffer */
55 #define SPLAT_CFG_SUBSYSTEM_COUNT 0x101 /* Number of subsystem */
56 #define SPLAT_CFG_SUBSYSTEM_LIST 0x102 /* List of N subsystems */
57 #define SPLAT_CFG_TEST_COUNT 0x201 /* Number of tests */
58 #define SPLAT_CFG_TEST_LIST 0x202 /* List of N tests */
60 /* Valid subsystem and test commands defined in each subsystem, we do
61 * need to be careful to avoid colisions. That alone may argue to define
62 * them all here, for now we just define the global error codes.
64 #define SPLAT_SUBSYSTEM_UNKNOWN 0xF00
65 #define SPLAT_TEST_UNKNOWN 0xFFF
67 #endif /* _SPLAT_CTL_H */