tfEapMd5RegisterAuthenticate
Table of Contents >> Optional Protocols >> PPP Interface
| #include <trsocket.h> |
| int tfEapMd5RegisterAuthenticate | ( |
| ttUserInterface interfaceHandle, | |
| ttEapMd5AuthFuncPtr authFuncPtr | |
| ); |
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 must return the associated secret.
The prototype of the notification function is:
char * myEapMd5Authenticate(char * username, int * errorCode);
If the username is valid and a secret is being returned, *errorCode should be set to TM_ENOERROR. However, if the specified username is invalid (an unknown user, for example), *errorCode should be set to a non-zero value.
Parameters
- interfaceHandle
- The interface for which to use this authentication routine.
- authFuncPtr
- The pointer to the function to authenticate the remote user.
Returns
- TM_ENOERROR
- Success.
- TM_EINVAL
- Invalid 'interfaceHandle' or 'authFuncPtr'.
- TM_ENOPROTOOPT
- 'interfaceHandle' refers to a device that does not support EAP.