9815 Want basic AHCI enclosure services
[unleashed.git] / usr / src / uts / common / sys / ipd.h
blobbad74f8b8103fb4d8c854f19f2934a0e31c87248
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
23 * Copyright (c) 2012, Joyent, Inc. All rights reserved.
27 * These definitions are private to ipd and ipdadm.
30 #ifndef _SYS_IPD_H
31 #define _SYS_IPD_H
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
37 #define IPD_DEV_PATH "/dev/ipd"
38 #define IPD_MAX_DELAY 10000 /* 10 ms in us */
40 typedef struct ipd_ioc_perturb {
41 zoneid_t ipip_zoneid;
42 uint32_t ipip_arg;
43 } ipd_ioc_perturb_t;
45 typedef struct ipd_ioc_info {
46 zoneid_t ipii_zoneid;
47 uint32_t ipii_corrupt;
48 uint32_t ipii_drop;
49 uint32_t ipii_delay;
50 } ipd_ioc_info_t;
52 #ifdef _KERNEL
54 typedef struct ipd_ioc_list32 {
55 uint_t ipil_nzones;
56 caddr32_t ipil_info;
57 } ipd_ioc_list32_t;
59 #endif /* _KERNEL */
61 typedef struct ipd_ioc_list {
62 uint_t ipil_nzones;
63 ipd_ioc_info_t *ipil_info;
64 } ipd_ioc_list_t;
66 #define IPD_CORRUPT 0x1
67 #define IPD_DELAY 0x2
68 #define IPD_DROP 0x4
70 #define IPDIOC (('i' << 24) | ('p' << 16) | ('d' << 8))
71 #define IPDIOC_CORRUPT (IPDIOC | 1) /* disable ipd */
72 #define IPDIOC_DELAY (IPDIOC | 2) /* disable ipd */
73 #define IPDIOC_DROP (IPDIOC | 3) /* disable ipd */
74 #define IPDIOC_LIST (IPDIOC | 4) /* enable ipd */
75 #define IPDIOC_REMOVE (IPDIOC | 5) /* disable ipd */
77 #ifdef __cplusplus
79 #endif
81 #endif /* _SYS_IPD_H */