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