buse/buse.h

30 lines
732 B
C
Raw Normal View History

#ifndef BUSE_H_INCLUDED
#define BUSE_H_INCLUDED
2012-12-07 07:13:43 +01:00
#ifdef __cplusplus
extern "C" {
#endif
2012-12-07 12:58:26 +01:00
/* Most of this file was copied from nbd.h in the nbd distribution. */
#include <linux/types.h>
#include <sys/types.h>
#include <linux/nbd.h>
2012-12-07 12:58:26 +01:00
struct buse_operations {
int (*read)(void *buf, u_int32_t len, u_int64_t offset, void *userdata);
int (*write)(const void *buf, u_int32_t len, u_int64_t offset, void *userdata);
void (*disc)(void *userdata);
int (*flush)(void *userdata);
int (*trim)(u_int64_t from, u_int32_t len, void *userdata);
u_int64_t size;
2012-12-07 12:58:26 +01:00
};
2012-12-07 12:58:26 +01:00
int buse_main(const char* dev_file, const struct buse_operations *bop, void *userdata);
2011-09-20 10:31:35 +02:00
2012-12-07 07:13:43 +01:00
#ifdef __cplusplus
}
#endif
#endif /* BUSE_H_INCLUDED */