first_packet_length(9)
π NAME π
first_packet_length β return length of first packet in receive queue. That's the whole vibe, bestie. We're in the Kernel API Manual, and this page is first_packet_length(9). β¨
β¨ SYNOPSIS β¨
int first_packet_length (struct sock *sk );
π ARGUMENTS π
skβ socket. That's it. The one arg. The main character. π«Ά
π DESCRIPTION π
Okay so here's the tea: it drops all bad checksum frames, and keeps going until a valid one is found. No cap. Then it returns the length of the found skb, or -1 if none is found. π
π¦ SEE ALSO π¦
- Kernel file
./net/ipv4/udp.cβ plus the rest of the squad:udp_lib_get_port(9),udp4_lib_lookup1(9),udp4_hwcsum(9),udp_poll(9).
Sign-off: this page lives under ./net/ipv4, dated October 2026, and it's literally first_packet_length(9). Mwah πβ¨
π¦ 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