STRUCT P9_CLIENT(9)
π NAME π
struct p9_client β per client instance state, periodt. okay so this is the struct p9_client(9) page from the Kernel API Manual, and it's literally all about keeping one clientβs per client instance state situation cute and tracked. bestie, it's giving main character energy for exactly one client. π«Ά
β¨ SYNOPSIS β¨
here's the struct in all its glory, no cap β every field exactly as the page serves it:
struct p9_client {
spinlock_t lock;
unsigned int msize;
unsigned char proto_version;
struct p9_trans_module *trans_mod;
enum p9_trans_status status;
void *trans;
struct kmem_cache *fcall_cache;
union {
struct {
int rfd;
int wfd;
} fd;
struct {
u16 port;
bool privport;
} tcp;
} trans_opts;
struct idr fids;
struct idr reqs;
char name[__NEW_UTS_LEN + 1];
};
also, lowkey, the struct itself includes fcall_cache and a trans_opts union with the fd and tcp versions β they're right there in the synopsis, so they absolutely count. π
π Members π
vibe check on the members, one by one:
lockβ protectfidsandreqsmsizeβ maximum data size negotiated by protocolproto_versionβ 9P protocol version to usetrans_modβ module API instantiated with this clientstatusβ connection statetransβ the tranport instance state and API (yes, the page says βtranportβ β not me fixing it, bestie π)fidsβ All active FID handlesreqsβ All active requests.nameβ node name used as client id
πΈ Description πΈ
okay so the client structure is used to keep track of various per-client state that has been instantiated. that's the whole vibe: one struct, lots of per-client state, all tracked. periodt. π¦
π₯ SEE ALSO π₯
go peek at these besties:
- Kernel file
./include/net/9p/client.h enum p9_trans_status(9)enum p9_req_status_t(9)struct p9_req_t(9)struct p9_fd_opts(9)struct p9_rdma_opts(9)struct p9_session_opts(9)struct p9_dirent(9)
mwah π β from ./include/net/9p, October 2026, serving struct p9_client(9) realness. now go be iconic with your per-client state, bestie π«Άβ¨
π¦ 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