tfGetPppPeerIpAddress
Table of Contents >> Optional Protocols >> PPP Interface
Note: | The content on this page has been deprecated. |
For the new content, please see tfNgGetPt2PtPeerIpAddress(). |
#include <trsocket.h> |
int tfGetPppPeerIpAddress | ( |
ttUserInterface interfaceHandle, | |
ttUserIpAddress * ifIpAddress | |
); |
Function Description
This function is used to get the PPP address that the remote PPP has used (respectively SLIP address of the remote SLIP). This function should be called after tfOpenInterface() has completed successfully.
If a default gateway needs to be added for that interface, then the retrieved IP address should be used to add a default gateway through the corresponding interface.
If a static route needs to be added for that interface, then the retrieved IP address should be used to add a static route through the corresponding interface.
Parameters
- interfaceHandle
- The interface to get the peer's IP address from.
- ifIpAddressPtr
- The pointer to the buffer where the peer's PPP IP address will be stored.
Returns
- TM_ENOERROR
- Success.
- TM_EINVAL
- Invalid parameter or the device does not support PPP.
- TM_ENETDOWN
- The interface is not configured.