tfGetDefaultGateway
Table of Contents >> Programmer's Reference
| #include <trsocket.h> |
| int tfGetDefaultGateway | ( |
| ttUserInterface interfaceHandle, | |
| ttUserIpAddress * gatewayIpAddressPtr | |
| ); | |
| Conditional parameter. See details in Parameters below. | |
Function Description
This function is called from the socket interface to get the default gateway IP address. The default gateway IP address will be stored in network byte order.
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.
- gatewayIpAddressPtr
- The pointer to the buffer where the gateway IP address will be stored.
Returns
- TM_ENOERROR
- Success.
- TM_EINVAL
- Invalid parameter.
- TM_ENOENT
- No default gateway.