STRUCT DISTR_ITEM(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct distr_item(9) β€” the Kernel API Manual page you didn't know you needed πŸŽ€

okay so. bestie. picture this: you're a kernel, you've got a publication you need to tell other nodes about, and you need a little struct to carry that info. that's literally struct distr_item, and it lives in the Kernel API Manual (section 9, the fancy one). she's small, she's __be32-coded, she's iconic. let's get into it ✨


🌸 NAME 🌸

struct distr_item β€” the publication info that gets distributed to other nodes. that's it, that's the vibe. 🫢


✨ SYNOPSIS ✨

struct distr_item {
    __be32 type;
    __be32 lower;
    __be32 upper;
    __be32 port;
    __be32 key;
 };

look at her. five fields. all __be32. no notes. πŸ’…


πŸŽ€ Members πŸŽ€

  • type β€” the name sequence type. what kind of thing are we publishing, bestie? πŸ‘‘
  • lower β€” the name sequence lower bound. the bottom of the range, the floor, the basement apartment. πŸ“
  • upper β€” the name sequence upper bound. the top of the range. the penthouse. ✨
  • port β€” a publishing port reference. it's giving "which port did this." πŸ“
  • key β€” the publication key. unique little identifier energy. πŸ”‘πŸ’–

πŸ¦‹ Description πŸ¦‹

===> All fields are stored in network byte order. <===

no cap, every single field is network byte order. all of them. don't come crying to me about endianness later, i warned you 😭

the first 3 fields β€” that's type, lower, and upper β€” identify the (name or) name sequence that's being published. so like, the what. 🌈

the reference field (port) uniquely identifies the port that published the name sequence. so like, the who. πŸ’β€β™€οΈ

and the key field (key) uniquely identifies the publication itself β€” specifically for the event where a port has multiple publications of the same name sequence. yeah. she can publish the same thing more than once. that's her prerogative, honestly. periodt. πŸ‘‘


🧚 Note 🧚

there is no field that identifies the publishing node. why? because it's the same for all items contained within a publication message. one node per message, so it'd be redundant, and we don't do redundant here. lowkey efficient. πŸ’€βœ¨


⭐ SEE ALSO ⭐

  • Kernel file ./net/tipc/name_distr.h β€” go read it, iykyk πŸ¦‹

okay that's the whole page, bestie!! mwah πŸ’‹ stay byte-order-aware and hydrated 🫢

this little baddie comes to you from ./net/tipc, dated October 2026 β€” see you in the next release, love u, bye πŸ‘‹πŸ’–

πŸ“¦ where this page comes from