]>
git.proxmox.com Git - mirror_spl.git/blob - include/splat-ctl.h
2 * This file is part of the SPL: Solaris Porting Layer.
4 * Copyright (c) 2008 Lawrence Livermore National Security, LLC.
5 * Produced at Lawrence Livermore National Laboratory
7 * Brian Behlendorf <behlendorf1@llnl.gov>,
8 * Herb Wartens <wartens2@llnl.gov>,
9 * Jim Garlick <garlick@llnl.gov>
12 * This is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
17 * This is distributed in the hope that it will be useful, but WITHOUT
18 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 * You should have received a copy of the GNU General Public License along
23 * with this program; if not, write to the Free Software Foundation, Inc.,
24 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
30 /* Contains shared definitions which both the userspace
31 * and kernelspace portions of splat must agree on.
34 #define SPLAT_MAJOR 229 /* XXX - Arbitrary */
35 #define SPLAT_MINORS 1
36 #define SPLAT_NAME "splatctl"
37 #define SPLAT_DEV "/dev/splatctl"
39 #define SPLAT_NAME_SIZE 16
40 #define SPLAT_DESC_SIZE 60
42 typedef struct splat_user
{
43 char name
[SPLAT_NAME_SIZE
]; /* short name */
44 char desc
[SPLAT_DESC_SIZE
]; /* short description */
45 int id
; /* unique numeric id */
48 #define SPLAT_CFG_MAGIC 0x15263748U
49 typedef struct splat_cfg
{
50 unsigned int cfg_magic
; /* Unique magic */
51 int cfg_cmd
; /* Config command */
52 int cfg_arg1
; /* Config command arg 1 */
53 int cfg_rc1
; /* Config response 1 */
57 splat_user_t descs
[0];
61 splat_user_t descs
[0];
66 #define SPLAT_CMD_MAGIC 0x9daebfc0U
67 typedef struct splat_cmd
{
68 unsigned int cmd_magic
; /* Unique magic */
69 int cmd_subsystem
; /* Target subsystem */
70 int cmd_test
; /* Subsystem test */
71 int cmd_data_size
; /* Extra opaque data */
72 char cmd_data_str
[0]; /* Opaque data region */
76 #define SPLAT_CFG _IOWR('f', 101, long)
77 #define SPLAT_CMD _IOWR('f', 102, long)
79 /* Valid configuration commands */
80 #define SPLAT_CFG_BUFFER_CLEAR 0x001 /* Clear text buffer */
81 #define SPLAT_CFG_BUFFER_SIZE 0x002 /* Resize text buffer */
82 #define SPLAT_CFG_SUBSYSTEM_COUNT 0x101 /* Number of subsystem */
83 #define SPLAT_CFG_SUBSYSTEM_LIST 0x102 /* List of N subsystems */
84 #define SPLAT_CFG_TEST_COUNT 0x201 /* Number of tests */
85 #define SPLAT_CFG_TEST_LIST 0x202 /* List of N tests */
87 /* Valid subsystem and test commands defined in each subsystem, we do
88 * need to be careful to avoid colisions. That alone may argue to define
89 * them all here, for now we just define the global error codes.
91 #define SPLAT_SUBSYSTEM_UNKNOWN 0xF00
92 #define SPLAT_TEST_UNKNOWN 0xFFF
94 #endif /* _SPLAT_CTL_H */