plan9port/include/9pclient.h

51 lines
1.2 KiB
C
Raw Normal View History

2005-01-04 21:21:32 +00:00
#ifndef _9PCLIENT_H_
#define _9PCLIENT_H_ 1
#ifdef __cplusplus
extern "C" {
#endif
AUTOLIB(9pclient)
/*
* Simple user-level 9P client.
*/
typedef struct CFsys CFsys;
typedef struct CFid CFid;
CFsys *fsinit(int);
CFsys *fsmount(int, char*);
int fsversion(CFsys*, int, char*, int);
2005-02-08 21:06:39 +00:00
CFid *fsauth(CFsys*, char*, char*);
2005-01-04 21:21:32 +00:00
CFid *fsattach(CFsys*, CFid*, char*, char*);
CFid *fsopen(CFsys*, char*, int);
int fsopenfd(CFsys*, char*, int);
long fsread(CFid*, void*, long);
long fsreadn(CFid*, void*, long);
2005-01-18 18:11:39 +00:00
long fspread(CFid*, void*, long, vlong);
long fspwrite(CFid*, void*, long, vlong);
vlong fsseek(CFid*, vlong, int);
2005-01-04 21:21:32 +00:00
long fswrite(CFid*, void*, long);
void fsclose(CFid*);
void fsunmount(CFsys*);
2005-02-10 16:08:16 +00:00
void _fsunmount(CFsys*); /* do not close fd */
2005-01-04 21:21:32 +00:00
struct Dir; /* in case there's no lib9.h */
long fsdirread(CFid*, struct Dir**);
long fsdirreadall(CFid*, struct Dir**);
struct Dir *fsdirstat(CFsys*, char*);
struct Dir *fsdirfstat(CFid*);
int fsdirwstat(CFsys*, char*, struct Dir*);
int fsdirfwstat(CFid*, struct Dir*);
CFid *fsroot(CFsys*);
void fssetroot(CFsys*, CFid*);
2005-02-10 16:08:16 +00:00
CFsys *nsinit(char*);
2005-01-04 21:21:32 +00:00
CFsys *nsmount(char*, char*);
2005-02-08 21:06:39 +00:00
CFid *nsopen(char*, char*, char*, int);
2005-01-04 21:21:32 +00:00
2005-02-10 16:08:16 +00:00
extern int chatty9pclient;
2005-01-04 21:21:32 +00:00
#ifdef __cplusplus
}
#endif
#endif