1*8fea755aSjm22469 /* 2*8fea755aSjm22469 * CDDL HEADER START 3*8fea755aSjm22469 * 4*8fea755aSjm22469 * The contents of this file are subject to the terms of the 5*8fea755aSjm22469 * Common Development and Distribution License (the "License"). 6*8fea755aSjm22469 * You may not use this file except in compliance with the License. 7*8fea755aSjm22469 * 8*8fea755aSjm22469 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*8fea755aSjm22469 * or http://www.opensolaris.org/os/licensing. 10*8fea755aSjm22469 * See the License for the specific language governing permissions 11*8fea755aSjm22469 * and limitations under the License. 12*8fea755aSjm22469 * 13*8fea755aSjm22469 * When distributing Covered Code, include this CDDL HEADER in each 14*8fea755aSjm22469 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*8fea755aSjm22469 * If applicable, add the following below this CDDL HEADER, with the 16*8fea755aSjm22469 * fields enclosed by brackets "[]" replaced with your own identifying 17*8fea755aSjm22469 * information: Portions Copyright [yyyy] [name of copyright owner] 18*8fea755aSjm22469 * 19*8fea755aSjm22469 * CDDL HEADER END 20*8fea755aSjm22469 */ 21*8fea755aSjm22469 22*8fea755aSjm22469 /* 23*8fea755aSjm22469 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 24*8fea755aSjm22469 * Use is subject to license terms. 25*8fea755aSjm22469 */ 26*8fea755aSjm22469 27*8fea755aSjm22469 #ifndef _DR_IO_H 28*8fea755aSjm22469 #define _DR_IO_H 29*8fea755aSjm22469 30*8fea755aSjm22469 #pragma ident "%Z%%M% %I% %E% SMI" 31*8fea755aSjm22469 32*8fea755aSjm22469 /* 33*8fea755aSjm22469 * VIO DR Control Protocol 34*8fea755aSjm22469 */ 35*8fea755aSjm22469 36*8fea755aSjm22469 #ifdef __cplusplus 37*8fea755aSjm22469 extern "C" { 38*8fea755aSjm22469 #endif 39*8fea755aSjm22469 40*8fea755aSjm22469 /* 41*8fea755aSjm22469 * Values of 'msg_type' element of the request message 42*8fea755aSjm22469 */ 43*8fea755aSjm22469 #define DR_VIO_CONFIGURE 0x494f43 /* 'IOC' */ 44*8fea755aSjm22469 #define DR_VIO_UNCONFIGURE 0x494f55 /* 'IOU' */ 45*8fea755aSjm22469 #define DR_VIO_FORCE_UNCONFIG 0x494f46 /* 'IOF' */ 46*8fea755aSjm22469 #define DR_VIO_STATUS 0x494f53 /* 'IOS' */ 47*8fea755aSjm22469 48*8fea755aSjm22469 /* 49*8fea755aSjm22469 * VIO DR Request 50*8fea755aSjm22469 */ 51*8fea755aSjm22469 typedef struct { 52*8fea755aSjm22469 uint64_t req_num; 53*8fea755aSjm22469 uint64_t dev_id; 54*8fea755aSjm22469 uint32_t msg_type; 55*8fea755aSjm22469 char name[1]; 56*8fea755aSjm22469 } dr_vio_req_t; 57*8fea755aSjm22469 58*8fea755aSjm22469 /* 59*8fea755aSjm22469 * Values of 'result' element of the response message 60*8fea755aSjm22469 */ 61*8fea755aSjm22469 #define DR_VIO_RES_OK 0x0 62*8fea755aSjm22469 #define DR_VIO_RES_FAILURE 0x1 63*8fea755aSjm22469 #define DR_VIO_RES_BLOCKED 0x2 64*8fea755aSjm22469 #define DR_VIO_RES_NOT_IN_MD 0x3 65*8fea755aSjm22469 66*8fea755aSjm22469 /* 67*8fea755aSjm22469 * Values of 'status' element of the response message 68*8fea755aSjm22469 */ 69*8fea755aSjm22469 #define DR_VIO_STAT_NOT_PRESENT 0x0 70*8fea755aSjm22469 #define DR_VIO_STAT_UNCONFIGURED 0x1 71*8fea755aSjm22469 #define DR_VIO_STAT_CONFIGURED 0x2 72*8fea755aSjm22469 73*8fea755aSjm22469 /* 74*8fea755aSjm22469 * VIO DR Response 75*8fea755aSjm22469 */ 76*8fea755aSjm22469 typedef struct { 77*8fea755aSjm22469 uint64_t req_num; 78*8fea755aSjm22469 uint32_t result; 79*8fea755aSjm22469 uint32_t status; 80*8fea755aSjm22469 char reason[1]; 81*8fea755aSjm22469 } dr_vio_res_t; 82*8fea755aSjm22469 83*8fea755aSjm22469 #define DR_VIO_DS_ID "dr-vio" 84*8fea755aSjm22469 #define DR_VIO_MAXREASONLEN 1024 85*8fea755aSjm22469 86*8fea755aSjm22469 #ifdef __cplusplus 87*8fea755aSjm22469 } 88*8fea755aSjm22469 #endif 89*8fea755aSjm22469 90*8fea755aSjm22469 #endif /* _DR_IO_H */ 91