4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #ifndef _SYS_CRYPTO_IOCTLADMIN_H
28 #define _SYS_CRYPTO_IOCTLADMIN_H
34 #include <sys/zfs_context.h>
35 #include <sys/crypto/common.h>
37 #define ADMIN_IOCTL_DEVICE "/dev/cryptoadm"
39 #define CRYPTOADMIN(x) (('y' << 8) | (x))
42 * Administrative IOCTLs
45 typedef struct crypto_get_dev_list {
46 uint_t dl_return_value;
48 crypto_dev_list_entry_t dl_devs[1];
49 } crypto_get_dev_list_t;
51 typedef struct crypto_get_soft_list {
52 uint_t sl_return_value;
55 caddr_t sl_soft_names;
56 } crypto_get_soft_list_t;
58 typedef struct crypto_get_dev_info {
59 uint_t di_return_value;
60 char di_dev_name[MAXNAMELEN];
61 uint_t di_dev_instance;
63 crypto_mech_name_t di_list[1];
64 } crypto_get_dev_info_t;
66 typedef struct crypto_get_soft_info {
67 uint_t si_return_value;
68 char si_name[MAXNAMELEN];
70 crypto_mech_name_t si_list[1];
71 } crypto_get_soft_info_t;
73 typedef struct crypto_load_dev_disabled {
74 uint_t dd_return_value;
75 char dd_dev_name[MAXNAMELEN];
76 uint_t dd_dev_instance;
78 crypto_mech_name_t dd_list[1];
79 } crypto_load_dev_disabled_t;
81 typedef struct crypto_load_soft_disabled {
82 uint_t sd_return_value;
83 char sd_name[MAXNAMELEN];
85 crypto_mech_name_t sd_list[1];
86 } crypto_load_soft_disabled_t;
88 typedef struct crypto_unload_soft_module {
89 uint_t sm_return_value;
90 char sm_name[MAXNAMELEN];
91 } crypto_unload_soft_module_t;
93 typedef struct crypto_load_soft_config {
94 uint_t sc_return_value;
95 char sc_name[MAXNAMELEN];
97 crypto_mech_name_t sc_list[1];
98 } crypto_load_soft_config_t;
100 typedef struct crypto_load_door {
101 uint_t ld_return_value;
103 } crypto_load_door_t;
108 typedef struct crypto_get_soft_list32 {
109 uint32_t sl_return_value;
110 uint32_t sl_soft_count;
111 size32_t sl_soft_len;
112 caddr32_t sl_soft_names;
113 } crypto_get_soft_list32_t;
115 #endif /* _SYSCALL32 */
118 #define CRYPTO_GET_VERSION CRYPTOADMIN(1)
119 #define CRYPTO_GET_DEV_LIST CRYPTOADMIN(2)
120 #define CRYPTO_GET_SOFT_LIST CRYPTOADMIN(3)
121 #define CRYPTO_GET_DEV_INFO CRYPTOADMIN(4)
122 #define CRYPTO_GET_SOFT_INFO CRYPTOADMIN(5)
123 #define CRYPTO_LOAD_DEV_DISABLED CRYPTOADMIN(8)
124 #define CRYPTO_LOAD_SOFT_DISABLED CRYPTOADMIN(9)
125 #define CRYPTO_UNLOAD_SOFT_MODULE CRYPTOADMIN(10)
126 #define CRYPTO_LOAD_SOFT_CONFIG CRYPTOADMIN(11)
127 #define CRYPTO_POOL_CREATE CRYPTOADMIN(12)
128 #define CRYPTO_POOL_WAIT CRYPTOADMIN(13)
129 #define CRYPTO_POOL_RUN CRYPTOADMIN(14)
130 #define CRYPTO_LOAD_DOOR CRYPTOADMIN(15)
136 #endif /* _SYS_CRYPTO_IOCTLADMIN_H */