1*25e8c5aaSvikram /* 2*25e8c5aaSvikram * CDDL HEADER START 3*25e8c5aaSvikram * 4*25e8c5aaSvikram * The contents of this file are subject to the terms of the 5*25e8c5aaSvikram * Common Development and Distribution License (the "License"). 6*25e8c5aaSvikram * You may not use this file except in compliance with the License. 7*25e8c5aaSvikram * 8*25e8c5aaSvikram * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*25e8c5aaSvikram * or http://www.opensolaris.org/os/licensing. 10*25e8c5aaSvikram * See the License for the specific language governing permissions 11*25e8c5aaSvikram * and limitations under the License. 12*25e8c5aaSvikram * 13*25e8c5aaSvikram * When distributing Covered Code, include this CDDL HEADER in each 14*25e8c5aaSvikram * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*25e8c5aaSvikram * If applicable, add the following below this CDDL HEADER, with the 16*25e8c5aaSvikram * fields enclosed by brackets "[]" replaced with your own identifying 17*25e8c5aaSvikram * information: Portions Copyright [yyyy] [name of copyright owner] 18*25e8c5aaSvikram * 19*25e8c5aaSvikram * CDDL HEADER END 20*25e8c5aaSvikram */ 21*25e8c5aaSvikram /* 22*25e8c5aaSvikram * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 23*25e8c5aaSvikram * Use is subject to license terms. 24*25e8c5aaSvikram */ 25*25e8c5aaSvikram 26*25e8c5aaSvikram #ifndef _SYS_CONTRACT_DEVICE_H 27*25e8c5aaSvikram #define _SYS_CONTRACT_DEVICE_H 28*25e8c5aaSvikram 29*25e8c5aaSvikram #pragma ident "%Z%%M% %I% %E% SMI" 30*25e8c5aaSvikram 31*25e8c5aaSvikram #include <sys/contract.h> 32*25e8c5aaSvikram 33*25e8c5aaSvikram #ifdef __cplusplus 34*25e8c5aaSvikram extern "C" { 35*25e8c5aaSvikram #endif 36*25e8c5aaSvikram 37*25e8c5aaSvikram typedef struct ctmpl_device ctmpl_device_t; 38*25e8c5aaSvikram typedef struct cont_device cont_device_t; 39*25e8c5aaSvikram 40*25e8c5aaSvikram /* 41*25e8c5aaSvikram * ct_ev_* flags 42*25e8c5aaSvikram */ 43*25e8c5aaSvikram #define CT_DEV_EV_ONLINE 0x1 /* device is moving to online state */ 44*25e8c5aaSvikram #define CT_DEV_EV_DEGRADED 0x2 /* device is moving to degraded state */ 45*25e8c5aaSvikram #define CT_DEV_EV_OFFLINE 0x4 /* device is moving to offline state */ 46*25e8c5aaSvikram #define CT_DEV_ALLEVENT 0x7 47*25e8c5aaSvikram 48*25e8c5aaSvikram /* 49*25e8c5aaSvikram * ctp_id values 50*25e8c5aaSvikram */ 51*25e8c5aaSvikram #define CTDP_ACCEPT 0x1 /* the acceptable set term */ 52*25e8c5aaSvikram #define CTDP_NONEG 0x2 /* the non-negotiable term */ 53*25e8c5aaSvikram #define CTDP_MINOR 0x4 /* the minor path term */ 54*25e8c5aaSvikram #define CTDP_ALLPARAMS 0x7 55*25e8c5aaSvikram 56*25e8c5aaSvikram #define CTDP_NONEG_CLEAR 0x0 /* clear the noneg flag */ 57*25e8c5aaSvikram #define CTDP_NONEG_SET 0x1 /* set noneg */ 58*25e8c5aaSvikram 59*25e8c5aaSvikram /* 60*25e8c5aaSvikram * Status fields 61*25e8c5aaSvikram */ 62*25e8c5aaSvikram #define CTDS_STATE "ctds_state" 63*25e8c5aaSvikram #define CTDS_ASET "ctds_aset" 64*25e8c5aaSvikram #define CTDS_NONEG "ctds_noneg" 65*25e8c5aaSvikram #define CTDS_MINOR "ctds_minor" 66*25e8c5aaSvikram 67*25e8c5aaSvikram /* 68*25e8c5aaSvikram * Max Time allowed for synchronous acknowledgement of a negotiation event 69*25e8c5aaSvikram */ 70*25e8c5aaSvikram #define CT_DEV_ACKTIME 60 /* 60 seconds */ 71*25e8c5aaSvikram 72*25e8c5aaSvikram #ifdef __cplusplus 73*25e8c5aaSvikram } 74*25e8c5aaSvikram #endif 75*25e8c5aaSvikram 76*25e8c5aaSvikram #endif /* _SYS_CONTRACT_DEVICE_H */ 77