ipv4_pktinfo_prepare(9)
ipv4_pktinfo_prepare(9) π β¨
okay so this is a Kernel API Manual page, and it's literally about transferring some info from rtable to skb. bestie, it's giving low-level kernel realness π«Ά
πΈ NAME πΈ
ipv4_pktinfo_prepare β transfer some info from rtable to skb π
β¨ SYNOPSIS β¨
the whole mood, signature-wise:
void ipv4_pktinfo_prepare (const struct sock *sk , struct sk_buff *skb ,
bool drop_dst );
π ARGUMENTS π
skβ socket. that's the socket bestie, no cap π§skbβ buffer. the packet buffer, the little carry-on π¦drop_dstβ iftrue, dropsskbdst. yes literally:truemeans theskbdst gets dropped π
π DESCRIPTION π
okay so to support the IP_CMSG_PKTINFO option, we store rt_iif and the specific destination in skb->cb[] before dst drop. that's the whole move β¨
the way this slays: the receiver doesn't make cache line misses to read rtable. no cap, it's a whole performance vibe π₯
π¦ SEE ALSO π¦
go look at the kernel file ./net/ipv4/ip_sockglue.c β that's the reference, iykyk π
xoxo kernel bestie π sourced from ./net/ipv4, dated October 2026, page ipv4_pktinfo_prepare(9) β periodt. π
π¦ 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