Jump to: navigation, search

Table of Contents >> Programmer's Reference

#include <trsocket.h>

int tfAddMcastRoute (
ttUserInterface interfaceId,
ttUserIpAddress mcastAddress,
ttUserIpAddress netmask,
unsigned char mhomeIndex

Function Description

This function is used to add a multicast route associating a specific multicast destination address with a specific outgoing interface. Normally the netmask parameter is set to all 1's.


  • interfaceId
    The interface ID to use to add this routing entry. Identifies the outgoing interface to use for packets sent to the multicast destination address specified by mcastAddress.
  • mcastAddress
    The multicast destination address to add the route for.
  • netmask
    The netmask for the route. Normally, this will be all 1's, i.e. inet_addr(""), which means that there must be an exact match of the packet destination address with mcastAddress for this route to be used to send the packet.
  • mhomeIndex
    The multi-home index to use to add this routing entry. This is the multi-home index of a valid IP address that is already configured on the interface identified by interfaceId. This IP address is used as the default source IP address in packets sent to mcastAddress.


    interfaceId is an invalid interface ID.
    The interface specified by interfaceId is not configured.
    Either the interface specified by interfaceId was not configured with the multicast enabled flag (i.e. TM_DEV_MCAST_ENB), or mcastAddress is not a valid multicast IP address.
    The multicast route already exists.

Table of Contents >> Programmer's Reference