IxpFHdr3
Usage
typedef struct
IxpFcall
IxpFcall;
typedef union
IxpFcall
IxpFcall;
IxpFHdr hdr;
IxpFVersion version;
IxpFVersion tversion;
IxpFVersion rversion;
IxpFTFlush tflush;
IxpFROpen ropen;
IxpFROpen rcreate;
IxpFROpen rattach;
IxpFError error;
IxpFRAuth rauth;
IxpFAttach tattach;
IxpFAttach tauth;
IxpFTCreate tcreate;
IxpFTCreate topen;
IxpFTWalk twalk;
IxpFRWalk rwalk;
IxpFTWStat twstat;
IxpFRStat rstat;
IxpFIO twrite;
IxpFIO rwrite;
IxpFIO tread;
IxpFIO rread;
IxpFIO io;
P9_TVersion =
100,
P9_TAuth =
102,
P9_TAttach =
104,
P9_TError =
106,
/*
illegal
*/
P9_TFlush =
108,
P9_TWalk =
110,
P9_TOpen =
112,
P9_TCreate =
114,
P9_TRead =
116,
P9_TWrite =
118,
P9_TClunk =
120,
P9_TRemove =
122,
P9_TStat =
124,
P9_TWStat =
126,
typedef struct
IxpFAttach
IxpFAttach;
IxpFHdr hdr;
uint32_t afid;
typedef struct
IxpFError
IxpFError;
IxpFHdr hdr;
typedef struct
IxpFHdr
IxpFHdr;
uint8_t type;
uint16_t tag;
uint32_t fid;
typedef struct
IxpFIO
IxpFIO;
IxpFHdr hdr;
uint64_t offset;
/*
Tread,
Twrite
*/
uint32_t count;
/*
Tread,
Twrite,
Rread
*/
typedef struct
IxpFRAuth
IxpFRAuth;
IxpFHdr hdr;
IxpQid aqid;
typedef struct
IxpFROpen
IxpFROpen;
IxpFHdr hdr;
IxpQid qid;
/*
+Rattach
*/
uint32_t iounit;
typedef struct
IxpFRStat
IxpFRStat;
IxpFHdr hdr;
uint16_t nstat;
typedef struct
IxpFRWalk
IxpFRWalk;
IxpFHdr hdr;
uint16_t nwqid;
IxpQid wqid
[IXP_MAX_WELEM]
;
typedef struct
IxpFTCreate
IxpFTCreate;
IxpFHdr hdr;
uint32_t perm;
uint8_t mode;
/*
+Topen
*/
typedef struct
IxpFTFlush
IxpFTFlush;
IxpFHdr hdr;
uint16_t oldtag;
typedef struct
IxpFTWStat
IxpFTWStat;
IxpFHdr hdr;
IxpStat stat;
typedef struct
IxpFTWalk
IxpFTWalk;
IxpFHdr hdr;
uint32_t newfid;
uint16_t nwname;
typedef struct
IxpFVersion
IxpFVersion;
IxpFHdr hdr;
uint32_t msize;
Overview
The IxpFcall structure represents a 9P protocol message. The hdr element is common to all Fcall types, and may be used to determine the type and tag of the message. The IxpFcall type is used heavily in server applications, where it both presents a request to handler functions and returns a response to the client.
Each member of the IxpFcall structure represents a certain message type, which can be discerned from the hdr.type field. This value corresponds to one of the IxpFType constants. Types with significant overlap use the same structures, thus TRead and RWrite are both represented by IxpFIO and can be accessed via the io member as well as tread and rwrite respectively.