|const struct sockaddr_storage * destIpAddrPtr,|
|const struct sockaddr_storage * gatewayPtr,|
This function is used to add a route for the interface. It allows packets for a different network to be routed to the interface. This API replaces tfAddStaticRoute().
- The interface ID to use to add this routing entry.
- A pointer to the sockaddr_storage structure describing the route destination.
- A pointer to the sockaddr_storage structure describing the gateway.
- A metric used to rank routing entries. An entry with lower hops has a higher priority. This is typically the number of routers between the source and destination.
- The length (in bits) of the subnet prefix part of the address specified by destIpAddrPtr. For an IPv6 address, the value specified must be in the range of 0 to 128, and will typically be 64. For an IPv4 address, the value specified is the number of most significant bits in the associated IPv4 netmask that are set to 1.
- Invalid value specified for prefixLen.
- destIpAddrPtr->addrFamily or gatewayPtr->addrFamily was set to an invalid value for address family; valid values are AF_INET and AF_INET6.