batadv_hardif_get_by_netdev(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 batadv_hardif_get_by_netdev(9) 🌸

okay so real talk bestie, this is a page straight out of the Kernel API Manual, and it's all about batadv_hardif_get_by_netdev β€” one tiny function with main character energy. let's get into it πŸ’…


✨ NAME ✨

batadv_hardif_get_by_netdev β€” bestie, it literally gets you the hard interface object of a net_device. that's the whole job. no cap. πŸ¦‹


πŸŽ€ SYNOPSIS πŸŽ€

struct batadv_hard_iface * batadv_hardif_get_by_netdev (struct
net_device *net_dev );

like, look at her. iconic signature. πŸ”₯


πŸ’– ARGUMENTS πŸ’–

  • net_dev β€” the net_device you're searching for. that's the one. hand it over and let the function cook πŸ“

πŸ‘‘ RETURN πŸ‘‘

it hands you back the batadv_hard_iface of net_dev β€” and yes, with increased refcnt β€” so don't forget that, because the reference count went up and that's on you to deal with 🫢

and on errors? you get NULL. that's it. NULL. no drama, just nothing. 😭


🌈 SEE ALSO 🌈

okay this list is long and honestly it ate, so buckle up β€” here's the whole squad, no skipping, fr fr:

and where does she even live? in the kernel file ./net/batman-adv/hard-interface.c β€” that's her home address, iykyk 🧚


tiny reminder bestie: that refcnt goes up, so pair this with batadv_hardif_release(9) or you'll be leaking refs and that's not the vibe πŸ’€

k bye ily, this page came from ./net/batman-adv, dated October 2026, and it's batadv_hardif_get_by_netdev(9) forever and always πŸ’œβœ¨

πŸ“¦ where this page comes from