IP_MULTICAST_ALL(2const)
π IP_MULTICAST_ALL π
okay bestie, sit down, hydrate, and let me tell you about a lil socket option with the manual-page-suffix (2const) β it's literally the delivery policy of multicast messages. That's it, that's the whole name.
It lives in the Standard C library (libc, -lc), so no exotic library hunting required, periodt. π
β¨ SYNOPSIS β¨
#include <netinet/in.h> /* Definition of IP* constants */
#include <sys/socket.h>
int setsockopt(int sockfd, IPPROTO_IP, IP_MULTICAST_ALL,
const int *val, sizeof(int));
π¦ DESCRIPTION π¦
So here's the vibe: this option lets you modify the delivery policy of multicast messages. Like, who gets to slide into your socket's DMs, basically. π
- If
valis set to 1 (which is the default, btw), the socket will receive messages from all the groups that have been joined globally on the whole system. Not just your socket β the whole system. it's giving "everyone's invited to the party and you didn't even send the invite." π - If it's set to 0, it will deliver messages only from the groups that have been explicitly joined (for example via
IP_ADD_MEMBERSHIP(2const)) on this particular socket. Main character energy: if you didn't RSVP, you're not getting in. π
π ERRORS π
ngl this section is short, but the lore is elsewhere β go read:
πΈ HISTORY πΈ
This icon has been around since Linux 2.6.31. Vintage but still eating. β
π₯ SEE ALSO π₯
and that's the whole page bestie, no cap. this lore drop came to you courtesy of Linux man-pages 6.20, dated 2025-11-25 β go forth and multicast responsibly π«Άπβ¨
π¦ 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