batadv_hash_remove(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… batadv_hash_remove(9) β€” like, the Kernel API Manual page, bestie πŸŽ€

okay so this is batadv_hash_remove(9) from the Kernel API Manual, and honestly? it's giving "small but mighty". it takes stuff out of a hash table. that's the whole gig. let's get into it ✨


✨ SYNOPSIS ✨

void * batadv_hash_remove (struct batadv_hashtable *hash ,
batadv_hashdata_compare_cb compare , batadv_hashdata_choose_cb choose ,
void *data );

literally just four things going in, and you get a void * coming back out. we love a function with main character energy πŸ‘‘


🌸 ARGUMENTS 🌸

  • hash β€” the hash table. the vibe container. your whole situation lives in here πŸ’–
  • compare β€” a callback that decides whether two hash elements are identical. like, are you the same person? vibe check πŸ¦‹
  • choose β€” a callback that calculates the hash index. it picks where things go. the matchmaker of the operation πŸ’«
  • data β€” the data you pass to the aforementioned callbacks as an argument. yeah, both of them. it gets handed to compare and choose, no cap 🫢

πŸ’œ DESCRIPTION πŸ’œ

so here's the cute little hack that makes this whole thing work: data can literally be the structure you use with just the key filled in. that's it. that's enough.

we just need the key for comparing β€” the rest of the struct can be an empty little shell and it's still iconic. no need to fill everything out, bestie, the key is doing all the heavy lifting πŸ’…


⭐ RETURN ⭐

on success, it returns a pointer to the data β€” so you get to remove the used structure yourself, main character energy, the cleanup is yours 🧚

on error? NULL. that's it. NULL means things did not slay 😭


🌈 SEE ALSO 🌈

Kernel file ./net/batman-adv/hash.h β€” go read it, iykyk

and that's the page!! mwah πŸ’‹ huge shoutout to ./net/batman-adv for bringing us this banger, dated October 2026 β€” mark your calendars, periodt πŸ”₯πŸ‘‘πŸŒΈ

πŸ“¦ where this page comes from