| ---
t9pclient.h (1593B)
---
1 #ifndef _9PCLIENT_H_
2 #define _9PCLIENT_H_ 1
3 #ifdef __cplusplus
4 extern "C" {
5 #endif
6
7 AUTOLIB(9pclient)
8 /*
9 * Simple user-level 9P client.
10 */
11
12 typedef struct CFsys CFsys;
13 typedef struct CFid CFid;
14
15 CFsys *fsinit(int);
16 CFsys *fsmount(int, char*);
17
18 int fsversion(CFsys*, int, char*, int);
19 CFid *fsauth(CFsys*, char*, char*);
20 CFid *fsattach(CFsys*, CFid*, char*, char*);
21 CFid *fsopen(CFsys*, char*, int);
22 int fsopenfd(CFsys*, char*, int);
23 long fsread(CFid*, void*, long);
24 long fsreadn(CFid*, void*, long);
25 long fspread(CFid*, void*, long, vlong);
26 long fspwrite(CFid*, void*, long, vlong);
27 vlong fsseek(CFid*, vlong, int);
28 long fswrite(CFid*, void*, long);
29 void fsclose(CFid*);
30 void fsunmount(CFsys*);
31 void _fsunmount(CFsys*); /* do not close fd */
32 struct Dir; /* in case there's no lib9.h */
33 long fsdirread(CFid*, struct Dir**);
34 long fsdirreadall(CFid*, struct Dir**);
35 struct Dir *fsdirstat(CFsys*, char*);
36 struct Dir *fsdirfstat(CFid*);
37 int fsdirwstat(CFsys*, char*, struct Dir*);
38 int fsdirfwstat(CFid*, struct Dir*);
39 CFid *fsroot(CFsys*);
40 void fssetroot(CFsys*, CFid*);
41 CFsys *nsinit(char*);
42 CFsys *nsmount(char*, char*);
43 CFid *nsopen(char*, char*, char*, int);
44 int fsfremove(CFid*);
45 int fsremove(CFsys*, char*);
46 CFid *fscreate(CFsys*, char*, int, ulong);
47 int fsaccess(CFsys*, char*, int);
48 int fsvprint(CFid*, char*, va_list);
49 int fsprint(CFid*, char*, ...);
50 Qid fsqid(CFid*);
51
52 /* manipulate unopened fids */
53 CFid *fswalk(CFid*, char*);
54 int fsfopen(CFid*, int);
55 int fsfcreate(CFid*, char*, int, ulong);
56
57 extern int chatty9pclient;
58 extern int eofkill9pclient;
59
60 #ifdef __cplusplus
61 }
62 #endif
63 #endif |