X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fchap-new.h;h=b4b0ee23eb6d5bf6121e842d236a1e2214a745bb;hb=bdd34ab1f2f87acb23c6d92feee7354ac53005ff;hp=e6a534df80c0d0caf5e2a3f45cfec3dc3acc0b10;hpb=7f45a9a839d065ec6b02f684ae5a240f89fe8c8c;p=ppp.git diff --git a/pppd/chap-new.h b/pppd/chap-new.h index e6a534d..b4b0ee2 100644 --- a/pppd/chap-new.h +++ b/pppd/chap-new.h @@ -10,16 +10,11 @@ * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The name(s) of the authors of this software must not be used to + * 2. The name(s) of the authors of this software must not be used to * endorse or promote products derived from this software without * prior written permission. * - * 4. Redistributions of any form whatsoever must retain the following + * 3. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by Paul Mackerras * ". @@ -33,6 +28,8 @@ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include "pppdconf.h" + /* * CHAP packets begin with a standard header with code, id, len (2 bytes). */ @@ -110,7 +107,7 @@ struct chap_digest_type { void (*make_response)(unsigned char *response, int id, char *our_name, unsigned char *challenge, char *secret, int secret_len, unsigned char *priv); - int (*check_success)(unsigned char *pkt, int len, unsigned char *priv); + int (*check_success)(int id, unsigned char *pkt, int len); void (*handle_failure)(unsigned char *pkt, int len); struct chap_digest_type *next; @@ -125,6 +122,9 @@ extern int (*chap_verify_hook)(char *name, char *ourname, int id, /* Called by digest code to register a digest type */ extern void chap_register_digest(struct chap_digest_type *); +/* Lookup a digest handler by type */ +extern struct chap_digest_type *chap_find_digest(int digest_code); + /* Called by authentication code to start authenticating the peer. */ extern void chap_auth_peer(int unit, char *our_name, int digest_code);