IPPROTO_IPV6(2const)
β¨ IPPROTO_IPV6 β¨
okay so bestie, lemme put you on π
this is the page for IPPROTO_IPV6, aka the Linux IPv6 protocol socket options situation β it's a 2const page, so it's like the little sibling hanging off the section 2 corner of your man pages, iykyk. no cap, this is the one you want when you're out here tuning IPv6 sockets and need to know which knobs even exist.
π LIBRARY
Standard C library β link it with -lc and you're golden π«Ά
#include <netinet/in.h> /* Definition of IP* constants */
#include <sys/socket.h>
π SYNOPSIS
here's the whole vibe, fr fr:
int setsockopt(int sockfd, IPPROTO_IPV6, int opt,
const void val[size], size_t size);
int getsockopt(int sockfd, IPPROTO_IPV6, int opt,
void val[size], size_t size);
πΈ DESCRIPTION
so IPv6 has its own lil collection of protocol-specific socket options π you set them with setsockopt(2) and you read them back with getsockopt(2). the socket option level you pass for IPv6 is IPPROTO_IPV6 β that's literally the whole identity of this page.
and a lil note on booleans bestie: a boolean integer flag is zero when it's false, and anything else means true. that's it, that's the rule, no vibes beyond that π
the following socket options are supported π obsessed with this list honestly:
IPV6_ADDRFORM(2const)IPV6_ADD_MEMBERSHIP(2const)IPV6_DROP_MEMBERSHIP(2const)IPV6_MTU(2const)IPV6_MTU_DISCOVER(2const)IPV6_MULTICAST_HOPS(2const)IPV6_MULTICAST_IF(2const)IPV6_MULTICAST_LOOP(2const)IPV6_RECVPKTINFO(2const)IPV6_RTHDR(2const)IPV6_AUTHHDR(2const)IPV6_DSTOPTS(2const)IPV6_HOPOPTS(2const)IPV6_FLOWINFO(2const)IPV6_HOPLIMIT(2const)IPV6_RECVERR(2const)IPV6_ROUTER_ALERT(2const)IPV6_UNICAST_HOPS(2const)IPV6_V6ONLY(2const)
π ERRORS
go check setsockopt(2), and also ipv6(7) β they got the deets.
ENOPROTOOPTβoptis invalid. yeah that one's on you bestie, the option you asked for just isn't a thing π
π HISTORY
IPPROTO_IPV6β POSIX.1-2001. she's old, she's established, she's iconic.
π₯ SEE ALSO
setsockopt(2), cmsg(3), ipv6(7)
okay that's the whole page bestie, go forth and socket responsibly π¦π this was Linux man-pages 6.20, dated 2026-01-05, and that's the IPPROTO_IPV6(2const) tea β slay, periodt β¨
π¦ 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