Home |
Function xn_ipcp_want_compress Function xn_ipcp_want_dns_address Function xn_lcp_echo |
Function xn_lcp_echoSends an LCP ECHO command to the remote host and waits for a response. int xn_lcp_echo(int iface_no, int wait_cnt, int size); Parametersiface_noInterface number returned by xn_attach. wait_cntTime to wait in timer ticks for echo response. sizeNumber of data bytes to send in echo request. return valueReturns 0 if successful, otherwise SOCKET_ERROR. If an error occurred, call xn_getlasterror and xn_geterror_string to return the error value. Section Error Codes further describes each error. This function tests the connection via ECHO REQUEST and ECHO REPLY LCP commands. It sends an Echo Request to the remote host and waits up to wait_cnt ticks for the ECHO RESPONSE. All other PPP API calls to set negotiation options, open IPCP, etc., as well as xn_attach and xn_ppp_init need to be called prior to calling xn_lcp_echo. Echo requests and replies use the magic number option if it has been negotiated in the LCP phase. Using the magic number option is recommended since it will prevent loopback connections from succeeding.
|