STRUCT P9_DIRENT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct p9_dirent(9) πŸ’–

okay bestie, welcome to the struct p9_dirent page β€” this is from the Kernel API Manual and honestly it's giving "tiny struct, big responsibility" energy. Let's get into it πŸŽ€


✨ NAME ✨

struct p9_dirent β€” the directory entry structure. yep, that's the whole vibe. it's literally the thing that holds one dir entry. slay πŸ’…


🌸 SYNOPSIS 🌸

here's the whole struct, character for character, don't touch it, it's perfect:

struct p9_dirent {
    struct p9_qid qid;
    u64 d_off;
    unsigned char d_type;
    char d_name[256];
 };

πŸ¦‹ Members πŸ¦‹

  • qid β€” the p9 server qid for this dirent. so like, the server's whole identity tag for it πŸ‘‘
  • d_off β€” offset to the next dirent. this is how you keep the scroll going, fr fr
  • d_type β€” type of file. is it a file? a dir? the struct knows πŸ’€
  • d_name β€” file name. yes bestie, the name, in a char array, iconic

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./include/net/9p/client.h β€” and here's the whole squad, no gatekeeping:

  • enum p9_trans_status(9)
  • enum p9_req_status_t(9)
  • struct p9_req_t(9)
  • struct p9_client(9)
  • struct p9_fd_opts(9)
  • struct p9_rdma_opts(9)
  • struct p9_session_opts(9)

okay that's the page!! 🫢 this lil beauty lives in ./include/net/9p, the version is October 2026, and it's filed under struct p9_dirent(9). mwah, go read the qid struct next, iykyk πŸ’œβœ¨

πŸ“¦ where this page comes from