tfMsChapRegisterAuthenticate
Table of Contents >> Optional Protocols >> PPP Interface
| #include <trsocket.h> |
| int tfMsChapRegisterAuthenticate | ( |
| ttUserInterface interfaceId, | |
| ttMsChapAuthenticateFunctPtr funcPtr | |
| ); |
Function Description
When acting as a PPP server, a function must be called to validate an incoming authentication request. This function is passed the username, and will return the secret (password) and the secret length for this particular username. The Chap module will further compute the challenge using this secret, and compare with the challenge given by the peer. If both challenges match, the peer is positively authenticated, otherwise, the peer is denied.
The prototype of the notification function is:
char * myMsChapAuthenticate(char * username, int * secretLenPtr);
If the user name passed to myMsChapAuthenticate is invalid, this function should return TM_CHAP_INVALID_USER. Should the password for this user be empty, this function should return TM_CHAP_NULL_PASSWORD.
Parameters
- interfaceId
- The interface for which to use this authentication routine.
- funcPtr
- The pointer to the function to authenticate the remote user.
Returns
- TM_ENOERROR
- Success.
- TM_EINVAL
- Invalid 'interfaceId' or 'funcPtr'.