tfUsePppLqm

Jump to: navigation, search

Table of Contents >> Optional Protocols >> PPP Interface


#include <trsocket.h>


int tfUsePppLqm (
ttUserInterface interfaceHandle,
ttUser32Bit lqrReTxPeriodMsec
);


Function Description

This function is used to initialize PPP Link Quality Monitoring (LQM), and must be called before tfOpenInterface() for each distinct PPP interface that the user wants to monitor link quality on. After calling tfUsePppLqm() but before calling tfOpenInterface(), the user should call tfPppSetOption() to set the TM_LCP_QUALITY_PROTOCOL configuration option; otherwise, LQM won't be used on the link (unless the peer negotiates it).

After this, it is still possible that LQM is not being used on the link because the peer doesn't support it. To determine if LQM is being used on the link, install a PPP notification function (refer to tfUseAsyncPpp()). When your PPP notification function is called with the flag TM_LL_LQM_UP, this indicates that LQM has been enabled on the link. When your PPP notification function is called with the flag TM_LL_LQM_DISABLED, this indicates that LQM has been disabled on the link.


Parameters

  • interfaceHandle
    The PPP interface handle as returned by tfAddInterface().
  • lqrReTxPeriodMsec
    Configures how long (in milliseconds) we wait for the LQR response to a LQR we sent (initiated LQR timer) before timing out and retransmitting the LQR. This should be chosen to be at least twice the smooth round trip time on the link. Setting this parameter to 0 disables the use of a retransmission timer (not recommended).


Returns

  • TM_ENOERROR
    Success.
  • TM_EINVAL
    Invalid parameter.
  • TM_EOPNOTSUPP
    Failed to initialize PPP LQM.


Table of Contents >> Optional Protocols >> PPP Interface