Revision b90fb4b8 nbd.h
b/nbd.h | ||
---|---|---|
37 | 37 |
uint64_t handle; |
38 | 38 |
} QEMU_PACKED; |
39 | 39 |
|
40 |
#define NBD_FLAG_HAS_FLAGS (1 << 0) /* Flags are there */ |
|
41 |
#define NBD_FLAG_READ_ONLY (1 << 1) /* Device is read-only */ |
|
42 |
|
|
40 | 43 |
enum { |
41 | 44 |
NBD_CMD_READ = 0, |
42 | 45 |
NBD_CMD_WRITE = 1, |
... | ... | |
53 | 56 |
int unix_socket_outgoing(const char *path); |
54 | 57 |
int unix_socket_incoming(const char *path); |
55 | 58 |
|
56 |
int nbd_negotiate(int csock, off_t size); |
|
59 |
int nbd_negotiate(int csock, off_t size, uint32_t flags);
|
|
57 | 60 |
int nbd_receive_negotiate(int csock, const char *name, uint32_t *flags, |
58 | 61 |
off_t *size, size_t *blocksize); |
59 |
int nbd_init(int fd, int csock, off_t size, size_t blocksize); |
|
62 |
int nbd_init(int fd, int csock, uint32_t flags, off_t size, size_t blocksize);
|
|
60 | 63 |
int nbd_send_request(int csock, struct nbd_request *request); |
61 | 64 |
int nbd_receive_reply(int csock, struct nbd_reply *reply); |
62 | 65 |
int nbd_trip(BlockDriverState *bs, int csock, off_t size, uint64_t dev_offset, |
63 |
off_t *offset, bool readonly, uint8_t *data, int data_size);
|
|
66 |
off_t *offset, uint32_t nbdflags, uint8_t *data, int data_size);
|
|
64 | 67 |
int nbd_client(int fd); |
65 | 68 |
int nbd_disconnect(int fd); |
66 | 69 |
|
Also available in: Unified diff