netdev_get_by_flags_rcu(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– netdev_get_by_flags_rcu(9) β€” find any device with given flags πŸ’–

okay bestie, welcome to the Kernel API Manual page for netdev_get_by_flags_rcu(9). This is the one where we go looking for any device with the flags we want. Very β€œmain character energy” for a kernel helper, honestly. ✨


🌸 NAME 🌸

netdev_get_by_flags_rcu β€” find any device with given flags

✨ SYNOPSIS ✨

struct net_device * netdev_get_by_flags_rcu (struct net *net ,
netdevice_tracker *tracker , unsigned short if_flags , unsigned short
mask );

πŸŽ€ ARGUMENTS πŸŽ€

  • net β€” the applicable net namespace, bestie.
  • tracker β€” tracking object for the acquired reference. yes, we are tracking it.
  • if_flags β€” IFF_* values.
  • mask β€” bitmask of bits in if_flags to check.

πŸ¦‹ DESCRIPTION πŸ¦‹

Search for any interface with the given flags. That’s the whole vibe: any interface that has the flags you’re checking for. simple as that, no cap. 🫢

πŸ’… CONTEXT πŸ’…

rcu_read_lock must be held. like, must must. do not skip this, bestie 😭

🌈 RETURN 🌈

Returns NULL if a device is not found, or a pointer to the device. so: no device, NULL; device found, pointer. iconic either way πŸ’«

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./net/core/dev.c is the main character here, and these are all the linked besties:


made with ./net/core energy, dated October 2026, and brought to you by the manual page netdev_get_by_flags_rcu(9) πŸ«ΆπŸ’‹

πŸ“¦ where this page comes from