tfNgRtDestExists
Table of Contents >> Programmer's Reference
| #include <trsocket.h> |
| int tfNgRtDestExists | ( |
| ttUserInterface interfaceHandle, | |
| struct sockaddr_storage * sockAddrPtr | |
| ); | |
| Conditional parameter. See details in Parameters below. | |
Function Description
Find out whether a route to a destination exists, given the pair destination sockaddr_storagestructure and prefix length.
Parameters
- interfaceHandle
- Interface ID as returned by tfAddInterface(). NOTE: This parameter is conditional and only present when TM_USE_STRONG_ESL is defined at compile time. For more information, please see Appendix C: Strong End System Model / Weak End System Model.
- sockAddrPtr
- Destination IP address.
- prefixLen
- Destination prefix length.
Returns
- TM_ENOERROR
- Success.
- TM_EHOSTUNREACH
- No route to the destination.
- TM_EINVAL
- The interfaceHandle is invalid.