1 f7012583 2003-11-25 devnull #ifndef _VENTI_H_
2 f7012583 2003-11-25 devnull #define _VENTI_H_ 1
3 819822c9 2004-06-16 devnull #ifdef __cplusplus
4 f7012583 2003-11-25 devnull extern "C" {
8 1a0954ab 2005-01-04 devnull AUTOLIB(venti)
10 97a5e5f2 2003-11-23 devnull /* XXX should be own library? */
12 97a5e5f2 2003-11-23 devnull * Packets
16 cbeb0b26 2006-04-01 devnull MaxFragSize = 9*1024
19 97a5e5f2 2003-11-23 devnull typedef struct Packet Packet;
20 97a5e5f2 2003-11-23 devnull Packet *packetalloc(void);
21 97a5e5f2 2003-11-23 devnull void packetfree(Packet*);
22 97a5e5f2 2003-11-23 devnull Packet *packetforeign(uchar *buf, int n, void (*free)(void *a), void *a);
23 97a5e5f2 2003-11-23 devnull Packet *packetdup(Packet*, int offset, int n);
24 97a5e5f2 2003-11-23 devnull Packet *packetsplit(Packet*, int n);
25 97a5e5f2 2003-11-23 devnull int packetconsume(Packet*, uchar *buf, int n);
26 97a5e5f2 2003-11-23 devnull int packettrim(Packet*, int offset, int n);
27 97a5e5f2 2003-11-23 devnull uchar *packetheader(Packet*, int n);
28 97a5e5f2 2003-11-23 devnull uchar *packettrailer(Packet*, int n);
29 d23a617a 2004-03-15 devnull void packetprefix(Packet*, uchar *buf, int n);
30 d23a617a 2004-03-15 devnull void packetappend(Packet*, uchar *buf, int n);
31 d23a617a 2004-03-15 devnull void packetconcat(Packet*, Packet*);
32 97a5e5f2 2003-11-23 devnull uchar *packetpeek(Packet*, uchar *buf, int offset, int n);
33 97a5e5f2 2003-11-23 devnull int packetcopy(Packet*, uchar *buf, int offset, int n);
34 97a5e5f2 2003-11-23 devnull int packetfragments(Packet*, IOchunk*, int nio, int offset);
35 97a5e5f2 2003-11-23 devnull uint packetsize(Packet*);
36 97a5e5f2 2003-11-23 devnull uint packetasize(Packet*);
37 97a5e5f2 2003-11-23 devnull int packetcompact(Packet*);
38 97a5e5f2 2003-11-23 devnull int packetcmp(Packet*, Packet*);
39 97a5e5f2 2003-11-23 devnull void packetstats(void);
40 97a5e5f2 2003-11-23 devnull void packetsha1(Packet*, uchar sha1[20]);
42 6c0209f6 2005-02-11 devnull /* XXX should be own library? */
44 6c0209f6 2005-02-11 devnull * Logging
46 6c0209f6 2005-02-11 devnull typedef struct VtLog VtLog;
47 6c0209f6 2005-02-11 devnull typedef struct VtLogChunk VtLogChunk;
49 6c0209f6 2005-02-11 devnull struct VtLog
51 6c0209f6 2005-02-11 devnull VtLog *next; /* in hash table */
52 587f8f4d 2005-02-13 devnull char *name;
53 6c0209f6 2005-02-11 devnull VtLogChunk *chunk;
54 6c0209f6 2005-02-11 devnull uint nchunk;
55 6c0209f6 2005-02-11 devnull VtLogChunk *w;
56 6c0209f6 2005-02-11 devnull QLock lk;
60 587f8f4d 2005-02-13 devnull struct VtLogChunk
63 587f8f4d 2005-02-13 devnull char *ep;
64 587f8f4d 2005-02-13 devnull char *wp;
67 6c0209f6 2005-02-11 devnull VtLog *vtlogopen(char *name, uint size);
68 6c0209f6 2005-02-11 devnull void vtlogprint(VtLog *log, char *fmt, ...);
69 6c0209f6 2005-02-11 devnull void vtlog(char *name, char *fmt, ...);
70 587f8f4d 2005-02-13 devnull void vtlogclose(VtLog*);
71 6c0209f6 2005-02-11 devnull void vtlogremove(char *name);
72 1c485dae 2005-05-12 devnull char **vtlognames(int*);
73 587f8f4d 2005-02-13 devnull void vtlogdump(int fd, VtLog*);
75 6c0209f6 2005-02-11 devnull /* XXX begin actual venti.h */
77 97a5e5f2 2003-11-23 devnull typedef struct VtFcall VtFcall;
78 97a5e5f2 2003-11-23 devnull typedef struct VtConn VtConn;
79 97a5e5f2 2003-11-23 devnull typedef struct VtEntry VtEntry;
80 97a5e5f2 2003-11-23 devnull typedef struct VtRoot VtRoot;
83 97a5e5f2 2003-11-23 devnull * Fundamental constants.
87 97a5e5f2 2003-11-23 devnull VtScoreSize = 20,
88 97a5e5f2 2003-11-23 devnull VtMaxStringSize = 1024,
89 cbeb0b26 2006-04-01 devnull VtPointerDepth = 7
91 2db9e482 2003-11-24 devnull #define VtMaxFileSize ((1ULL<<48)-1)
95 97a5e5f2 2003-11-23 devnull * Strings in packets.
97 97a5e5f2 2003-11-23 devnull int vtputstring(Packet*, char*);
98 97a5e5f2 2003-11-23 devnull int vtgetstring(Packet*, char**);
101 97a5e5f2 2003-11-23 devnull * Block types.
103 97a5e5f2 2003-11-23 devnull * The initial Venti protocol had a much
104 97a5e5f2 2003-11-23 devnull * less regular list of block types.
105 97a5e5f2 2003-11-23 devnull * VtToDiskType converts from new to old.
109 97a5e5f2 2003-11-23 devnull VtDataType = 0<<3,
110 97a5e5f2 2003-11-23 devnull /* VtDataType+1, ... */
111 97a5e5f2 2003-11-23 devnull VtDirType = 1<<3,
112 97a5e5f2 2003-11-23 devnull /* VtDirType+1, ... */
113 97a5e5f2 2003-11-23 devnull VtRootType = 2<<3,
114 97a5e5f2 2003-11-23 devnull VtMaxType,
115 d3232caf 2004-06-14 devnull VtCorruptType = 0xFF,
117 97a5e5f2 2003-11-23 devnull VtTypeDepthMask = 7,
118 cbeb0b26 2006-04-01 devnull VtTypeBaseMask = ~VtTypeDepthMask
121 97a5e5f2 2003-11-23 devnull /* convert to/from on-disk type numbers */
122 97a5e5f2 2003-11-23 devnull uint vttodisktype(uint);
123 97a5e5f2 2003-11-23 devnull uint vtfromdisktype(uint);
126 97a5e5f2 2003-11-23 devnull * VtEntry describes a Venti stream
128 eacbfb24 2004-03-15 devnull * The _ enums are only used on the wire.
129 eacbfb24 2004-03-15 devnull * They are not present in the VtEntry structure
130 eacbfb24 2004-03-15 devnull * and should not be used by client programs.
131 eacbfb24 2004-03-15 devnull * (The info is in the type field.)
135 97a5e5f2 2003-11-23 devnull VtEntryActive = 1<<0, /* entry is in use */
136 d23a617a 2004-03-15 devnull _VtEntryDir = 1<<1, /* a directory */
137 d23a617a 2004-03-15 devnull _VtEntryDepthShift = 2, /* shift for pointer depth */
138 d23a617a 2004-03-15 devnull _VtEntryDepthMask = 7<<2, /* mask for pointer depth */
139 75d04888 2009-05-25 rsc VtEntryLocal = 1<<5, /* for local storage only */
140 75d04888 2009-05-25 rsc _VtEntryBig = 1<<6,
144 cbeb0b26 2006-04-01 devnull VtEntrySize = 40
146 97a5e5f2 2003-11-23 devnull struct VtEntry
148 97a5e5f2 2003-11-23 devnull ulong gen; /* generation number */
149 75d04888 2009-05-25 rsc ulong psize; /* pointer block size */
150 75d04888 2009-05-25 rsc ulong dsize; /* data block size */
151 97a5e5f2 2003-11-23 devnull uchar type;
152 97a5e5f2 2003-11-23 devnull uchar flags;
153 97a5e5f2 2003-11-23 devnull uvlong size;
154 97a5e5f2 2003-11-23 devnull uchar score[VtScoreSize];
157 97a5e5f2 2003-11-23 devnull void vtentrypack(VtEntry*, uchar*, int index);
158 97a5e5f2 2003-11-23 devnull int vtentryunpack(VtEntry*, uchar*, int index);
160 97a5e5f2 2003-11-23 devnull struct VtRoot
162 97a5e5f2 2003-11-23 devnull char name[128];
163 97a5e5f2 2003-11-23 devnull char type[128];
164 97a5e5f2 2003-11-23 devnull uchar score[VtScoreSize]; /* to a Dir block */
165 75d04888 2009-05-25 rsc ulong blocksize; /* maximum block size */
166 97a5e5f2 2003-11-23 devnull uchar prev[VtScoreSize]; /* last root block */
171 97a5e5f2 2003-11-23 devnull VtRootSize = 300,
172 75d04888 2009-05-25 rsc VtRootVersion = 2,
173 75d04888 2009-05-25 rsc _VtRootVersionBig = 1<<15,
176 97a5e5f2 2003-11-23 devnull void vtrootpack(VtRoot*, uchar*);
177 97a5e5f2 2003-11-23 devnull int vtrootunpack(VtRoot*, uchar*);
180 97a5e5f2 2003-11-23 devnull * score of zero length block
182 97a5e5f2 2003-11-23 devnull extern uchar vtzeroscore[VtScoreSize];
185 97a5e5f2 2003-11-23 devnull * zero extend and truncate blocks
187 97a5e5f2 2003-11-23 devnull void vtzeroextend(int type, uchar *buf, uint n, uint nn);
188 97a5e5f2 2003-11-23 devnull uint vtzerotruncate(int type, uchar *buf, uint n);
191 97a5e5f2 2003-11-23 devnull * parse score: mungs s
193 d23a617a 2004-03-15 devnull int vtparsescore(char *s, char **prefix, uchar[VtScoreSize]);
196 97a5e5f2 2003-11-23 devnull * formatting
197 97a5e5f2 2003-11-23 devnull * other than noted, these formats all ignore
198 97a5e5f2 2003-11-23 devnull * the width and precision arguments, and all flags
200 97a5e5f2 2003-11-23 devnull * V a venti score
203 97a5e5f2 2003-11-23 devnull int vtscorefmt(Fmt*);
206 97a5e5f2 2003-11-23 devnull * error-checking malloc et al.
208 97a5e5f2 2003-11-23 devnull void vtfree(void *);
209 97a5e5f2 2003-11-23 devnull void *vtmalloc(int);
210 97a5e5f2 2003-11-23 devnull void *vtmallocz(int);
211 97a5e5f2 2003-11-23 devnull void *vtrealloc(void *p, int);
212 97a5e5f2 2003-11-23 devnull void *vtbrk(int n);
213 97a5e5f2 2003-11-23 devnull char *vtstrdup(char *);
216 97a5e5f2 2003-11-23 devnull * Venti protocol
220 97a5e5f2 2003-11-23 devnull * Crypto strengths
224 97a5e5f2 2003-11-23 devnull VtCryptoStrengthNone,
225 97a5e5f2 2003-11-23 devnull VtCryptoStrengthAuth,
226 97a5e5f2 2003-11-23 devnull VtCryptoStrengthWeak,
227 cbeb0b26 2006-04-01 devnull VtCryptoStrengthStrong
231 97a5e5f2 2003-11-23 devnull * Crypto suites
235 97a5e5f2 2003-11-23 devnull VtCryptoNone,
236 97a5e5f2 2003-11-23 devnull VtCryptoSSL3,
237 97a5e5f2 2003-11-23 devnull VtCryptoTLS1,
238 cbeb0b26 2006-04-01 devnull VtCryptoMax
242 97a5e5f2 2003-11-23 devnull * Codecs
246 97a5e5f2 2003-11-23 devnull VtCodecNone,
247 97a5e5f2 2003-11-23 devnull VtCodecDeflate,
248 97a5e5f2 2003-11-23 devnull VtCodecThwack,
249 97a5e5f2 2003-11-23 devnull VtCodecMax
254 97a5e5f2 2003-11-23 devnull VtRerror = 1,
255 97a5e5f2 2003-11-23 devnull VtTping = 2,
256 97a5e5f2 2003-11-23 devnull VtRping,
257 97a5e5f2 2003-11-23 devnull VtThello = 4,
258 97a5e5f2 2003-11-23 devnull VtRhello,
259 97a5e5f2 2003-11-23 devnull VtTgoodbye = 6,
260 97a5e5f2 2003-11-23 devnull VtRgoodbye, /* not used */
261 97a5e5f2 2003-11-23 devnull VtTauth0 = 8,
262 97a5e5f2 2003-11-23 devnull VtRauth0,
263 97a5e5f2 2003-11-23 devnull VtTauth1 = 10,
264 97a5e5f2 2003-11-23 devnull VtRauth1,
265 97a5e5f2 2003-11-23 devnull VtTread = 12,
266 97a5e5f2 2003-11-23 devnull VtRread,
267 97a5e5f2 2003-11-23 devnull VtTwrite = 14,
268 97a5e5f2 2003-11-23 devnull VtRwrite,
269 97a5e5f2 2003-11-23 devnull VtTsync = 16,
270 97a5e5f2 2003-11-23 devnull VtRsync,
275 97a5e5f2 2003-11-23 devnull struct VtFcall
277 7e6f40b2 2005-07-13 devnull uchar msgtype;
278 97a5e5f2 2003-11-23 devnull uchar tag;
280 97a5e5f2 2003-11-23 devnull char *error; /* Rerror */
282 97a5e5f2 2003-11-23 devnull char *version; /* Thello */
283 97a5e5f2 2003-11-23 devnull char *uid; /* Thello */
284 97a5e5f2 2003-11-23 devnull uchar strength; /* Thello */
285 97a5e5f2 2003-11-23 devnull uchar *crypto; /* Thello */
286 97a5e5f2 2003-11-23 devnull uint ncrypto; /* Thello */
287 97a5e5f2 2003-11-23 devnull uchar *codec; /* Thello */
288 97a5e5f2 2003-11-23 devnull uint ncodec; /* Thello */
289 97a5e5f2 2003-11-23 devnull char *sid; /* Rhello */
290 97a5e5f2 2003-11-23 devnull uchar rcrypto; /* Rhello */
291 97a5e5f2 2003-11-23 devnull uchar rcodec; /* Rhello */
292 97a5e5f2 2003-11-23 devnull uchar *auth; /* TauthX, RauthX */
293 97a5e5f2 2003-11-23 devnull uint nauth; /* TauthX, RauthX */
294 97a5e5f2 2003-11-23 devnull uchar score[VtScoreSize]; /* Tread, Rwrite */
295 7e6f40b2 2005-07-13 devnull uchar blocktype; /* Tread, Twrite */
296 33b446b8 2009-05-25 rsc uint count; /* Tread */
297 97a5e5f2 2003-11-23 devnull Packet *data; /* Rread, Twrite */
300 97a5e5f2 2003-11-23 devnull Packet *vtfcallpack(VtFcall*);
301 97a5e5f2 2003-11-23 devnull int vtfcallunpack(VtFcall*, Packet*);
302 97a5e5f2 2003-11-23 devnull void vtfcallclear(VtFcall*);
303 97a5e5f2 2003-11-23 devnull int vtfcallfmt(Fmt*);
307 97a5e5f2 2003-11-23 devnull VtStateAlloc,
308 97a5e5f2 2003-11-23 devnull VtStateConnected,
309 cbeb0b26 2006-04-01 devnull VtStateClosed
312 97a5e5f2 2003-11-23 devnull struct VtConn
314 97a5e5f2 2003-11-23 devnull QLock lk;
315 97a5e5f2 2003-11-23 devnull QLock inlk;
316 97a5e5f2 2003-11-23 devnull QLock outlk;
317 97a5e5f2 2003-11-23 devnull int debug;
318 97a5e5f2 2003-11-23 devnull int infd;
319 97a5e5f2 2003-11-23 devnull int outfd;
320 97a5e5f2 2003-11-23 devnull int muxer;
321 97a5e5f2 2003-11-23 devnull void *writeq;
322 97a5e5f2 2003-11-23 devnull void *readq;
323 97a5e5f2 2003-11-23 devnull int state;
324 97a5e5f2 2003-11-23 devnull void *wait[256];
325 97a5e5f2 2003-11-23 devnull uint ntag;
326 97a5e5f2 2003-11-23 devnull uint nsleep;
327 97a5e5f2 2003-11-23 devnull Packet *part;
328 97a5e5f2 2003-11-23 devnull Rendez tagrend;
329 97a5e5f2 2003-11-23 devnull Rendez rpcfork;
330 97a5e5f2 2003-11-23 devnull char *version;
331 97a5e5f2 2003-11-23 devnull char *uid;
332 97a5e5f2 2003-11-23 devnull char *sid;
333 587f8f4d 2005-02-13 devnull char addr[256]; /* address of other side */
336 97a5e5f2 2003-11-23 devnull VtConn *vtconn(int infd, int outfd);
337 97a5e5f2 2003-11-23 devnull VtConn *vtdial(char*);
338 97a5e5f2 2003-11-23 devnull void vtfreeconn(VtConn*);
339 97a5e5f2 2003-11-23 devnull int vtsend(VtConn*, Packet*);
340 97a5e5f2 2003-11-23 devnull Packet *vtrecv(VtConn*);
341 97a5e5f2 2003-11-23 devnull int vtversion(VtConn *z);
342 97a5e5f2 2003-11-23 devnull void vtdebug(VtConn *z, char*, ...);
343 97a5e5f2 2003-11-23 devnull void vthangup(VtConn *z);
344 6fc7da3c 2006-10-19 devnull int vtgoodbye(VtConn *z);
346 97a5e5f2 2003-11-23 devnull /* #pragma varargck argpos vtdebug 2 */
348 97a5e5f2 2003-11-23 devnull /* server */
349 97a5e5f2 2003-11-23 devnull typedef struct VtSrv VtSrv;
350 97a5e5f2 2003-11-23 devnull typedef struct VtReq VtReq;
351 97a5e5f2 2003-11-23 devnull struct VtReq
353 97a5e5f2 2003-11-23 devnull VtFcall tx;
354 97a5e5f2 2003-11-23 devnull VtFcall rx;
355 97a5e5f2 2003-11-23 devnull /* private */
356 97a5e5f2 2003-11-23 devnull VtSrv *srv;
357 97a5e5f2 2003-11-23 devnull void *sc;
360 97a5e5f2 2003-11-23 devnull int vtsrvhello(VtConn*);
361 97a5e5f2 2003-11-23 devnull VtSrv *vtlisten(char *addr);
362 97a5e5f2 2003-11-23 devnull VtReq *vtgetreq(VtSrv*);
363 97a5e5f2 2003-11-23 devnull void vtrespond(VtReq*);
365 97a5e5f2 2003-11-23 devnull /* client */
366 97a5e5f2 2003-11-23 devnull Packet *vtrpc(VtConn*, Packet*);
367 7252036f 2005-11-02 devnull Packet *_vtrpc(VtConn*, Packet*, VtFcall*);
368 97a5e5f2 2003-11-23 devnull void vtrecvproc(void*); /* VtConn* */
369 97a5e5f2 2003-11-23 devnull void vtsendproc(void*); /* VtConn* */
371 97a5e5f2 2003-11-23 devnull int vtconnect(VtConn*);
372 97a5e5f2 2003-11-23 devnull int vthello(VtConn*);
373 97a5e5f2 2003-11-23 devnull int vtread(VtConn*, uchar score[VtScoreSize], uint type, uchar *buf, int n);
374 97a5e5f2 2003-11-23 devnull int vtwrite(VtConn*, uchar score[VtScoreSize], uint type, uchar *buf, int n);
375 97a5e5f2 2003-11-23 devnull Packet *vtreadpacket(VtConn*, uchar score[VtScoreSize], uint type, int n);
376 97a5e5f2 2003-11-23 devnull int vtwritepacket(VtConn*, uchar score[VtScoreSize], uint type, Packet *p);
377 97a5e5f2 2003-11-23 devnull int vtsync(VtConn*);
378 97a5e5f2 2003-11-23 devnull int vtping(VtConn*);
381 97a5e5f2 2003-11-23 devnull * Data blocks and block cache.
385 cbeb0b26 2006-04-01 devnull NilBlock = ~0
388 97a5e5f2 2003-11-23 devnull typedef struct VtBlock VtBlock;
389 97a5e5f2 2003-11-23 devnull typedef struct VtCache VtCache;
391 97a5e5f2 2003-11-23 devnull struct VtBlock
393 97a5e5f2 2003-11-23 devnull VtCache *c;
394 97a5e5f2 2003-11-23 devnull QLock lk;
396 97a5e5f2 2003-11-23 devnull uchar *data;
397 97a5e5f2 2003-11-23 devnull uchar score[VtScoreSize];
398 75d04888 2009-05-25 rsc uchar type; /* VtXXX */
401 97a5e5f2 2003-11-23 devnull /* internal to cache */
402 97a5e5f2 2003-11-23 devnull int nlock;
403 97a5e5f2 2003-11-23 devnull int iostate;
404 97a5e5f2 2003-11-23 devnull int ref;
405 97a5e5f2 2003-11-23 devnull u32int heap;
406 97a5e5f2 2003-11-23 devnull VtBlock *next;
407 97a5e5f2 2003-11-23 devnull VtBlock **prev;
408 97a5e5f2 2003-11-23 devnull u32int used;
409 97a5e5f2 2003-11-23 devnull u32int used2;
410 97a5e5f2 2003-11-23 devnull u32int addr;
411 6fc7da3c 2006-10-19 devnull uintptr pc;
414 97a5e5f2 2003-11-23 devnull u32int vtglobaltolocal(uchar[VtScoreSize]);
415 97a5e5f2 2003-11-23 devnull void vtlocaltoglobal(u32int, uchar[VtScoreSize]);
417 75d04888 2009-05-25 rsc VtCache *vtcachealloc(VtConn*, ulong maxmem);
418 97a5e5f2 2003-11-23 devnull void vtcachefree(VtCache*);
419 97a5e5f2 2003-11-23 devnull VtBlock *vtcachelocal(VtCache*, u32int addr, int type);
420 75d04888 2009-05-25 rsc VtBlock *vtcacheglobal(VtCache*, uchar[VtScoreSize], int type, ulong size);
421 75d04888 2009-05-25 rsc VtBlock *vtcacheallocblock(VtCache*, int type, ulong size);
422 b98ae9bf 2004-06-17 devnull void vtcachesetwrite(VtCache*, int(*)(VtConn*,uchar[VtScoreSize],uint,uchar*,int));
423 97a5e5f2 2003-11-23 devnull void vtblockput(VtBlock*);
424 97a5e5f2 2003-11-23 devnull int vtblockwrite(VtBlock*);
425 97a5e5f2 2003-11-23 devnull VtBlock *vtblockcopy(VtBlock*);
426 97a5e5f2 2003-11-23 devnull void vtblockduplock(VtBlock*);
428 7252036f 2005-11-02 devnull extern int vtcachencopy, vtcachenread, vtcachenwrite;
429 11b0772a 2006-05-05 devnull extern int vttracelevel;
432 97a5e5f2 2003-11-23 devnull * Hash tree file tree.
434 97a5e5f2 2003-11-23 devnull typedef struct VtFile VtFile;
435 d23a617a 2004-03-15 devnull struct VtFile
437 d23a617a 2004-03-15 devnull QLock lk;
438 d23a617a 2004-03-15 devnull int ref;
439 d23a617a 2004-03-15 devnull int local;
440 d23a617a 2004-03-15 devnull VtBlock *b; /* block containing this file */
441 d23a617a 2004-03-15 devnull uchar score[VtScoreSize]; /* score of block containing this file */
442 75d04888 2009-05-25 rsc int bsize; /* size of block */
444 d23a617a 2004-03-15 devnull /* immutable */
445 d23a617a 2004-03-15 devnull VtCache *c;
446 d23a617a 2004-03-15 devnull int mode;
447 d23a617a 2004-03-15 devnull u32int gen;
448 d23a617a 2004-03-15 devnull int dsize;
449 2e3b8096 2005-07-13 devnull int psize;
450 d23a617a 2004-03-15 devnull int dir;
451 d23a617a 2004-03-15 devnull VtFile *parent;
452 d23a617a 2004-03-15 devnull int epb; /* entries per block in parent */
453 d23a617a 2004-03-15 devnull u32int offset; /* entry offset in parent */
458 97a5e5f2 2003-11-23 devnull VtOREAD,
459 97a5e5f2 2003-11-23 devnull VtOWRITE,
463 97a5e5f2 2003-11-23 devnull VtFile *vtfileopenroot(VtCache*, VtEntry*);
464 97a5e5f2 2003-11-23 devnull VtFile *vtfilecreateroot(VtCache*, int psize, int dsize, int type);
465 97a5e5f2 2003-11-23 devnull VtFile *vtfileopen(VtFile*, u32int, int);
466 97a5e5f2 2003-11-23 devnull VtFile *vtfilecreate(VtFile*, int psize, int dsize, int dir);
467 23fb2edb 2005-07-24 devnull VtFile *_vtfilecreate(VtFile*, int offset, int psize, int dsize, int dir);
468 97a5e5f2 2003-11-23 devnull VtBlock *vtfileblock(VtFile*, u32int, int mode);
469 97a5e5f2 2003-11-23 devnull long vtfileread(VtFile*, void*, long, vlong);
470 97a5e5f2 2003-11-23 devnull long vtfilewrite(VtFile*, void*, long, vlong);
471 97a5e5f2 2003-11-23 devnull int vtfileflush(VtFile*);
472 97a5e5f2 2003-11-23 devnull void vtfileincref(VtFile*);
473 97a5e5f2 2003-11-23 devnull void vtfileclose(VtFile*);
474 97a5e5f2 2003-11-23 devnull int vtfilegetentry(VtFile*, VtEntry*);
475 d23a617a 2004-03-15 devnull int vtfilesetentry(VtFile*, VtEntry*);
476 97a5e5f2 2003-11-23 devnull int vtfileblockscore(VtFile*, u32int, uchar[VtScoreSize]);
477 97a5e5f2 2003-11-23 devnull u32int vtfilegetdirsize(VtFile*);
478 97a5e5f2 2003-11-23 devnull int vtfilesetdirsize(VtFile*, u32int);
479 97a5e5f2 2003-11-23 devnull void vtfileunlock(VtFile*);
480 97a5e5f2 2003-11-23 devnull int vtfilelock(VtFile*, int);
481 97a5e5f2 2003-11-23 devnull int vtfilelock2(VtFile*, VtFile*, int);
482 3f6a501b 2005-12-30 devnull int vtfileflushbefore(VtFile*, u64int);
483 d23a617a 2004-03-15 devnull int vtfiletruncate(VtFile*);
484 d23a617a 2004-03-15 devnull uvlong vtfilegetsize(VtFile*);
485 3f6a501b 2005-12-30 devnull int vtfilesetsize(VtFile*, u64int);
486 d23a617a 2004-03-15 devnull int vtfileremove(VtFile*);
488 d20564a9 2006-07-18 devnull extern int vttimefmt(Fmt*);
490 a09e80f9 2004-05-23 devnull extern int chattyventi;
491 a09e80f9 2004-05-23 devnull extern int ventidoublechecksha1;
492 5810cad0 2005-02-15 devnull extern int ventilogging;
494 587f8f4d 2005-02-13 devnull extern char *VtServerLog;
496 819822c9 2004-06-16 devnull #ifdef __cplusplus