STRUCT NS_ID_REQ(9)
π 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 outns_typeandspare2individually, 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
- 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