tfChapRegisterAuthenticate
Table of Contents >> Optional Protocols >> PPP Interface
| #include <trsocket.h> |
| int tfChapRegisterAuthenticate | ( |
| ttUserInterface interfaceHandle, | |
| ttChapAuthenticateFunctPtr 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) 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 * myChapAuthenticate(char * username);
If the user name passed to myChapAuthenticate 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
- interfaceHandle
- 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 'interfaceHandle' or 'funcPtr'.