IP_BLOCK_SOURCE(2const)

πŸ“¦
version 6.20 Β· 4 versions
, in arch rolling, nixpkgs unstable

πŸ’– 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:

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