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, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22/* 23 * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27#ifndef _INJ_EVENT_H 28#define _INJ_EVENT_H 29 30#pragma ident "%Z%%M% %I% %E% SMI" 31 32#include <inj.h> 33#include <inj_string.h> 34 35#ifdef __cplusplus 36extern "C" { 37#endif 38 39extern inj_decl_t *inj_decl_create(inj_declmem_t *); 40extern void inj_decl_addmem(inj_decl_t *, inj_declmem_t *); 41extern void inj_decl_finish(inj_decl_t *, const char *, inj_itemtype_t); 42extern void inj_decl_destroy(inj_decl_t *); 43extern inj_decl_t *inj_decl_lookup(const char *, inj_itemtype_t); 44 45extern inj_declmem_t *inj_decl_mem_create(const char *, inj_memtype_t); 46extern inj_declmem_t *inj_decl_mem_create_defined(const char *, const char *, 47 inj_itemtype_t); 48extern inj_declmem_t *inj_decl_mem_create_enum(const char *, inj_hash_t *); 49extern void inj_decl_mem_destroy(inj_declmem_t *); 50extern void inj_decl_mem_make_array(inj_declmem_t *, uint_t); 51 52extern inj_defn_t *inj_defn_create(inj_defnmem_t *); 53extern void inj_defn_addmem(inj_defn_t *, inj_defnmem_t *); 54extern void inj_defn_finish(inj_defn_t *, const char *, const char *, 55 inj_itemtype_t); 56extern inj_defn_t *inj_defn_lookup(const char *, inj_memtype_t); 57 58extern inj_defnmem_t *inj_defn_mem_create(const char *, inj_defnmemtype_t); 59extern inj_defnmem_t *inj_defn_mem_create_list(inj_defn_t *, 60 inj_defnmemtype_t); 61 62extern const char *inj_item2str(inj_itemtype_t); 63extern inj_memtype_t inj_item2mem(inj_itemtype_t); 64extern const char *inj_mem2str(inj_memtype_t); 65extern inj_itemtype_t inj_mem2item(inj_memtype_t); 66 67extern inj_randelem_t *inj_rand_create(inj_defn_t *, uint_t); 68extern inj_randelem_t *inj_rand_add(inj_randelem_t *, inj_randelem_t *); 69 70extern void inj_cmds_add(inj_cmd_t *); 71extern inj_list_t *inj_cmds_get(void); 72 73extern inj_cmd_t *inj_cmd_rand(inj_randelem_t *); 74extern inj_cmd_t *inj_cmd_repeat(inj_cmd_t *, uint_t); 75extern inj_cmd_t *inj_cmd_send(inj_defn_t *); 76extern inj_cmd_t *inj_cmd_sleep(uint_t); 77extern inj_cmd_t *inj_cmd_addhrt(hrtime_t); 78extern inj_cmd_t *inj_cmd_endhrt(void); 79 80#ifdef __cplusplus 81} 82#endif 83 84#endif /* _INJ_EVENT_H */ 85