Home |
Function xn_chap_add_secret Function xn_ipcp_want_compress Function xn_ipcp_want_dns_address |
Function xn_chap_add_secretAdds a CHAP secret for a remote host to the local database. int xn_chap_add_secret(char * host, BYTE * secret, int secret_len); ParametershostHost name for which the secret is defined (at most 100 characters length). secretSecret to use for *host. secret_lenLength of the secret (1 .. 100). return valueReturns 0 if successful, otherwise -1. 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 the secret to use for challenging or when being challenged by a remote host machine using Challenge Handshake Authentication (CHAP) Protocol. A CHAP challenge is sent during the authentication phase and at random intervals after the connection is established. When a challenge request comes in, RTIP-32 searches through all host names defined through this function to find a corresponding secret. If none is found, and xn_chap_add_secret() has been called for host name "", the secret of host "" is used as a default secret. See the PPP documentation for more details about CHAP authentication.
|