skb_peek(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ skb_peek(9) β€” Kernel API Manual πŸ¦‹

okay so bestie, welcome to the kernel API manual page for skb_peek(9) and honestly? this one is giving "look but don't touch" energy and i need you to listen πŸ’…


✨ NAME ✨

skb_peek β€” peek at the head of an &sk_buff_head πŸ‘€


🌸 SYNOPSIS 🌸

struct sk_buff * skb_peek (const struct sk_buff_head *list_ );

πŸŽ€ ARGUMENTS πŸŽ€

  • list_ β€” the list you're peeking at, bestie. that's the one. that's the whole argument. 🫢

πŸ’– DESCRIPTION πŸ’–

okay so you're peeking at an sk_buff. but like β€” not like the other operations, no ma'am. you _MUST_ be careful with this one, and yes the manual is screaming at you in all caps for a reason 😭

here's the tea: a peek leaves the buffer on the list, which means someone else can literally just run off with it. like you looked away for one second. gone. so you must hold the appropriate locks, or have a private queue, to do this. no cap. πŸ”₯

it returns NULL for an empty list, or a pointer to the head element. and the reference count is not incremented, so that reference is therefore volatile. use with caution. periodt. πŸ’€

fr fr bestie, "volatile reference" is not a cute aesthetic, it's a warning. hold your locks. πŸ‘‘

🌈 SEE ALSO 🌈

the way this list is iconic and also enormous β€” it's from the kernel file ./include/linux/skbuff.h and it is absolutely going to eat, so buckle up πŸ“

iykyk πŸ’œ


aaaand that's the whole page bestie, ily, go hold some locks πŸ§šπŸ’«

signed off from ./include/linux Β· October 2026 Β· slay πŸŽ€β­

πŸ“¦ where this page comes from