IP_BLOCK_SOURCE(2const)
π IP_BLOCK_SOURCE π
okay bestie, so this one lives in the IP_BLOCK_SOURCE(2const) corner of the man-pages universe β¨ β it's a constant you hand to setsockopt(), and it does exactly one thing: it tells a multicast group "hey, keep the vibes but lose that one source" π
β¨ NAME β¨
IP_BLOCK_SOURCE β stop receiving multicast data from a specific source in a given group π¦
π LIBRARY π
Standard C library (libc, -lc) π
the classic, the icon, the one you already linked against, no cap.
πΈ SYNOPSIS πΈ
#include <netinet/in.h> /* Definition of IP* constants */
#include <sys/socket.h>
int setsockopt(int sockfd, IPPROTO_IP, IP_BLOCK_SOURCE,
const struct ip_mreq_source *val,
sizeof(struct ip_mreq_source));
π« DESCRIPTION π«
Stop receiving multicast data from a specific source in a given group. that's the whole job, and she does it flawlessly π
but listen β the way that this is valid only after the application has subscribed to the multicast group using either IP_ADD_MEMBERSHIP(2const) or IP_ADD_SOURCE_MEMBERSHIP(2const). you cannot block a source in a group you never joined, that's not a thing. join first, block second, main character energy periodt π
π ERRORS π
look, the error lore doesn't live here, it lives in its friends:
- See
IPPROTO_IP(2const). - See
setsockopt(2). - See
ip(7).
go read those, they spill all the tea π
π°οΈ HISTORY π°οΈ
Linux 2.4.22,Linux 2.5.68β
π SEE ALSO π
and that's the whole page, bestie π«Ά go forth and block sources responsibly π
this iconic little page came from Linux man-pages 6.20, dated 2025-11-25, under the title IP_BLOCK_SOURCE(2const) β mwah, no notes π β¨
π¦ 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