IP_DROP_SOURCE_MEMBERSHIP(2const)

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

πŸ’– IP_DROP_SOURCE_MEMBERSHIP(2const) πŸ’–

okay so bestie, this is a page from the 2const section of the Linux manual β€” like, the section that's all about the constants you shove into syscalls. and today's main character is IP_DROP_SOURCE_MEMBERSHIP. she's a socket option. she's a little bit niche. she's iconic. let's get into it. πŸŽ€


✨ NAME ✨

IP_DROP_SOURCE_MEMBERSHIP β€” leave a source-specific multicast group πŸ¦‹

like... say bye. unsub. exit the group chat (the multicast one). πŸ’…


πŸ“š LIBRARY πŸ“š

Standard C library (libc, -lc)

your regular old libc, no extra credit needed. 🫢


🌸 SYNOPSIS 🌸

#include <netinet/in.h>  /* Definition of IP* constants */
#include <sys/socket.h>

int setsockopt(int sockfd, IPPROTO_IP, IP_DROP_SOURCE_MEMBERSHIP,
               const struct ip_mreq_source *val,
               sizeof(struct ip_mreq_source));

not me showing up to setsockopt(2) with IPPROTO_IP as the level and IP_DROP_SOURCE_MEMBERSHIP as the option name. the way that val is a const struct ip_mreq_source * and the size is literally sizeof(struct ip_mreq_source)... consistent. we love that. ✨


πŸ’… DESCRIPTION πŸ’…

Leave a source-specific group; that is, stop receiving data from a given multicast group that comes from a given source.

so like, picture it: you're in a multicast group, but you're only vibing with one specific source inside it. this option is you hitting the "leave" button on that one source. no more packets from them. door closed. πŸšͺπŸ’€

but β€” and this is the important part bestie β€” if the application has subscribed to multiple sources within the same group, data from the remaining sources will still be delivered.

fr fr, this is a source-specific leave, not a group-wide one. the other sources stay. they didn't do anything wrong. 😭

To stop receiving data from all sources at once, use IP_DROP_MEMBERSHIP(2const).

that's the nuclear option. different page. different vibe. go get her if that's what you need. πŸ‘‘


πŸ’€ ERRORS πŸ’€

See IPPROTO_IP(2const). See setsockopt(2). See ip(7).

that's it. that's the whole section. go read those, bestie, the lore is all there. πŸ”₯


πŸ¦‹ HISTORY πŸ¦‹

Linux 2.4.22, Linux 2.5.68.

ancient. retro. vintage. she's been around since the early 2000s and she's still serving. ⭐


πŸ‘‘ SEE ALSO πŸ‘‘

the full squad. go read them all, iykyk. 🌈


that's the whole page, bestie β€” every flag, every field, every number, unchanged, just with the vibe check passed. no cap. πŸ“

this lore came from Linux man-pages 6.20, dated 2025-11-25 β€” that's the IP_DROP_SOURCE_MEMBERSHIP(2const) page, and yes she ate. 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