blob: 8a0d342f7282f7c4b170b3d0958a1e0fa90fa62f [file] [log] [blame]
rsc5ba841d2005-01-04 21:21:32 +00001#ifndef _9PCLIENT_H_
2#define _9PCLIENT_H_ 1
3#ifdef __cplusplus
4extern "C" {
5#endif
6
7AUTOLIB(9pclient)
8/*
9 * Simple user-level 9P client.
10 */
11
12typedef struct CFsys CFsys;
13typedef struct CFid CFid;
14
15CFsys *fsinit(int);
16CFsys *fsmount(int, char*);
17
18int fsversion(CFsys*, int, char*, int);
19CFid *fsauth(CFsys*, char*);
20CFid *fsattach(CFsys*, CFid*, char*, char*);
21CFid *fsopen(CFsys*, char*, int);
22int fsopenfd(CFsys*, char*, int);
23long fsread(CFid*, void*, long);
24long fsreadn(CFid*, void*, long);
25long fswrite(CFid*, void*, long);
26void fsclose(CFid*);
27void fsunmount(CFsys*);
28struct Dir; /* in case there's no lib9.h */
29long fsdirread(CFid*, struct Dir**);
30long fsdirreadall(CFid*, struct Dir**);
31struct Dir *fsdirstat(CFsys*, char*);
32struct Dir *fsdirfstat(CFid*);
33int fsdirwstat(CFsys*, char*, struct Dir*);
34int fsdirfwstat(CFid*, struct Dir*);
35CFid *fsroot(CFsys*);
36void fssetroot(CFsys*, CFid*);
37CFsys *nsmount(char*, char*);
38
39#ifdef __cplusplus
40}
41#endif
42#endif