Blob


1 #ifndef _9PCLIENT_H_
2 #define _9PCLIENT_H_ 1
3 #ifdef __cplusplus
4 extern "C" {
5 #endif
7 AUTOLIB(9pclient)
8 /*
9 * Simple user-level 9P client.
10 */
12 typedef struct CFsys CFsys;
13 typedef struct CFid CFid;
15 CFsys *fsinit(int);
16 CFsys *fsmount(int, char*);
18 int fsversion(CFsys*, int, char*, int);
19 CFid *fsauth(CFsys*, 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 struct Dir; /* in case there's no lib9.h */
32 long fsdirread(CFid*, struct Dir**);
33 long fsdirreadall(CFid*, struct Dir**);
34 struct Dir *fsdirstat(CFsys*, char*);
35 struct Dir *fsdirfstat(CFid*);
36 int fsdirwstat(CFsys*, char*, struct Dir*);
37 int fsdirfwstat(CFid*, struct Dir*);
38 CFid *fsroot(CFsys*);
39 void fssetroot(CFsys*, CFid*);
40 CFsys *nsmount(char*, char*);
42 #ifdef __cplusplus
43 }
44 #endif
45 #endif