1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 /* 22 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 23 * Use is subject to license terms. 24 */ 25 26 #ifndef _FB_PARSERTYPES_H 27 #define _FB_PARSERTYPES_H 28 29 #pragma ident "%Z%%M% %I% %E% SMI" 30 31 #include "config.h" 32 33 #include "filebench.h" 34 #include "vars.h" 35 36 #ifdef __cplusplus 37 extern "C" { 38 #endif 39 40 #ifndef sun 41 typedef unsigned char uchar_t; 42 #endif 43 44 #define E_ERROR 1 45 #define E_USAGE 2 46 #define FS_FALSE 0 47 #define FS_TRUE 1 48 49 #define FSE_SYSTEM 1 50 51 typedef struct list { 52 struct list *list_next; 53 avd_t list_string; 54 avd_t list_integer; 55 } list_t; 56 57 typedef struct attr { 58 int attr_name; 59 struct attr *attr_next; 60 avd_t attr_avd; 61 list_t *attr_param_list; 62 void *attr_obj; 63 } attr_t; 64 65 typedef struct cmd { 66 void (*cmd)(struct cmd *); 67 char *cmd_name; 68 char *cmd_tgt1; 69 char *cmd_tgt2; 70 char *cmd_tgt3; 71 char *cmd_tgt4; 72 char *thread_name; 73 uint64_t cmd_qty; 74 struct cmd *cmd_list; 75 struct cmd *cmd_next; 76 attr_t *cmd_attr_list; 77 list_t *cmd_param_list; 78 list_t *cmd_param_list2; 79 } cmd_t; 80 81 typedef union { 82 int64_t i; 83 uchar_t b; 84 char *s; 85 } fs_u; 86 87 typedef struct pidlist { 88 struct pidlist *pl_next; 89 int pl_fd; 90 pid_t pl_pid; 91 } pidlist_t; 92 93 typedef void (*cmdfunc)(cmd_t *); 94 int yy_switchfileparent(FILE *file); 95 int yy_switchfilescript(FILE *file); 96 97 #ifdef __cplusplus 98 } 99 #endif 100 101 #endif /* _FB_PARSERTYPES_H */ 102