netlbl_domhsh_walk(9)
β¨ 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 tocallback, 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 π«Ά:
netlbl_domhsh_free_entry(9)netlbl_domhsh_hash(9)netlbl_domhsh_search(9)netlbl_domhsh_search_def(9)netlbl_domhsh_audit_add(9)netlbl_domhsh_validate(9)netlbl_domhsh_init(9)netlbl_domhsh_add(9)netlbl_domhsh_add_default(9)netlbl_domhsh_remove_entry(9)netlbl_domhsh_remove_af4(9)netlbl_domhsh_remove_af6(9)netlbl_domhsh_remove(9)netlbl_domhsh_remove_default(9)netlbl_domhsh_getentry(9)netlbl_domhsh_getentry_af4(9)netlbl_domhsh_getentry_af6(9)
~ 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
- 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