__in6_dev_stats_get(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– __in6_dev_stats_get β€” Kernel API Manual, bestie edition ✨

okay so bestie, welcome to the <pink>Kernel API Manual</pink> entry for __in6_dev_stats_get(9) and honestly? this one's short and sweet, we love a low-commitment king πŸ‘‘


🌸 NAME 🌸

__in6_dev_stats_get β€” get inet6_dev pointer for stats πŸŽ€

like, that's the whole gig. it gets you the inet6_dev pointer. for stats. slay.


πŸ¦‹ SYNOPSIS πŸ¦‹

struct inet6_dev * __in6_dev_stats_get (const struct net_device *dev ,
   const struct sk_buff *skb );

look at that signature, it's giving main character energy fr fr πŸ’…


✨ ARGUMENTS ✨

  • dev β€” network device πŸ’» like, the device, the netdev, the whole vibe
  • skb β€” skb for original incoming interface if needed 🌈 so if you need the original incoming interface, this bad boy is where it lives

πŸ’œ DESCRIPTION πŸ’œ

okay so here's the important part, and I need you to actually read it, no skimming πŸ™ˆ

Caller must hold rcu_read_lock or RTNL, because this function does not take a reference on the inet6_dev.

literally that's it. that's the whole caution. it's an icon of efficiency ✨

so like β€” the function hands you back an inet6_dev pointer and does not bump a reference on it. meaning if you're not holding rcu_read_lock or RTNL, that pointer could be gone before you finish looking at it. so hold one of them. periodt πŸ’€πŸ”’

the way that this is one (1) sentence of actual technical content and yet the stakes are real β€” ngl, respect 🫢


πŸ‘‘ SEE ALSO πŸ‘‘

go read those too, bestie, they're the friend group πŸ’– (and yes, one of them is literally called _safely, iykyk 🌟)


πŸŽ€ cute little sign-off πŸŽ€

this little page lives in ./include/net πŸ¦‹ and it's dated October 2026 ⭐ so go forth, hold your rcu_read_lock, and get those stats, you absolute icon πŸ’…πŸ”₯✨

πŸ“¦ where this page comes from