---
name: "socket_mchopcount6"
section: "3"
platform: "linux"
package: "libowfat-dev"
version: "0.32-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/socket_mchopcount6"
---

# socket\_mchopcount6(3)

set multicast hop count

## NAME

socket\_mchopcount6 - set multicast hop count

## SYNTAX

**#include \<libowfat/socket.h\>**

int **socket\_mchopcount6**(int *s*,char *TTL*);

## DESCRIPTION

socket\_mchopcount6 sets the maximum hop count of outgoing multicast packets on the socket *s*.  Each router decrements the packet hop count by one and discards the packet if it reaches zero.  Setting the maximum hop count to 1, for example, will limit the packet propagation to the LAN.

If something goes wrong, socket\_mchopcount6 returns -1, setting errno appropriately.

## SEE ALSO

[socket\_mcttl4(3)](/socket_mcttl4/3.md), [socket\_mcjoin4(3)](/socket_mcjoin4/3.md), [socket\_mcleave4(3)](/socket_mcleave4/3.md)
