MLD(4)

πŸ’– MLD πŸ’–

okay bestie, welcome to the mld page β€” that's Multicast Listener Discovery Protocol, and no, it's not about finding your people at a party (though honestly? same energy). it's a real networking thing and it's lowkey iconic. let's get into it πŸ¦‹


✨ SYNOPSIS ✨

first things first, here's the vibe β€” you gotta pull in all these headers:

#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/ip6.h>
#include <netinet/icmp6.h>
#include <netinet6/mld6.h>

and then the little summoning ritual:

int
socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6);

slay. that's it. that's the whole spell πŸŽ€


🌸 DESCRIPTION 🌸

so MLD is a control plane protocol β€” the backstage manager of the internet, fr fr β€” used by IPv6 hosts and routers to propagate multicast group membership information. basically: "hey, who's in this group? is anybody still listening? should we keep sending stuff?" that kinda thing.

ngl, normally you don't touch this protocol directly. it's not for you, bestie, it's for the kernel itself πŸ’… β€” it hops in whenever user applications ask for multicast membership. that's the kernel's job, and it does it beautifully, no cap.

but wait β€” there's a plot twist. multicast routing protocol daemons may open a raw socket and directly interact with mld to receive membership reports. main character energy only πŸ”₯

as of FreeBSD 8.0, MLD version 2 is implemented. and bestie, this is a big deal because:

  • it adds support for Source-Specific Multicast (SSM) β€” meaning applications can tell upstream multicast routers "um actually I only want streams from these particular sources, thanks" πŸ™ˆ
  • and the retransmission of state-change reports adds some robustness to the protocol. resilient queen πŸ‘‘

πŸ’… SYSCTL VARIABLES πŸ’…

these are the lil knobs and dials, the settings you can peek at and poke. one at a time, gorgeous:

  • net.inet6.mld.ifinfo β€” an opaque read-only variable that exposes the per-link MLDv2 status to ifmcstat(8). that's it. that's the whole job. it's giving mysterious, it's giving "I don't explain myself" ✨
  • net.inet6.mld.gsrdelay β€” this one specifies the time threshold, in seconds, for processing Group-and-Source Specific Queries (GSR). now listen, because this part matters: GSR query processing requires maintaining state on the host, which means it may cause memory to be allocated, and therefore it's a potential attack point for Denial-of-Service (DoS) 😭. so if more than one GSR query is received within this threshold, it gets dropped β€” to mitigate the potential for DoS. protective king πŸ›‘οΈ
  • net.inet6.mld.v1enable β€” if this variable is non-zero, then MLDv1 membership queries (and host reports) will be processed by this host, and backwards compatibility will be enabled until the v1 'Older Version Querier Present' timer expires. this sysctl is normally enabled by default. so like, it's on unless you turn it off. respect the defaults bestie 🫢

πŸ‘€ SEE ALSO πŸ‘€

go read these next, they're all connected, iykyk:


πŸ“œ HISTORY πŸ“œ

the mld manual page appeared in FreeBSD 8.0. a legend was born πŸ’«


and that's the whole page, bestie!! πŸŽ€βœ¨ you ate that. go forth and multicast responsibly πŸ’–

signing off from the Debian side of things β€” this lil slice of manpage wisdom is dated April 8, 2013, and it lives under the name MLD(4) πŸŒˆπŸ’œ

πŸ“¦ where this page comes from