datagram_poll_queue(9)
π¦ datagram_poll_queue(9) π¦
okay so bestie, welcome to the Kernel API Manual β this one's a lil function called datagram_poll_queue and it is literally the group-chat lurker of the socket world. let's get into it π
β¨ NAME β¨
datagram_poll_queue β it's giving same as datagram_poll, but it does the whole thing on a specific receive queue instead of the default one. no cap. π«Ά
β¨ SYNOPSIS β¨
__poll_t datagram_poll_queue (struct file *file , struct socket *sock ,
poll_table *wait , struct sk_buff_head *rcv_queue );
like, that's the whole signature, she's not hiding anything πΈ
β¨ ARGUMENTS β¨
fileβ thefilestruct. yes. that one. the file. πsockβ the socket. the main character of this whole operation fr fr πwaitβ the poll table. it's the VIP list for who's waiting on what π₯rcv_queueβ the receive queue you actually wanna poll. this one. not the other one. π
β¨ DESCRIPTION β¨
so what does she actually do? datagram_poll_queue performs polling on the given receive queue β and while she's at it she's handling shutdown, error, and connection state too, because she's multitasking like that π
and why would you even need this? bc some protocols are extra π β they deliver userspace-bound packets through a custom queue instead of sk->sk_receive_queue. so if your protocol refuses to use the standard-issue queue, this is the function for you. iykyk π§
β¨ RETURN β¨
returns a poll bitmask indicating the socket's current state. that's the vibe check result, delivered straight to you β¨
β¨ SEE ALSO β¨
okay these are all the siblings, the whole extended family, look at them go π all of these are in the Kernel file ./net/core/datagram.c:
__skb_try_recv_datagram(9)skb_kill_datagram(9)skb_copy_and_crc32c_datagram_iter(9)skb_copy_datagram_iter(9)skb_copy_datagram_from_iter(9)zerocopy_sg_from_iter(9)skb_copy_and_csum_datagram(9)skb_copy_and_csum_datagram_msg(9)datagram_poll(9)
lowkey important: this page lives in ./net/core and it's dated October 2026 β so yeah, from the future, slay π¦
and that's the whole page bestie, mwah, go poll something πππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms