Home |
Function xn_ipcp_want_compress Function xn_ipcp_want_dns_address Function xn_lcp_want_pap |
Function xn_lcp_want_papSets the authentication protocol to negotiate to PAP. int xn_lcp_want_pap(int iface_no, int host); Parametersiface_noInterface number returned by xn_attach. hostSet negotiation flag for local or remote host (LOCAL_HOST or REMOTE_HOST). 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 that LCP Authentication should be requested and that the Password Authentication Protocol (PAP) should be the protocol to request. Call this routine with host set to LOCAL_HOST to mandate that the remote host must log on using PAP. The function xn_pap_add_user must be called to establish valid users before PAP can accept any log on. If CHAP is also mandated, CHAP will be requested first. If the PAP option is selected, an LCP Configuration-Nak message containing the PAP option will automatically be sent to the remote host if a LCP Configuration-Request message is received from the remote host with any other Authentication Protocol requested. If the PAP option is selected, the LCP Configuration-Request message will contain the PAP option. The link will not become established if the remote host rejects the LCP Configuration-Request for PAP or the user name and password in the PAP Configuration-Request message received from the remote host during the authentication phase is invalid. Call this routine with host set to REMOTE_HOST to accept PAP if it is requested by the remote host or suggest PAP in a Configuration-Nak in response to a request from the remote host for an unknown protocol or in response to a CHAP request where CHAP is not configured. The function xn_pap_user must be called to establish log on username and password.
|