tfAddStaticRoute

Jump to: navigation, search

Table of Contents >> Programmer's Reference

Note Note: The content on this page has been deprecated.
For the new content, please see tfNgAddStaticRoute().


#include <trsocket.h>


int tfAddStaticRoute (
ttUserInterface interfaceId,
ttUserIpAddress destIpAddress,
ttUserIpAddress destNetMask,
ttUserIpAddress gateway,
int hops
);


Function Description

This function is used to add a route for the interface. It allows packets for a different network to be routed to the interface.


Parameters

  • interfaceId
    The interface ID to use to add this routing entry.
  • destIpAddress
    The IP address to add the route for.
  • destNetMask
    The netmask for the route.
  • gateway
    IP address of the gateway for this route.
  • hops
    Number of routers between this host and the route.


Returns

  • TM_ENOERROR
    Success.
  • TM_ENOBUFS
    Not enough buffers to allocate a routing entry.
  • TM_EALREADY
    The route is already in the routing table.
  • TM_EINVAL
    One of the first 4 parameters is null or 0.


Table of Contents >> Programmer's Reference