STRUCT NS_ID_REQ(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct ns_id_req(9) β€” the Kernel API Manual, bestie edition πŸŽ€

okay so picture this: you're deep in the struct ns_id_req(9) page of the Kernel API Manual, and it's literally just a lil struct with big main character energy. let's get into it ✨


🌸 NAME 🌸

struct ns_id_req β€” the namespace ID request structure. that's it, that's the vibe. no cap. πŸ’–


✨ SYNOPSIS ✨

copy it exactly, do not touch, the compiler is watching πŸ‘€

struct ns_id_req {
    __u32 size;
    __u32 spare;
    __u64 ns_id;
    struct {
      __u32 ns_type;
      __u32 spare2;
      __u64 user_ns_id;
    };
 };

🫢 Members 🫢

the whole squad, one by one πŸ’…

  • size β€” size of this structure. yes queen, know ur own size πŸ‘‘
  • spare β€” reserved for future use. it's literally just sitting there holding a seat for future-us, we love a planner πŸŽ€
  • ns_id β€” last namespace id. the most recent one, the it-girl of IDs πŸ”₯
  • {unnamed_struct} β€” anonymous. no name, all mystery, very mysterious-girl-of-the-group energy πŸ¦‹ (the page doesn't spell out ns_type and spare2 individually, they're just vibing inside there, iykyk)
  • user_ns_id β€” owning user namespace ID. the one who owns the place, the landlord, the main character πŸ πŸ’œ

πŸ’€ Description πŸ’€

so this whole structure is for passing a namespace ID plus some miscellaneous parameters to statns(2) and listns(2). literally a little care package of namespace info, hand-delivered 🀲✨

for statns(2), param represents the request mask. for listns(2), param represents the last listed mount id (or zero). yes, zero counts, zero is valid, don't come for zero πŸ™ˆ


🌈 SEE ALSO 🌈

  • Kernel file ./tools/include/uapi/linux/nsfs.h β€” go read it, it's giving source of truth πŸ“–πŸ’–

reminder bestie: this page is short and sweet but every field matters β€” copy the struct character for character or the vibe check WILL fail 😭

and that's the whole page, you ate that πŸ“πŸ’… β€” this one's from ./tools/include/uapi/linux, dated October 2026, so it's recent, it's fresh, it's iconic. periodt. ⭐🧚

πŸ“¦ where this page comes from