3 vtconnect, vthello, vtread, vtwrite, vtreadpacket, vtwritepacket, vtsync, vtping, vtrpc, ventidoublechecksha1 \- Venti client
11 .ta +\w'\fLPacket* 'u +\w'\fLxxxxxxxx'u
14 Packet* vtrpc(VtConn *z, Packet *p)
17 int vthello(VtConn *z)
20 int vtconnect(VtConn *z)
23 int vtread(VtConn *z, uchar score[VtScoreSize],
26 uint type, uchar *buf, int n)
29 int vtwrite(VtConn *z, uchar score[VtScoreSize],
32 uint type, uchar *buf, int n)
35 Packet* vtreadpacket(VtConn *z, uchar score[VtScoreSize],
41 int vtwritepacket(VtConn *z, uchar score[VtScoreSize],
53 extern int ventidoublechecksha1; /* default 1 */
55 These routines execute the client side of the
60 executes a single Venti RPC transaction, sending the request
63 and then waiting for and returning the response packet.
65 will set the tag in the packet.
71 is typically called only indirectly, via the functions below.
78 to the name used by the server.
80 is typically called only indirectly, via
90 in that order, returning success only
92 This sequence (calling
96 must be done before the functions below can be called.
99 reads the block with the given
104 stores the returned data
107 and returns the number of bytes read.
108 If the server's block has size larger than
121 as a block of the given
133 but return or accept the block contents in the
136 They avoid making a copy of the data.
139 causes the server to flush all pending write requests
140 to disk before returning.
143 executes a ping transaction with the server.
149 check that the SHA1 hash of the returned data
150 matches the requested
156 check that the returned
158 matches the SHA1 hash of the written data.
160 .I ventidoublechecksha1
161 to zero disables these extra checks,
162 mainly for benchmarking purposes.
163 Doing so in production code is not recommended.
165 These functions can be called from multiple threads
166 or procs simultaneously to issue requests
168 Programs that issue requests from multiple threads
169 in the same proc should start separate procs running
180 .IR venti-packet (3),
187 The other routines return \-1 on error.
190 returns 0 on success: there are no partial writes.