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

# socket\_mcttl4(3)

set multicast ttl

## NAME

socket\_mcttl4 - set multicast ttl

## SYNTAX

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

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

## DESCRIPTION

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

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

## SEE ALSO

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