1*fcf3ce44SJohn Forte /* 2*fcf3ce44SJohn Forte * CDDL HEADER START 3*fcf3ce44SJohn Forte * 4*fcf3ce44SJohn Forte * The contents of this file are subject to the terms of the 5*fcf3ce44SJohn Forte * Common Development and Distribution License (the "License"). 6*fcf3ce44SJohn Forte * You may not use this file except in compliance with the License. 7*fcf3ce44SJohn Forte * 8*fcf3ce44SJohn Forte * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*fcf3ce44SJohn Forte * or http://www.opensolaris.org/os/licensing. 10*fcf3ce44SJohn Forte * See the License for the specific language governing permissions 11*fcf3ce44SJohn Forte * and limitations under the License. 12*fcf3ce44SJohn Forte * 13*fcf3ce44SJohn Forte * When distributing Covered Code, include this CDDL HEADER in each 14*fcf3ce44SJohn Forte * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*fcf3ce44SJohn Forte * If applicable, add the following below this CDDL HEADER, with the 16*fcf3ce44SJohn Forte * fields enclosed by brackets "[]" replaced with your own identifying 17*fcf3ce44SJohn Forte * information: Portions Copyright [yyyy] [name of copyright owner] 18*fcf3ce44SJohn Forte * 19*fcf3ce44SJohn Forte * CDDL HEADER END 20*fcf3ce44SJohn Forte */ 21*fcf3ce44SJohn Forte /* 22*fcf3ce44SJohn Forte * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 23*fcf3ce44SJohn Forte * Use is subject to license terms. 24*fcf3ce44SJohn Forte */ 25*fcf3ce44SJohn Forte 26*fcf3ce44SJohn Forte #ifndef _DSSTAT_H 27*fcf3ce44SJohn Forte #define _DSSTAT_H 28*fcf3ce44SJohn Forte 29*fcf3ce44SJohn Forte #ifdef __cplusplus 30*fcf3ce44SJohn Forte extern "C" { 31*fcf3ce44SJohn Forte #endif 32*fcf3ce44SJohn Forte 33*fcf3ce44SJohn Forte typedef struct vslist_s 34*fcf3ce44SJohn Forte { 35*fcf3ce44SJohn Forte char *volname; 36*fcf3ce44SJohn Forte char *volhost; 37*fcf3ce44SJohn Forte struct vslist_s *next; 38*fcf3ce44SJohn Forte } vslist_t; 39*fcf3ce44SJohn Forte 40*fcf3ce44SJohn Forte extern int mode; 41*fcf3ce44SJohn Forte extern int interval; 42*fcf3ce44SJohn Forte extern int iterations; 43*fcf3ce44SJohn Forte extern int zflag; 44*fcf3ce44SJohn Forte extern int linesout; 45*fcf3ce44SJohn Forte extern short hflags; 46*fcf3ce44SJohn Forte extern short dflags; 47*fcf3ce44SJohn Forte extern short rflags; 48*fcf3ce44SJohn Forte extern vslist_t *vs_top; 49*fcf3ce44SJohn Forte 50*fcf3ce44SJohn Forte /* kstat named character limit */ 51*fcf3ce44SJohn Forte #define NAMED_LEN 15 52*fcf3ce44SJohn Forte 53*fcf3ce44SJohn Forte /* Mode */ 54*fcf3ce44SJohn Forte #define MULTI 0x01 55*fcf3ce44SJohn Forte #define SNDR 0x02 56*fcf3ce44SJohn Forte #define IIMG 0x04 57*fcf3ce44SJohn Forte #define SDBC 0x08 58*fcf3ce44SJohn Forte 59*fcf3ce44SJohn Forte /* Error codes */ 60*fcf3ce44SJohn Forte #define DSSTAT_SUCCESS 0 /* Success */ 61*fcf3ce44SJohn Forte #define DSSTAT_NOSTAT 1 /* No Statistics Avaiable */ 62*fcf3ce44SJohn Forte #define DSSTAT_EINVAL 2 /* Invalid Argument */ 63*fcf3ce44SJohn Forte #define DSSTAT_ENOMEM 3 /* No Memory Available To Get Statistics */ 64*fcf3ce44SJohn Forte #define DSSTAT_EUNKNWN 4 /* Unknown Error */ 65*fcf3ce44SJohn Forte #define DSSTAT_EMAP 5 /* Mapped kstat memory is invalid */ 66*fcf3ce44SJohn Forte 67*fcf3ce44SJohn Forte /* Report flags */ 68*fcf3ce44SJohn Forte #define IIMG_MST 0x01 69*fcf3ce44SJohn Forte #define IIMG_SHD 0x02 70*fcf3ce44SJohn Forte #define IIMG_BMP 0x04 71*fcf3ce44SJohn Forte #define IIMG_OVR 0x08 72*fcf3ce44SJohn Forte 73*fcf3ce44SJohn Forte #define SNDR_PRI 0x10 74*fcf3ce44SJohn Forte #define SNDR_NET 0x20 75*fcf3ce44SJohn Forte #define SNDR_BMP 0x40 76*fcf3ce44SJohn Forte 77*fcf3ce44SJohn Forte /* Display flags */ 78*fcf3ce44SJohn Forte #define SUMMARY 0x01 79*fcf3ce44SJohn Forte #define READ 0x02 80*fcf3ce44SJohn Forte #define WRITE 0x04 81*fcf3ce44SJohn Forte #define TIMING 0x08 82*fcf3ce44SJohn Forte #define FLAGS 0x10 83*fcf3ce44SJohn Forte #define PCTS 0x20 84*fcf3ce44SJohn Forte #define DESTAGED 0x40 85*fcf3ce44SJohn Forte #define WRCANCEL 0x80 86*fcf3ce44SJohn Forte #define RATIO 0x100 87*fcf3ce44SJohn Forte #define ASYNC_QUEUE 0x200 88*fcf3ce44SJohn Forte 89*fcf3ce44SJohn Forte /* Flag masks */ 90*fcf3ce44SJohn Forte #define SNDR_REP_MASK (SNDR_PRI | SNDR_NET | SNDR_BMP) 91*fcf3ce44SJohn Forte #define SNDR_DIS_MASK (SUMMARY | READ | WRITE | TIMING | FLAGS | PCTS | \ 92*fcf3ce44SJohn Forte RATIO | ASYNC_QUEUE) 93*fcf3ce44SJohn Forte 94*fcf3ce44SJohn Forte #define IIMG_REP_MASK (IIMG_MST | IIMG_SHD | IIMG_BMP | IIMG_OVR) 95*fcf3ce44SJohn Forte #define IIMG_DIS_MASK (SUMMARY | READ | WRITE | TIMING | FLAGS | PCTS | RATIO) 96*fcf3ce44SJohn Forte 97*fcf3ce44SJohn Forte #define CACHE_REP_MASK 0 98*fcf3ce44SJohn Forte #define CACHE_DIS_MASK (SUMMARY | READ | WRITE | FLAGS | DESTAGED | WRCANCEL) 99*fcf3ce44SJohn Forte 100*fcf3ce44SJohn Forte /* Field header defines */ 101*fcf3ce44SJohn Forte #define DISPLAY_LINES 19 102*fcf3ce44SJohn Forte #define HEADERS_OUT 0x01 /* flag to show headers output for cycle */ 103*fcf3ce44SJohn Forte #define HEADERS_BOR 0x02 /* field headers at beginning of run */ 104*fcf3ce44SJohn Forte #define HEADERS_ATT 0x04 /* field headers all the time */ 105*fcf3ce44SJohn Forte #define HEADERS_EXL 0x08 /* field headers every X lines */ 106*fcf3ce44SJohn Forte 107*fcf3ce44SJohn Forte #ifdef __cplusplus 108*fcf3ce44SJohn Forte } 109*fcf3ce44SJohn Forte #endif 110*fcf3ce44SJohn Forte 111*fcf3ce44SJohn Forte #endif /* _DSSTAT_H */ 112