netlbl_domhsh_walk(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ netlbl_domhsh_walk β€” like, the manual page πŸ’…

okay so bestie, welcome to netlbl_domhsh_walk(9) from the Kernel API Manual 🌸 this one's a little function that literally just... walks the domain mapping hash table. iconic behaviour honestly. let's get into it πŸ¦‹


πŸŽ€ NAME πŸŽ€

netlbl_domhsh_walk β€” iterate through the domain mapping hash table ✨


🌈 SYNOPSIS 🌈

int netlbl_domhsh_walk (u32 *skip_bkt , u32 *skip_chain , int
       (*callback) (struct netlbl_dom_map *entry, void *arg) , void *cb_arg );

like yes, that's the whole signature, no cap πŸ”₯


πŸ’– ARGUMENTS πŸ’–

  • skip_bkt β€” the number of buckets to skip at the start 🫢 so we're not starting from bucket zero, we're doing the "no thanks, already seen those" thing.
  • skip_chain β€” the number of entries to skip in the first iterated bucket ⭐ like, within that first bucket we're actually looking at, skip this many entries before you start caring.
  • callback β€” callback for each entry πŸ‘‘ you bring the function, the walk brings the entries, it's giving collaboration.
  • cb_arg β€” argument for the callback function 🧚 your lil' payload that gets handed straight to callback, no questions asked.

πŸ’œ DESCRIPTION πŸ’œ

So. Iterate over the domain mapping hash table πŸ’… skipping the first skip_bkt buckets and skip_chain entries. Yep, that's the whole vibe β€” we're doing a resume-style walk, not a from-scratch one.

For each entry in the table, call callback. And β€” important β€” if callback returns a negative value, stop walking through the table and return 😭 like it said "nah" and we respect the nah. Periodt.

It updates the values in skip_bkt and skip_chain on return πŸ” so if you were keeping state, surprise! the function kept it for you.

Returns zero on success, negative values on failure 🌸 that's the contract, bestie, don't forget it.

ngl, the "stop on negative callback return" bit is the main character energy of this whole function β€” if your callback bails, the walk bails, and you get that negative value back. plan accordingly πŸ’€

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./net/netlabel/netlabel_domainhash.c πŸ“ (the source, the origin, the mothership)

and the whole friend group 🫢:


~ and that's the page, bestie πŸ’– brought to you by ./net/netlabel, dated October 2026, filed under netlbl_domhsh_walk(9) β€” slay, go read the source, ily πŸŽ€βœ¨

πŸ“¦ where this page comes from