ENUM P9_MSG_T(9)
β¨ enum p9_msg_t β 9P message types β¨
Hey bestie π so this page is a kernel API manual entry for enum p9_msg_t, and it's lowkey the master list of every 9P message type. Think of it as the group chat roster for the 9P protocol, where every op shows up as a matched pair: a request and its response. Iconic, honestly.
πΈ SYNOPSIS πΈ
Okay so the enum itself is long, and not me exaggerating β here's the whole thing, character for character, no edits, no cuts π«Ά:
enum p9_msg_t {
P9_TLERROR ,
P9_RLERROR ,
P9_TSTATFS ,
P9_RSTATFS ,
P9_TLOPEN ,
P9_RLOPEN ,
P9_TLCREATE ,
P9_RLCREATE ,
P9_TSYMLINK ,
P9_RSYMLINK ,
P9_TMKNOD ,
P9_RMKNOD ,
P9_TRENAME ,
P9_RRENAME ,
P9_TREADLINK ,
P9_RREADLINK ,
P9_TGETATTR ,
P9_RGETATTR ,
P9_TSETATTR ,
P9_RSETATTR ,
P9_TXATTRWALK ,
P9_RXATTRWALK ,
P9_TXATTRCREATE ,
P9_RXATTRCREATE ,
P9_TREADDIR ,
P9_RREADDIR ,
P9_TFSYNC ,
P9_RFSYNC ,
P9_TLOCK ,
P9_RLOCK ,
P9_TGETLOCK ,
P9_RGETLOCK ,
P9_TLINK ,
P9_RLINK ,
P9_TMKDIR ,
P9_RMKDIR ,
P9_TRENAMEAT ,
P9_RRENAMEAT ,
P9_TUNLINKAT ,
P9_RUNLINKAT ,
P9_TVERSION ,
P9_RVERSION ,
P9_TAUTH ,
P9_RAUTH ,
P9_TATTACH ,
P9_RATTACH ,
P9_TERROR ,
P9_RERROR ,
P9_TFLUSH ,
P9_RFLUSH ,
P9_TWALK ,
P9_RWALK ,
P9_TOPEN ,
P9_ROPEN ,
P9_TCREATE ,
P9_RCREATE ,
P9_TREAD ,
P9_RREAD ,
P9_TWRITE ,
P9_RWRITE ,
P9_TCLUNK ,
P9_RCLUNK ,
P9_TREMOVE ,
P9_RREMOVE ,
P9_TSTAT ,
P9_RSTAT ,
P9_TWSTAT ,
P9_RWSTAT
};
π Constants π
Grab a snack, bestie, because we're going through every single one. π
The T ones are the request side, the R ones are the response side β iykyk.
P9_TLERRORβ not used π«P9_RLERRORβ the response for any failed request for 9P2000.LP9_TSTATFSβ file system status requestP9_RSTATFSβ file system status responseP9_TLOPENβ open a file for I/O (9P2000.L)P9_RLOPENβ response with qid and iounit (9P2000.L)P9_TLCREATEβ prepare a handle for I/O on a new file, for 9P2000.LP9_RLCREATEβ response with file access information for 9P2000.LP9_TSYMLINKβ make symlink requestP9_RSYMLINKβ make symlink responseP9_TMKNODβ create a special file object requestP9_RMKNODβ create a special file object responseP9_TRENAMEβ rename requestP9_RRENAMEβ rename responseP9_TREADLINKβ read the symbolic link target (9P2000.L)P9_RREADLINKβ response with the symbolic link target (9P2000.L)P9_TGETATTRβ get file attributes request (9P2000.L)P9_RGETATTRβ get file attributes response (9P2000.L)P9_TSETATTRβ set file attributes request (9P2000.L)P9_RSETATTRβ set file attributes response (9P2000.L)P9_TXATTRWALKβ prepare to read/list extended attributes (9P2000.L)P9_RXATTRWALKβ response with extended attribute size (9P2000.L)P9_TXATTRCREATEβ prepare to set an extended attribute (9P2000.L)P9_RXATTRCREATEβ set extended attribute response (9P2000.L)P9_TREADDIRβ read directory entries request (9P2000.L)P9_RREADDIRβ read directory entries response (9P2000.L)P9_TFSYNCβ flush cached file data to storage request (9P2000.L)P9_RFSYNCβ flush cached file data to storage response (9P2000.L)P9_TLOCKβ acquire or release a POSIX record lock (9P2000.L)P9_RLOCKβ POSIX record lock response (9P2000.L)P9_TGETLOCKβ test for existence of a POSIX record lock (9P2000.L)P9_RGETLOCKβ POSIX record lock test response (9P2000.L)P9_TLINKβ create a hard link (9P2000.L)P9_RLINKβ hard link response (9P2000.L)P9_TMKDIRβ create a directory request (9P2000.L)P9_RMKDIRβ create a directory response (9P2000.L)P9_TRENAMEATβ safely rename across directories (9P2000.L)P9_RRENAMEATβ rename response (9P2000.L)P9_TUNLINKATβ unlink a file or directory (9P2000.L)P9_RUNLINKATβ unlink response (9P2000.L)P9_TVERSIONβ negotiate the protocol version and message sizeP9_RVERSIONβ version handshake responseP9_TAUTHβ request to establish the authentication channelP9_RAUTHβ response with authentication informationP9_TATTACHβ establish user access to the file serviceP9_RATTACHβ response with the top level handle to the file hierarchyP9_TERRORβ not used π«P9_RERRORβ response for any failed requestP9_TFLUSHβ request to abort a previous requestP9_RFLUSHβ response when the previous request has been cancelledP9_TWALKβ descend a directory hierarchyP9_RWALKβ response with a new handle for the position within the hierarchyP9_TOPENβ prepare a handle for I/O on an existing fileP9_ROPENβ response with file access informationP9_TCREATEβ prepare a handle for I/O on a new fileP9_RCREATEβ response with file access informationP9_TREADβ request to transfer data from a file or directoryP9_RREADβ response with the data requestedP9_TWRITEβ request to transfer data to a fileP9_RWRITEβ response with how much data was transferred to the fileP9_TCLUNKβ forget about a handle to an entity within the file systemP9_RCLUNKβ response when the server has forgotten about the handleP9_TREMOVEβ request to remove an entity from the hierarchyP9_RREMOVEβ response when the server has removed the entityP9_TSTATβ request file entity attributesP9_RSTATβ response with file entity attributesP9_TWSTATβ request to update file entity attributesP9_RWSTATβ response when file entity attributes are updated
π¦ Description π¦
So the tea β: there are 14 basic operations in 9P2000, and they're all paired up as requests and responses. Cute, right? Matched set energy.
The one special case is ERROR β because there is no P9_TERROR request for clients to transmit to the server, but the server may respond to any other request with an P9_RERROR. So ERROR is out here with main character energy, showing up uninvited to every conversation. π
See Also: http://plan9.bell-labs.com/sys/man/5/INDEX.html
π SEE ALSO π
Kernel file ./include/net/9p/9p.h, plus the whole friend group: enum p9_debug_flags(9), enum p9_open_mode_t(9), enum p9_perm_t(9), enum p9_qid_t(9), struct p9_qid(9), struct p9_wstat(9), struct p9_iattr_dotl(9), struct p9_fcall(9). Go read them, they're all slay. π
Okay that's the whole page, bestie β no cap, nothing skipped π«Ά This lil manual lives in the kernel source file ./include/net/9p, and it's stamped October 2026, so go off and read some 9P headers. Periodt. π
β¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms