fsfuzz

small fs fuzzer
git clone git://git.2f30.org/fsfuzz
Log | Files | Refs

fsfuzz.h (587B)


      1 #ifndef FSFUZZ_H
      2 #define FSFUZZ_H
      3 
      4 #include <stddef.h>
      5 
      6 #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
      7 
      8 struct fsfuzz_info {
      9 	/* Pointer to actual image */
     10 	void *img;
     11 	/* Size of image on disk */
     12 	size_t size;
     13 	/* Number of completed fuzzing sessions */
     14 	int genertion;
     15 	/* Verbose level */
     16 	int verbosity;
     17 	/* Private data */
     18 	void *priv_data;
     19 };
     20 
     21 struct fsfuzz_ops {
     22 	const char *name;
     23 
     24 	int (*init)(struct fsfuzz_info *fs_info);
     25 	int (*free)(struct fsfuzz_info *fs_info);
     26 	int (*fuzz)(struct fsfuzz_info *fs_info);
     27 };
     28 
     29 void fsfuzz_register(struct fsfuzz_ops *ops);
     30 
     31 #endif