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 fswrite(CFid*, void*, long);
26 void fsclose(CFid*);
27 void fsunmount(CFsys*);
28 struct Dir; /* in case there's no lib9.h */
29 long fsdirread(CFid*, struct Dir**);
30 long fsdirreadall(CFid*, struct Dir**);
31 struct Dir *fsdirstat(CFsys*, char*);
32 struct Dir *fsdirfstat(CFid*);
33 int fsdirwstat(CFsys*, char*, struct Dir*);
34 int fsdirfwstat(CFid*, struct Dir*);
35 CFid *fsroot(CFsys*);
36 void fssetroot(CFsys*, CFid*);
37 CFsys *nsmount(char*, char*);
39 #ifdef __cplusplus
40 }
41 #endif
42 #endif