00001 #ifndef _TRACEIO_H_ 00002 #define _TRACEIO_H_ 00003 00004 #include <types.h> 00005 00006 // for open mode 00007 #define DISKMON_TRACE 0 00008 #define SYNTHETIC_TRACE 1 00009 00010 00011 typedef void *traceio_handler; 00012 00013 #define READ 0 00014 #define WRITE 1 00015 #define TRIM 2 00016 00017 struct op_unit { 00018 _u32 op; 00019 _u32 sector; 00020 _u32 length; 00021 }; 00022 00023 extern traceio_handler open_traceio(char *filename, int mode); 00024 extern void close_traceio(traceio_handler handler); 00025 extern struct op_unit next_op(traceio_handler handler); 00026 extern int is_valid_op_unit(struct op_unit op_unit); 00027 extern int is_last(struct op_unit op_unit); 00028 00029 #endif