minix/minix/commands/swifi/swifi.h
David van Moolenbroek 875abb8724 swifi: various improvements
- no longer inject fewer faults than instructed;
- no longer apply a limit on the number of injected faults;
- refactory to allow for random faults (type 99);
- also allow for stop faults (type 50);
- massive dead code cleanup;
- move outdated test cruft into tests/ subdirectory; it is kept only
  as an example of how to use swifi.

Change-Id: I8a3cb71902dfaadb7bf785723b917307db83d0d5
2015-09-23 12:03:12 +00:00

26 lines
517 B
C

#ifndef _SWIFI_H
#define _SWIFI_H
#include <stdlib.h>
#define TEXT_FAULT 0
#define INIT_FAULT 3
#define NOP_FAULT 4
#define DST_FAULT 5
#define SRC_FAULT 6
#define BRANCH_FAULT 7
#define PTR_FAULT 8
#define LOOP_FAULT 12
#define INTERFACE_FAULT 14
#define IRQ_FAULT 26
#define STOP_FAULT 50
#define RANDOM_FAULT 99
void
swifi_inject_fault(char * module,
unsigned long faultType,
unsigned long randomSeed,
unsigned long numFaults);
#endif /* _SWIFI_H */