X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=PLUGINS;h=a655a9c765ef6a29f8b1963a1afbf5ce4adf97a1;hp=e3e6718cb0669ee9e92c1f37c001d3007456cb24;hb=2b4ea140432eeba5a007c0d4e6236bd0e0c12ba4;hpb=c30d204fe82b18fb9668a05afb587a37f981696c diff --git a/PLUGINS b/PLUGINS index e3e6718..a655a9c 100644 --- a/PLUGINS +++ b/PLUGINS @@ -98,9 +98,7 @@ to reestablish the link (0 means immediately). int (*pap_check_hook)(void); int (*pap_passwd_hook)(char *user, char *passwd); -int (*pap_auth_hook)(char *user, int userlen, - char *passwd, int passlen, - char **msgp, int *msglenp, +int (*pap_auth_hook)(char *user, char *passwd, char **msgp, struct wordlist **paddrs, struct wordlist **popts); void (*pap_logout_hook)(void); @@ -149,8 +147,10 @@ purposes. This hook is deprecated and will be replaced by a notifier. int (*chap_check_hook)(void); int (*chap_passwd_hook)(char *user, char *passwd); -int (*chap_auth_hook)(char *user, u_char *remmd, - int remmd_len, chap_state *cstate); +int (*chap_verify_hook)(char *name, char *ourname, int id, + struct chap_digest_type *digest, + unsigned char *challenge, unsigned char *response, + char *message, int message_space) These hooks are designed to allow a plugin to replace the normal CHAP password processing in pppd with something different (e.g. contacting @@ -174,13 +174,25 @@ MAXSECRETLEN bytes of space are available at *passwd. If this hook returns 0, pppd will use the value *passwd; if it returns -1, pppd will fail to authenticate. -The chap_auth_hook is called to determine whether the response -to a CHAP challenge provided by the peer is valid. user points to -a null-terminated string containing the username supplied -by the peer. remmd points to the response provided by the peer, of -length remmd_len bytes. cstate is the internal CHAP state structure -maintained by pppd. chap_auth_hook is expected to return one of -CHAP_SUCCESS or CHAP_FAILURE. +The chap_verify_hook is called to determine whether the peer's +response to our CHAP challenge is valid -- it should return 1 if valid +or 0 if not. The parameters are: + +* name points to a null-terminated string containing the username + supplied by the peer, or the remote name specified with the + "remotename" option. +* ourname points to a null-terminated string containing the name of + the local machine (the hostname, or the name specified with the + "name" option). +* id is the value of the id field from the challenge. +* digest points to a chap_digest_type struct, which contains an + identifier for the type of digest in use plus function pointers for + functions for dealing with digests of that type. +* challenge points to the challenge as a counted string (length byte + followed by the actual challenge bytes). +* response points to the response as a counted string. +* message points to an area of message_space bytes in which to store + any message that should be returned to the peer. int (*null_auth_hook)(struct wordlist **paddrs, @@ -219,6 +231,13 @@ packet is in p; its length is len. This allows plugins to "snoop in" on the pppd conversation. The hooks may prove useful in implmenting L2TP. + +void (*multilink_join_hook)(); + +This is called whenever a new link completes LCP negotiation and joins +the bundle, if we are doing multilink. + + A plugin registers itself with a notifier by declaring a procedure of the form: @@ -265,4 +284,4 @@ Here is a list of the currently-implemented notifiers in pppd. -## $Id: PLUGINS,v 1.5 2002/02/12 20:07:09 dfs Exp $ ## +## $Id: PLUGINS,v 1.8 2008/06/15 07:02:18 paulus Exp $ ##