IPV6_RECVPKTINFO(2const)
π IPV6_RECVPKTINFO π
okay bestie, so you're reading the IPV6_RECVPKTINFO page from the man-pages section 2const, and honestly? it's a short one, but it's so useful, trust. it lives in the Standard C library (libc, -lc) and it's all about making your incoming datagrams spill the tea about where they came from. let's get into it π«Ά
β¨ NAME β¨
IPV6_RECVPKTINFO β set delivery of the IPV6_PKTINFO control message on incoming datagrams
like. the name literally ate. it tells the kernel "hey bestie, when datagrams roll up to my socket, pls also send me the IPV6_PKTINFO control message." πΈ
π LIBRARY π
Standard C library (libc, -lc)
π¦ SYNOPSIS π¦
#include <netinet/in.h> /* Definition of IP* constants */
#include <sys/socket.h>
int setsockopt(int sockfd, IPPROTO_IPV6, IPV6_RECVPKTINFO,
const int *enable, sizeof(int));
no cap, that's the whole vibe. you're calling setsockopt() with IPPROTO_IPV6 as the level and IPV6_RECVPKTINFO as the option name, and you hand it a pointer to an int named enable plus sizeof(int). π
π DESCRIPTION π
Set delivery of the IPV6_PKTINFO control message on incoming datagrams. π
Such control messages contain a struct in6_pktinfo, as per RFC 3542.
Allowed only for SOCK_DGRAM or SOCK_RAW sockets.
okay so let me translate that into group-chat: you flip this option on, and every incoming datagram gets a lil bonus control message riding along with it. that message is a struct in6_pktinfo β RFC 3542 said so, periodt. β¨
vibe check: this is only allowed onSOCK_DGRAMorSOCK_RAWsockets. other socket types? not invited to the party π
π ERRORS π
See IPPROTO_IPV6(2const). See setsockopt(2). See ipv6(7).
that's it, that's the section. the error lore lives in those pages, so go read them if something's acting up bestie π
β HISTORY β
Linux 2.6.14.
an icon from way back, we love a legacy queen π
πΈ SEE ALSO πΈ
that's the whole page, no filler, all facts, we ate and left no crumbs π
mwah π β this was IPV6_RECVPKTINFO from Linux man-pages 6.20, dated 2025-12-02. go set some socket options, main character π
π¦ where this page comes from
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- π the page's license: Linux-man-pages-copyleft
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms