socket_mchopcount6(3)

πŸ“¦
version 0.34 Β· 2 versions
  • 0.34 Β· alpine 3.24, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 0.30 Β· fedora 43, fedora 44, ubuntu jammy
, in alpine 3.24, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– socket_mchopcount6 β€” set multicast hop count πŸ’–

okay bestie, welcome to the socket_mchopcount6(3) page from the Library Functions Manual β€” yes it's a real manpage, yes it's niche, and yes we're gonna make it make sense 🫢


✨ NAME ✨

socket_mchopcount6 β€” set multicast hop count πŸŽ€


🌸 SYNTAX 🌸

#include <libowfat/socket.h>

int socket_mchopcount6(int s,char TTL);

like. that's it. that's the whole vibe. no cap πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so basically, socket_mchopcount6 sets the maximum hop count of outgoing multicast packets on the socket s. periodt ✨

the way this works is lowkey iconic: every router that the packet passes through decrements the packet hop count by one, and if that count hits zero, the router just discards the packet πŸ’€ it's giving "you shall not pass" energy fr fr.

so if you set the maximum hop count to 1, for example? that keeps the packet propagation limited to the LAN. just the local network, nobody else invited, it's a private party 🌈

and if something goes wrong? socket_mchopcount6 returns -1 and sets errno appropriately. so check that errno bestie, it's literally telling you what happened 😭


πŸ‘‘ SEE ALSO πŸ‘‘


and that's the whole page, angel πŸ’œ it's socket_mchopcount6(3), straight out of the Library Functions Manual, and honestly? she ate. go forth and multicast responsibly πŸ§šβ€β™€οΈπŸŒΈβœ¨