IXPFCALL(3)
okay bestie, welcome to IXPFCALL(3) β the Library Functions Manual entry that's literally serving the whole 9P message-struct family, and it's lowkey iconic. Meet the squad:
β¨ NAME β¨
IxpFcallIxpFTypeIxpFAttachIxpFErrorIxpFHdrIxpFIOIxpFRAuthIxpFROpenIxpFRStatIxpFRWalkIxpFTCreateIxpFTFlushIxpFTWStatIxpFTWalkIxpFVersion
No cap, that's every single one. π«Ά
πΈ SYNOPSIS πΈ
okay so first you include the header, then you get the union, the enum, and all the structs. Keep this exactly as-is β comments, values, array sizes, all of it β because the details are the whole vibe:
#include <ixp.h>
typedef struct IxpFcall IxpFcall;
typedef union IxpFcall IxpFcall;
union 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;
}
enum IxpFType {
P9_TVersion = 100,
P9_RVersion,
P9_TAuth = 102,
P9_RAuth,
P9_TAttach = 104,
P9_RAttach,
P9_TError = 106, /* illegal */
P9_RError,
P9_TFlush = 108,
P9_RFlush,
P9_TWalk = 110,
P9_RWalk,
P9_TOpen = 112,
P9_ROpen,
P9_TCreate = 114,
P9_RCreate,
P9_TRead = 116,
P9_RRead,
P9_TWrite = 118,
P9_RWrite,
P9_TClunk = 120,
P9_RClunk,
P9_TRemove = 122,
P9_RRemove,
P9_TStat = 124,
P9_RStat,
P9_TWStat = 126,
P9_RWStat,
}
typedef struct IxpFAttach IxpFAttach;
struct IxpFAttach {
IxpFHdr hdr;
uint32_t afid;
char* uname;
char* aname;
}
typedef struct IxpFError IxpFError;
struct IxpFError {
IxpFHdr hdr;
char* ename;
}
typedef struct IxpFHdr IxpFHdr;
struct IxpFHdr {
uint8_t type;
uint16_t tag;
uint32_t fid;
}
typedef struct IxpFIO IxpFIO;
struct IxpFIO {
IxpFHdr hdr;
uint64_t offset; /* Tread, Twrite */
uint32_t count; /* Tread, Twrite, Rread */
char* data; /* Twrite, Rread */
}
typedef struct IxpFRAuth IxpFRAuth;
struct IxpFRAuth {
IxpFHdr hdr;
IxpQid aqid;
}
typedef struct IxpFROpen IxpFROpen;
struct IxpFROpen {
IxpFHdr hdr;
IxpQid qid; /* +Rattach */
uint32_t iounit;
}
typedef struct IxpFRStat IxpFRStat;
struct IxpFRStat {
IxpFHdr hdr;
uint16_t nstat;
uint8_t* stat;
}
typedef struct IxpFRWalk IxpFRWalk;
struct IxpFRWalk {
IxpFHdr hdr;
uint16_t nwqid;
IxpQid wqid[IXP_MAX_WELEM];
}
typedef struct IxpFTCreate IxpFTCreate;
struct IxpFTCreate {
IxpFHdr hdr;
uint32_t perm;
char* name;
uint8_t mode; /* +Topen */
}
typedef struct IxpFTFlush IxpFTFlush;
struct IxpFTFlush {
IxpFHdr hdr;
uint16_t oldtag;
}
typedef struct IxpFTWStat IxpFTWStat;
struct IxpFTWStat {
IxpFHdr hdr;
IxpStat stat;
}
typedef struct IxpFTWalk IxpFTWalk;
struct IxpFTWalk {
IxpFHdr hdr;
uint32_t newfid;
uint16_t nwname;
char* wname[IXP_MAX_WELEM];
}
typedef struct IxpFVersion IxpFVersion;
struct IxpFVersion {
IxpFHdr hdr;
uint32_t msize;
char* version;
}
π DESCRIPTION π
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.
bestie, the enum literally has P9_TError = 106, /* illegal */ marked right there in the source β that's the original note, not me being dramatic. π
π¦ SEE ALSO π¦
okay that's the whole page, bestie π β this is from the libixp Manual, dated 2012 Dec, and it's filed under IXPFCALL(3). mwah π«Ά
π¦ where this page comes from
- nixos 26.05: libixp 0-unstable-2022-04-04
- nixpkgs unstable: libixp 0-unstable-2022-04-04
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms