STRUCT P9_FCALL(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct p9_fcall(9) ✨

okay bestie, welcome to the Kernel API Manual πŸ’… this one's about struct p9_fcall, and it's literally the main character of 9P packets. no cap.


πŸŽ€ NAME πŸŽ€

struct p9_fcall β€” the primary packet structure. that's it, that's the whole vibe. ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

struct p9_fcall {
    u32 size;
    u8 id;
    u16 tag;
    size_t offset;
    size_t capacity;
    struct kmem_cache *cache;
    u8 *sdata;
    bool zc;
 };

she's got eight members and every single one of them matters, so let's do a vibe check on each 🫢


🌸 Members 🌸

  • size β€” the prefixed length of the structure. the little glow-up number out front πŸ‘‘
  • id β€” the protocol operating identifier, and it's of type p9_msg_t. iykyk 🌈
  • tag β€” the transaction id of the request. her personal little name tag at the party πŸŽ€
  • offset β€” used by the marshalling routines to track the current position in the buffer. it's giving "you are here" map energy πŸ“
  • capacity β€” used by the marshalling routines to track the total malloc'd capacity. so like, how much room she actually has, not how much she's using πŸ’€
  • sdata β€” the payload. the actual contents. the reason we're all here πŸ”₯
  • zc β€” whether zero-copy is used. zero-copy queen behavior fr fr ✨
ngl the struct also has a cache member up there in the synopsis, but the member list doesn't say a single word about it β€” she's just standing there being mysterious πŸ™ˆ not me noticing though

πŸ’– Description πŸ’–

p9_fcall represents the structure for all 9P RPC transactions. like, all of them. requests get packaged into fcalls, and responses must be extracted from them. no exceptions, that's just how she runs πŸ‘‘

See Also: http://plan9.bell-labs.com/magic/man2html/2/fcall β€” go read it, bestie, it's iconic πŸ’…


πŸ”₯ SEE ALSO πŸ”₯

  • Kernel file ./include/net/9p/9p.h
  • enum p9_debug_flags(9)
  • enum p9_msg_t(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)

and that's the whole page, bestie 🫢 this lore comes straight out of ./include/net/9p, dated October 2026 β€” go forth and slay your 9P RPCs πŸ’œπŸ§šβ­

πŸ“¦ where this page comes from