summaryrefslogtreecommitdiff
path: root/libstore/store.h
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2001-09-28 04:27:36 +0000
committerRoland McGrath <roland@gnu.org>2001-09-28 04:27:36 +0000
commit67c6375f7190bea8a6afdc2dcca2c8928651f030 (patch)
tree82120297684891ca6636cd79c8bff77745208c11 /libstore/store.h
parent6f395c4e7d9cfd7225a8b0a899100432ac4111f0 (diff)
2001-09-27 Roland McGrath <roland@frob.com>
* nbd.c: New file. * Makefile (SRCS): Add it. * store.h (store_nbd_open, _store_nbd_create): Declare them.
Diffstat (limited to 'libstore/store.h')
-rw-r--r--libstore/store.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/libstore/store.h b/libstore/store.h
index 8ca98b77..72600401 100644
--- a/libstore/store.h
+++ b/libstore/store.h
@@ -382,6 +382,18 @@ error_t _store_task_create (task_t task, int flags, size_t block_size,
corresponding store in STORE. */
error_t store_task_open (const char *name, int flags, struct store **store);
+/* Open the network block device NAME (parsed as "HOSTNAME:PORT[/BLOCKSIZE]"),
+ and return the corresponding store in STORE. This opens a socket and
+ initial connection handshake, which determine the size of the device,
+ and then uses _store_nbd_create with the open socket port. */
+error_t store_nbd_open (const char *name, int flags, struct store **store);
+
+/* Create a store that works by talking to an nbd server on an existing
+ socket port. */
+error_t _store_nbd_create (mach_port_t port, int flags, size_t block_size,
+ const struct store_run *runs, size_t num_runs,
+ struct store **store);
+
/* Parse multiple store names in NAME, and open each individually, returning
all in the vector STORES, and the number in NUM_STORES. The syntax of
NAME is a single non-alpha-numeric separator character, followed by each