1*e802abbdSTim Haley /* 2*e802abbdSTim Haley * CDDL HEADER START 3*e802abbdSTim Haley * 4*e802abbdSTim Haley * The contents of this file are subject to the terms of the 5*e802abbdSTim Haley * Common Development and Distribution License (the "License"). 6*e802abbdSTim Haley * You may not use this file except in compliance with the License. 7*e802abbdSTim Haley * 8*e802abbdSTim Haley * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*e802abbdSTim Haley * or http://www.opensolaris.org/os/licensing. 10*e802abbdSTim Haley * See the License for the specific language governing permissions 11*e802abbdSTim Haley * and limitations under the License. 12*e802abbdSTim Haley * 13*e802abbdSTim Haley * When distributing Covered Code, include this CDDL HEADER in each 14*e802abbdSTim Haley * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*e802abbdSTim Haley * If applicable, add the following below this CDDL HEADER, with the 16*e802abbdSTim Haley * fields enclosed by brackets "[]" replaced with your own identifying 17*e802abbdSTim Haley * information: Portions Copyright [yyyy] [name of copyright owner] 18*e802abbdSTim Haley * 19*e802abbdSTim Haley * CDDL HEADER END 20*e802abbdSTim Haley */ 21*e802abbdSTim Haley /* 22*e802abbdSTim Haley * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 23*e802abbdSTim Haley * Use is subject to license terms. 24*e802abbdSTim Haley */ 25*e802abbdSTim Haley 26*e802abbdSTim Haley #ifndef _ZUT_H 27*e802abbdSTim Haley #define _ZUT_H 28*e802abbdSTim Haley 29*e802abbdSTim Haley /* 30*e802abbdSTim Haley * IOCTLs for the zfs unit test driver 31*e802abbdSTim Haley */ 32*e802abbdSTim Haley 33*e802abbdSTim Haley #ifdef __cplusplus 34*e802abbdSTim Haley extern "C" { 35*e802abbdSTim Haley #endif 36*e802abbdSTim Haley 37*e802abbdSTim Haley #include <sys/param.h> 38*e802abbdSTim Haley #include <sys/types.h> 39*e802abbdSTim Haley #include <sys/stat.h> 40*e802abbdSTim Haley 41*e802abbdSTim Haley #define ZUT_DRIVER "zut" 42*e802abbdSTim Haley #define ZUT_DEV "/dev/zut" 43*e802abbdSTim Haley 44*e802abbdSTim Haley #define ZUT_VERSION_STRING "1" 45*e802abbdSTim Haley 46*e802abbdSTim Haley /* 47*e802abbdSTim Haley * /dev/zut ioctl numbers. 48*e802abbdSTim Haley */ 49*e802abbdSTim Haley #define ZUT_IOC ('U' << 8) 50*e802abbdSTim Haley 51*e802abbdSTim Haley /* Request flags */ 52*e802abbdSTim Haley #define ZUT_IGNORECASE 0x01 53*e802abbdSTim Haley #define ZUT_ACCFILTER 0x02 54*e802abbdSTim Haley #define ZUT_XATTR 0x04 55*e802abbdSTim Haley #define ZUT_EXTRDDIR 0x08 56*e802abbdSTim Haley #define ZUT_GETSTAT 0x10 57*e802abbdSTim Haley 58*e802abbdSTim Haley typedef struct zut_lookup { 59*e802abbdSTim Haley int zl_reqflags; 60*e802abbdSTim Haley int zl_deflags; /* output */ 61*e802abbdSTim Haley int zl_retcode; /* output */ 62*e802abbdSTim Haley char zl_dir[MAXPATHLEN]; 63*e802abbdSTim Haley char zl_file[MAXNAMELEN]; 64*e802abbdSTim Haley char zl_xfile[MAXNAMELEN]; 65*e802abbdSTim Haley char zl_real[MAXPATHLEN]; /* output */ 66*e802abbdSTim Haley uint64_t zl_xvattrs; /* output */ 67*e802abbdSTim Haley struct stat64 zl_statbuf; /* output */ 68*e802abbdSTim Haley } zut_lookup_t; 69*e802abbdSTim Haley 70*e802abbdSTim Haley typedef struct zut_readdir { 71*e802abbdSTim Haley uint64_t zr_buf; /* pointer to output buffer */ 72*e802abbdSTim Haley uint64_t zr_loffset; /* output */ 73*e802abbdSTim Haley char zr_dir[MAXPATHLEN]; 74*e802abbdSTim Haley char zr_file[MAXNAMELEN]; 75*e802abbdSTim Haley int zr_reqflags; 76*e802abbdSTim Haley int zr_retcode; /* output */ 77*e802abbdSTim Haley int zr_eof; /* output */ 78*e802abbdSTim Haley uint_t zr_bytes; /* output */ 79*e802abbdSTim Haley uint_t zr_buflen; 80*e802abbdSTim Haley } zut_readdir_t; 81*e802abbdSTim Haley 82*e802abbdSTim Haley typedef enum zut_ioc { 83*e802abbdSTim Haley ZUT_IOC_MIN_CMD = ZUT_IOC - 1, 84*e802abbdSTim Haley ZUT_IOC_LOOKUP = ZUT_IOC, 85*e802abbdSTim Haley ZUT_IOC_READDIR, 86*e802abbdSTim Haley ZUT_IOC_MAX_CMD 87*e802abbdSTim Haley } zut_ioc_t; 88*e802abbdSTim Haley 89*e802abbdSTim Haley #ifdef __cplusplus 90*e802abbdSTim Haley } 91*e802abbdSTim Haley #endif 92*e802abbdSTim Haley 93*e802abbdSTim Haley #endif /* _ZUT_H */ 94