libmctProgrammer’s Manual

mct_session_ttl(3)

Name

mct_session_ttl — Set multicast TTL for a MCT session

Synopsis

#include <sys/types.h>
#include <sys/socket.h>

#include <mct/session.h>

int mct_session_ttl(struct mct *mct, int s, int ttl);

Description

Set the TTL (time to live) for outgoing multicast packets for the given session.

A ttl value of -1 sets the route default. Otherwise, the value for ttl may be from 0 to 255 inclusive.

A multicast TTL may only be set for sessions which were created by mct_session_connect().

Return Value

The mct_session_ttl() function returns 0 on success. On failure this function returns -1 and errno is set accordingly.

Errors

The mct_session_ttl() function may fail for any of the reasons the socket API may produce.

In addition, mct_session_ttl() may fail for any of the reasons documented by mct_ipc.

In addition, mct_session_ttl() may fail for the following reasons:

EINVAL

The given session ID is not valid.

EINVAL

The given TTL is not valid.

EOPNOTSUPP

The given session ID was not created by mct_session_connect().

EAFNOSUPPORT

An unsupported address family was given. See caveats below.

Caveats

Currently the only address families supported for setting multicast TTL are AF_INET and AF_INET6.

See Also

mctd, mct, mct_ipc, mct_bridge.