Home |
Function xn_ipcp_want_compress Function xn_ipcp_want_dns_address Function xn_lcp_open |
Function xn_lcp_openOpens a PPP connection. int xn_lcp_open(int iface_no, int type, int close_wait_cnt, int open_wait_cnt); Parametersiface_noInterface number returned by xn_attach. typeSpecifies whether to do active or passive open (ACTIVE or PASSIVE). close_wait_cntTime to wait in timer ticks for previous PPP close operation to complete. open_wait_cntTime to wait in timer ticks for a PPP connection to be established. 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. Possible values for this function are:
This function establishes a PPP connection. It waits on the PPP interface for the connection to become established or until a timeout occurs. The connection is open after LCP, authentication (if negotiated), and IPCP negotiations have successfully completed. Call this routine with type set to PASSIVE to wait for the remote side to start the LCP negotiation. Call this routine with type set to ACTIVE to start the negotiation immediately. The local and remote hosts can simultaneously do an active open. All other PPP API calls to set negotiation options, open IPCP, etc., as well as xn_attach and xn_ppp_init must be called prior to calling xn_lcp_open. Call xn_interface_info after xn_lcp_open to extract the negotiated IP addresses.
|