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