/*
* Minimalist 9p implementation.
*
* Copyright (c) 2010 Corpus Callosum Corporation. All rights reserved.
*/
typedef struct Fid Fid;
typedef struct Req Req;
typedef struct File File;
struct Fid
{
int fid;
File *file;
ushort flags;
short readers;
ulong vers;
Fid *next;
};
struct File
{
Dir dir;
};
struct Req
{
uint8 port;
uchar indata[Messagesize];
uchar outdata[Messagesize];
Fcall ifcall;
Fcall ofcall;
Fid* fid;
};
void readstr(Req*, char*);
void readbuf(Req*, void*, long);
|