IP_ADD_SOURCE_MEMBERSHIP(2const)
π IP_ADD_SOURCE_MEMBERSHIP(2const) π
okay bestie, so this is a <italic>2const</italic> page from the Linux manual β a little constants-and-options corner of section 2, the system calls zone. and ngl? she's a baddie. let's get into it π«Ά
β¨ NAME β¨
IP_ADD_SOURCE_MEMBERSHIP β join a multicast group and allow receiving data only from a specified source
likeβ¦ you want IN on the group chat, but you only want to hear from one specific person. that's her. that's the whole vibe. π
π LIBRARY π
Standard C library β libc, -lc
your girl rides with libc, periodt.
π SYNOPSIS π
#include <netinet/in.h> /* Definition of IP* constants */
#include <sys/socket.h>
int setsockopt(int sockfd, IPPROTO_IP, IP_ADD_SOURCE_MEMBERSHIP,
const struct ip_mreq_source *val,
sizeof(struct ip_mreq_source));
look at that little setsockopt glow-up β¨ she's taking IPPROTO_IP, she's taking IP_ADD_SOURCE_MEMBERSHIP, and she's taking a const struct ip_mreq_source *val plus a nice sizeof(struct ip_mreq_source). immaculate. no notes. π₯
πΈ DESCRIPTION πΈ
Join a multicast group and allow receiving data only from a specified source.
it's giving selective attention, but make it networking. you're in the group, but you're only taking messages from the source you named. iconic behavior tbh. π
and bestie, the plot twist: you can use this option multiple times to allow receiving data from more than one source. so if you got three besties and you want all three of their tea? call it three times. stack 'em. π
π ERRORS π
the error lore isn't even on this page, it's a whole referral situation:
- See
IPPROTO_IP(2const). - See
setsockopt(2). - See
ip(7).
go read those, iykyk. π
π¦ HISTORY π¦
- Linux 2.4.22
- Linux 2.5.68
she's old. she's established. she's still slaying. ancestors of the kernel, fr fr. π
β SEE ALSO β
the whole friend group. go say hi. π
and that's the page, bestie!! this was Linux man-pages 6.20, dated 2025-11-25, and yes she's still serving <pink>IP_ADD_SOURCE_MEMBERSHIP(2const)</pink> energy in every terminal she touches. mwah. πβ¨π§
π¦ 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