fa9e4066f08beec538e775443c5be79dd423fcabahrens/*
fa9e4066f08beec538e775443c5be79dd423fcabahrens * CDDL HEADER START
fa9e4066f08beec538e775443c5be79dd423fcabahrens *
fa9e4066f08beec538e775443c5be79dd423fcabahrens * The contents of this file are subject to the terms of the
ea8dc4b6d2251b437950c0056bc626b311c73c27eschrock * Common Development and Distribution License, Version 1.0 only
ea8dc4b6d2251b437950c0056bc626b311c73c27eschrock * (the "License"). You may not use this file except in compliance
fa9e4066f08beec538e775443c5be79dd423fcabahrens * with the License.
fa9e4066f08beec538e775443c5be79dd423fcabahrens *
fa9e4066f08beec538e775443c5be79dd423fcabahrens * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fa9e4066f08beec538e775443c5be79dd423fcabahrens * or http://www.opensolaris.org/os/licensing.
fa9e4066f08beec538e775443c5be79dd423fcabahrens * See the License for the specific language governing permissions
fa9e4066f08beec538e775443c5be79dd423fcabahrens * and limitations under the License.
fa9e4066f08beec538e775443c5be79dd423fcabahrens *
fa9e4066f08beec538e775443c5be79dd423fcabahrens * When distributing Covered Code, include this CDDL HEADER in each
fa9e4066f08beec538e775443c5be79dd423fcabahrens * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fa9e4066f08beec538e775443c5be79dd423fcabahrens * If applicable, add the following below this CDDL HEADER, with the
fa9e4066f08beec538e775443c5be79dd423fcabahrens * fields enclosed by brackets "[]" replaced with your own identifying
fa9e4066f08beec538e775443c5be79dd423fcabahrens * information: Portions Copyright [yyyy] [name of copyright owner]
fa9e4066f08beec538e775443c5be79dd423fcabahrens *
fa9e4066f08beec538e775443c5be79dd423fcabahrens * CDDL HEADER END
fa9e4066f08beec538e775443c5be79dd423fcabahrens */
28d97a71b8094bcc695c914ba67d41bee3cd3a8aMark Shellenbaum/*
79d728325e257b05859d2eef4a4dfbefdce05a76Matthew Ahrens * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
bc9014e6a81272073b9854d9f65dd59e18d18c35Justin Gibbs * Use is subject to license terms.
fa9e4066f08beec538e775443c5be79dd423fcabahrens */
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens#ifndef _INJ_H
fa9e4066f08beec538e775443c5be79dd423fcabahrens#define _INJ_H
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens#pragma ident "%Z%%M% %I% %E% SMI"
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens/*
fa9e4066f08beec538e775443c5be79dd423fcabahrens * FMA Error injector
c717a56157ae0e6fca6a1e3689ae1edc385716a3maybee */
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens#include <stdio.h>
744947dc83c634d985ed3ad79ac9c5e28d1865fdTom Erickson#include <libnvpair.h>
fa9e4066f08beec538e775443c5be79dd423fcabahrens#include <sys/types.h>
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens#include <inj_list.h>
fa9e4066f08beec538e775443c5be79dd423fcabahrens#include <inj_hash.h>
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens#include <fm/fmd_log.h>
cdb0ab79ea1af7b8fc339a04d4bf7426dc77ec4emaybee
fa9e4066f08beec538e775443c5be79dd423fcabahrens#ifdef __cplusplus
fa9e4066f08beec538e775443c5be79dd423fcabahrensextern "C" {
fa9e4066f08beec538e775443c5be79dd423fcabahrens#endif
fa9e4066f08beec538e775443c5be79dd423fcabahrens
cdb0ab79ea1af7b8fc339a04d4bf7426dc77ec4emaybee/*
cdb0ab79ea1af7b8fc339a04d4bf7426dc77ec4emaybee * The injector allows for the declaration, definition, and injection of four
cdb0ab79ea1af7b8fc339a04d4bf7426dc77ec4emaybee * types of things - Events, FMRIs, Authorities, and lists. The first three
cdb0ab79ea1af7b8fc339a04d4bf7426dc77ec4emaybee * are essentially lists with extra membership requirements (FMRIs, for
cdb0ab79ea1af7b8fc339a04d4bf7426dc77ec4emaybee * example, must include a member called `scheme'). So while each has a
cdb0ab79ea1af7b8fc339a04d4bf7426dc77ec4emaybee * different function within the FMA framework, we can use a single struct to
cdb0ab79ea1af7b8fc339a04d4bf7426dc77ec4emaybee * store all three. The inj_itemtype_t enum is used to describe which of the
fa9e4066f08beec538e775443c5be79dd423fcabahrens * four types is being represented by a given object.
fa9e4066f08beec538e775443c5be79dd423fcabahrens */
fa9e4066f08beec538e775443c5be79dd423fcabahrenstypedef enum inj_itemtype {
fa9e4066f08beec538e775443c5be79dd423fcabahrens ITEMTYPE_EVENT,
e94f268a6264bf027b3bc556fb4cceb84f7323c5Matthew Ahrens ITEMTYPE_FMRI,
4b5c8e93cab28d3c65ba9d407fd8f46e3be1db1cMatthew Ahrens ITEMTYPE_AUTH,
fa9e4066f08beec538e775443c5be79dd423fcabahrens ITEMTYPE_LIST
fa9e4066f08beec538e775443c5be79dd423fcabahrens} inj_itemtype_t;
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens#define ITEMTYPE_NITEMS 4
fa9e4066f08beec538e775443c5be79dd423fcabahrens
0a586cea3ceec7e5e50e7e54c745082a7a333ac2Mark Shellenbaum/*
0a586cea3ceec7e5e50e7e54c745082a7a333ac2Mark Shellenbaum * The member name-value pairs of Events, FMRIs, and Authorities are typed.
0a586cea3ceec7e5e50e7e54c745082a7a333ac2Mark Shellenbaum */
0a586cea3ceec7e5e50e7e54c745082a7a333ac2Mark Shellenbaumtypedef enum inj_memtype {
0a586cea3ceec7e5e50e7e54c745082a7a333ac2Mark Shellenbaum MEMTYPE_UNKNOWN,
0a586cea3ceec7e5e50e7e54c745082a7a333ac2Mark Shellenbaum MEMTYPE_INT8,
0a586cea3ceec7e5e50e7e54c745082a7a333ac2Mark Shellenbaum MEMTYPE_INT16,
0a586cea3ceec7e5e50e7e54c745082a7a333ac2Mark Shellenbaum MEMTYPE_INT32,
0a586cea3ceec7e5e50e7e54c745082a7a333ac2Mark Shellenbaum MEMTYPE_INT64,
0a586cea3ceec7e5e50e7e54c745082a7a333ac2Mark Shellenbaum MEMTYPE_UINT8,
0a586cea3ceec7e5e50e7e54c745082a7a333ac2Mark Shellenbaum MEMTYPE_UINT16,
0a586cea3ceec7e5e50e7e54c745082a7a333ac2Mark Shellenbaum MEMTYPE_UINT32,
fa9e4066f08beec538e775443c5be79dd423fcabahrens MEMTYPE_UINT64,
fa9e4066f08beec538e775443c5be79dd423fcabahrens MEMTYPE_BOOL,
fa9e4066f08beec538e775443c5be79dd423fcabahrens MEMTYPE_STRING,
fa9e4066f08beec538e775443c5be79dd423fcabahrens MEMTYPE_ENUM,
fa9e4066f08beec538e775443c5be79dd423fcabahrens MEMTYPE_EVENT,
fa9e4066f08beec538e775443c5be79dd423fcabahrens MEMTYPE_FMRI,
ea8dc4b6d2251b437950c0056bc626b311c73c27eschrock MEMTYPE_AUTH,
1934e92fc930c49429ad71a8ca97340f33227e78maybee MEMTYPE_LIST
0a586cea3ceec7e5e50e7e54c745082a7a333ac2Mark Shellenbaum} inj_memtype_t;
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens/*
fa9e4066f08beec538e775443c5be79dd423fcabahrens * Declarations
4b5c8e93cab28d3c65ba9d407fd8f46e3be1db1cMatthew Ahrens *
4b5c8e93cab28d3c65ba9d407fd8f46e3be1db1cMatthew Ahrens * Each declared item, be it an event, an fmri, or an authority, consists of
4b5c8e93cab28d3c65ba9d407fd8f46e3be1db1cMatthew Ahrens * an inj_decl_t and a string of inj_declmem_t's, one of the latter for each
4b5c8e93cab28d3c65ba9d407fd8f46e3be1db1cMatthew Ahrens * declared member.
4b5c8e93cab28d3c65ba9d407fd8f46e3be1db1cMatthew Ahrens */
fa9e4066f08beec538e775443c5be79dd423fcabahrens
c144956179190829a882ff695f7771ba19f65becEric Taylor#define DECL_F_AUTOENA 0x1 /* ENA member to be auto-generated for event */
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrenstypedef struct inj_decl {
fa9e4066f08beec538e775443c5be79dd423fcabahrens inj_list_t decl_members; /* List of declared members */
fa9e4066f08beec538e775443c5be79dd423fcabahrens inj_hash_t decl_memhash; /* Hash of said members */
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens const char *decl_name; /* Name of declared item */
fa9e4066f08beec538e775443c5be79dd423fcabahrens inj_itemtype_t decl_type; /* Type of declared item */
fa9e4066f08beec538e775443c5be79dd423fcabahrens
99653d4ee642c6528e88224f12409a5f23060994eschrock uint_t decl_lineno; /* Line # of first member declared */
99653d4ee642c6528e88224f12409a5f23060994eschrock uint_t decl_flags; /* DECL_F_* */
99653d4ee642c6528e88224f12409a5f23060994eschrock} inj_decl_t;
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens#define DECLMEM_F_ARRAY 0x1 /* This member is an array of the given type */
fa9e4066f08beec538e775443c5be79dd423fcabahrens
503ad85c168c7992ccc310af845a581cff3c72b5Matthew Ahrenstypedef struct inj_declmem {
fa9e4066f08beec538e775443c5be79dd423fcabahrens inj_list_t dlm_memlist; /* List of declared members */
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens const char *dlm_name; /* Name of this member */
fa9e4066f08beec538e775443c5be79dd423fcabahrens inj_memtype_t dlm_type; /* Type of this member */
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens uint_t dlm_flags; /* DECLMEM_F_* */
fa9e4066f08beec538e775443c5be79dd423fcabahrens uint_t dlm_arrdim; /* If arr flag set, dim of array */
fa9e4066f08beec538e775443c5be79dd423fcabahrens
99653d4ee642c6528e88224f12409a5f23060994eschrock union {
148434217c040ea38dc844384f6ba68d9b325906Matthew Ahrens inj_hash_t *_dlm_enumvals; /* If enum, hash of poss. values */
148434217c040ea38dc844384f6ba68d9b325906Matthew Ahrens inj_decl_t *_dlm_decl; /* If evt, etc., ptr to decl for same */
99653d4ee642c6528e88224f12409a5f23060994eschrock } _dlm_u;
0a586cea3ceec7e5e50e7e54c745082a7a333ac2Mark Shellenbaum} inj_declmem_t;
0a586cea3ceec7e5e50e7e54c745082a7a333ac2Mark Shellenbaum
0a586cea3ceec7e5e50e7e54c745082a7a333ac2Mark Shellenbaum#define dlm_enumvals _dlm_u._dlm_enumvals
fa9e4066f08beec538e775443c5be79dd423fcabahrens#define dlm_decl _dlm_u._dlm_decl
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens/*
fa9e4066f08beec538e775443c5be79dd423fcabahrens * Definitions
fa9e4066f08beec538e775443c5be79dd423fcabahrens *
fa9e4066f08beec538e775443c5be79dd423fcabahrens * Each defined item consists of an inj_defn_t and a string of inj_defnmem_t's,
fa9e4066f08beec538e775443c5be79dd423fcabahrens * one of the latter for each defined member. The inj_defn_t also contains a
fa9e4066f08beec538e775443c5be79dd423fcabahrens * pointer to the corresponding declaration, thus allowing for correctness
99653d4ee642c6528e88224f12409a5f23060994eschrock * checking.
fa9e4066f08beec538e775443c5be79dd423fcabahrens */
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrenstypedef struct inj_defn {
fa9e4066f08beec538e775443c5be79dd423fcabahrens inj_list_t defn_members; /* List of defined members */
fa9e4066f08beec538e775443c5be79dd423fcabahrens const char *defn_name; /* Name of this definition */
fa9e4066f08beec538e775443c5be79dd423fcabahrens inj_decl_t *defn_decl; /* Ptr to decl this defn instantiates */
99653d4ee642c6528e88224f12409a5f23060994eschrock uint_t defn_lineno; /* Line # of first member defined */
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens nvlist_t *defn_nvl; /* Built from validated members */
fa9e4066f08beec538e775443c5be79dd423fcabahrens} inj_defn_t;
fa9e4066f08beec538e775443c5be79dd423fcabahrens
0a586cea3ceec7e5e50e7e54c745082a7a333ac2Mark Shellenbaum/*
0a586cea3ceec7e5e50e7e54c745082a7a333ac2Mark Shellenbaum * Embodiment of the information that we know about a given defined member at
fa9e4066f08beec538e775443c5be79dd423fcabahrens * the time of definition. These values are assigned before the individual
fa9e4066f08beec538e775443c5be79dd423fcabahrens * definition members are paired with their corresponding declarations, so we
79d728325e257b05859d2eef4a4dfbefdce05a76Matthew Ahrens * don't know whether a given IDENT is, for example, an enum or an fmri
fa9e4066f08beec538e775443c5be79dd423fcabahrens * reference. Without these values, we wouldn't be able to distinguish between
f7170741490edba9d1d9c697c177c887172bc741Will Andrews * a quoted string and an identifier, for example, and thus would have a harder
f7170741490edba9d1d9c697c177c887172bc741Will Andrews * time with syntactic validation.
fa9e4066f08beec538e775443c5be79dd423fcabahrens */
fa9e4066f08beec538e775443c5be79dd423fcabahrenstypedef enum inj_defnmemtype {
fa9e4066f08beec538e775443c5be79dd423fcabahrens DEFNMEM_IMM,
148434217c040ea38dc844384f6ba68d9b325906Matthew Ahrens DEFNMEM_IDENT,
fa9e4066f08beec538e775443c5be79dd423fcabahrens DEFNMEM_QSTRING,
fa9e4066f08beec538e775443c5be79dd423fcabahrens DEFNMEM_EVENT,
fa9e4066f08beec538e775443c5be79dd423fcabahrens DEFNMEM_FMRI,
503ad85c168c7992ccc310af845a581cff3c72b5Matthew Ahrens DEFNMEM_AUTH,
fa9e4066f08beec538e775443c5be79dd423fcabahrens DEFNMEM_ARRAY,
fa9e4066f08beec538e775443c5be79dd423fcabahrens DEFNMEM_LIST
744947dc83c634d985ed3ad79ac9c5e28d1865fdTom Erickson} inj_defnmemtype_t;
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrenstypedef struct inj_defnmem {
fa9e4066f08beec538e775443c5be79dd423fcabahrens inj_list_t dfm_memlist; /* List of defined members */
c543ec060d1359f6c8a9507242521f344a2ac3efahrens
c543ec060d1359f6c8a9507242521f344a2ac3efahrens inj_defnmemtype_t dfm_type; /* Type of this member, from parser */
c543ec060d1359f6c8a9507242521f344a2ac3efahrens uint_t dfm_lineno; /* Last line of this member's defn */
fa9e4066f08beec538e775443c5be79dd423fcabahrens
c543ec060d1359f6c8a9507242521f344a2ac3efahrens union {
c543ec060d1359f6c8a9507242521f344a2ac3efahrens const char *_dfm_str; /* String value of member */
c543ec060d1359f6c8a9507242521f344a2ac3efahrens inj_list_t _dfm_list; /* Enum, evt, auth, arr, list vals */
fa9e4066f08beec538e775443c5be79dd423fcabahrens } _dfm_u;
fa9e4066f08beec538e775443c5be79dd423fcabahrens} inj_defnmem_t;
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens#define dfm_str _dfm_u._dfm_str
fa9e4066f08beec538e775443c5be79dd423fcabahrens#define dfm_list _dfm_u._dfm_list
c543ec060d1359f6c8a9507242521f344a2ac3efahrens
744947dc83c634d985ed3ad79ac9c5e28d1865fdTom Erickson/*
c543ec060d1359f6c8a9507242521f344a2ac3efahrens * Operations performed by the injector (aside from declarations and
c543ec060d1359f6c8a9507242521f344a2ac3efahrens * definitions)
c543ec060d1359f6c8a9507242521f344a2ac3efahrens */
2acef22db7808606888f8f92715629ff3ba555b9Matthew Ahrens
da03de9920a5a87150a121e9851479c6b3364d8aMark Maybee/* events and priorities list for the randomize command */
fa9e4066f08beec538e775443c5be79dd423fcabahrenstypedef struct inj_randelem {
fa9e4066f08beec538e775443c5be79dd423fcabahrens struct inj_randelem *re_next;
0a586cea3ceec7e5e50e7e54c745082a7a333ac2Mark Shellenbaum inj_defn_t *re_event;
0a586cea3ceec7e5e50e7e54c745082a7a333ac2Mark Shellenbaum uint_t re_prob;
1934e92fc930c49429ad71a8ca97340f33227e78maybee} inj_randelem_t;
c543ec060d1359f6c8a9507242521f344a2ac3efahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens/*
744947dc83c634d985ed3ad79ac9c5e28d1865fdTom Erickson * Operations themselves are structured as a tree of inj_cmd_t's. Each one has
744947dc83c634d985ed3ad79ac9c5e28d1865fdTom Erickson * a command type and type-specific command data. The "program" is run via
744947dc83c634d985ed3ad79ac9c5e28d1865fdTom Erickson * iteration through the tree, with the injector performing the operation
fa9e4066f08beec538e775443c5be79dd423fcabahrens * requested by a given node.
fa9e4066f08beec538e775443c5be79dd423fcabahrens */
fa9e4066f08beec538e775443c5be79dd423fcabahrenstypedef enum inj_cmd_type {
fa9e4066f08beec538e775443c5be79dd423fcabahrens CMD_SEND_EVENT,
fa9e4066f08beec538e775443c5be79dd423fcabahrens CMD_SLEEP,
c717a56157ae0e6fca6a1e3689ae1edc385716a3maybee CMD_REPEAT,
bf16b11e8deb633dd6c4296d46e92399d1582df4Matthew Ahrens CMD_RANDOM
fa9e4066f08beec538e775443c5be79dd423fcabahrens} inj_cmd_type_t;
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrenstypedef struct inj_cmd {
fa9e4066f08beec538e775443c5be79dd423fcabahrens inj_list_t cmd_list; /* List of commands */
fa9e4066f08beec538e775443c5be79dd423fcabahrens inj_cmd_type_t cmd_type; /* Type of this command */
fa9e4066f08beec538e775443c5be79dd423fcabahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens union {
fa9e4066f08beec538e775443c5be79dd423fcabahrens inj_defn_t *_cmd_event; /* If send_event, evt to send */
fa9e4066f08beec538e775443c5be79dd423fcabahrens inj_randelem_t **_cmd_rand; /* List of evts & probs */
fa9e4066f08beec538e775443c5be79dd423fcabahrens struct inj_cmd *_cmd_subcmd; /* If repeat, cmd to be rpt'd */
fa9e4066f08beec538e775443c5be79dd423fcabahrens } _cmd_u;
fa9e4066f08beec538e775443c5be79dd423fcabahrens uint_t cmd_num; /* If repeat, repeat count */
86bb58aec7165f8a0303564575c65e5a2ad58bf1Alex Reece} inj_cmd_t;
86bb58aec7165f8a0303564575c65e5a2ad58bf1Alex Reece
86bb58aec7165f8a0303564575c65e5a2ad58bf1Alex Reece#define cmd_event _cmd_u._cmd_event
86bb58aec7165f8a0303564575c65e5a2ad58bf1Alex Reece#define cmd_rand _cmd_u._cmd_rand
86bb58aec7165f8a0303564575c65e5a2ad58bf1Alex Reece#define cmd_subcmd _cmd_u._cmd_subcmd
86bb58aec7165f8a0303564575c65e5a2ad58bf1Alex Reece
86bb58aec7165f8a0303564575c65e5a2ad58bf1Alex Reece/*
86bb58aec7165f8a0303564575c65e5a2ad58bf1Alex Reece * We support retargetable event-delivery mechanisms. Each method implements
86bb58aec7165f8a0303564575c65e5a2ad58bf1Alex Reece * a copy of the following ops vector, thus allowing us to switch mechanisms
86bb58aec7165f8a0303564575c65e5a2ad58bf1Alex Reece * simply by switching the structure.
86bb58aec7165f8a0303564575c65e5a2ad58bf1Alex Reece */
86bb58aec7165f8a0303564575c65e5a2ad58bf1Alex Reecetypedef struct inj_mode_ops {
744947dc83c634d985ed3ad79ac9c5e28d1865fdTom Erickson void *(*mo_open)(const char *); /* Init mechanism */
744947dc83c634d985ed3ad79ac9c5e28d1865fdTom Erickson void (*mo_send)(void *, nvlist_t *); /* Send a single nvlist */
ea8dc4b6d2251b437950c0056bc626b311c73c27eschrock void (*mo_close)(void *); /* Shut down mechanism */
744947dc83c634d985ed3ad79ac9c5e28d1865fdTom Erickson} inj_mode_ops_t;
0a586cea3ceec7e5e50e7e54c745082a7a333ac2Mark Shellenbaum
fa9e4066f08beec538e775443c5be79dd423fcabahrensextern int verbose;
c717a56157ae0e6fca6a1e3689ae1edc385716a3maybeeextern int quiet;
c717a56157ae0e6fca6a1e3689ae1edc385716a3maybee
c717a56157ae0e6fca6a1e3689ae1edc385716a3maybeeextern inj_list_t *inj_logfile_read(fmd_log_t *);
148434217c040ea38dc844384f6ba68d9b325906Matthew Ahrensextern inj_list_t *inj_program_read(const char *);
0a586cea3ceec7e5e50e7e54c745082a7a333ac2Mark Shellenbaumextern void inj_program_run(inj_list_t *, const inj_mode_ops_t *, void *);
0a586cea3ceec7e5e50e7e54c745082a7a333ac2Mark Shellenbaum
0a586cea3ceec7e5e50e7e54c745082a7a333ac2Mark Shellenbaumextern void *inj_alloc(size_t);
0a586cea3ceec7e5e50e7e54c745082a7a333ac2Mark Shellenbaumextern void *inj_zalloc(size_t);
0a586cea3ceec7e5e50e7e54c745082a7a333ac2Mark Shellenbaumextern void inj_free(void *, size_t);
148434217c040ea38dc844384f6ba68d9b325906Matthew Ahrens
fa9e4066f08beec538e775443c5be79dd423fcabahrens#ifdef __cplusplus
fa9e4066f08beec538e775443c5be79dd423fcabahrens}
79d728325e257b05859d2eef4a4dfbefdce05a76Matthew Ahrens#endif
fa9e4066f08beec538e775443c5be79dd423fcabahrens
744947dc83c634d985ed3ad79ac9c5e28d1865fdTom Erickson#endif /* _INJ_H */
744947dc83c634d985ed3ad79ac9c5e28d1865fdTom Erickson